[python-win32] Re: Help: using msvcrt for file locking

Sheila King sheila@thinkspot.net
Sun, 26 Aug 2001 15:31:00 -0700


On Mon, 27 Aug 2001 08:09:01 +1000, Mark Hammond <MarkH@ActiveState.com>
wrote about [python-win32] Re: Help: using msvcrt for file locking:

:Sheila King wrote:

:It appears that LockFileEx is designed specifically for files that use 
:"overlapped IO".  Indeed, the "portalocker" recipe explicitly uses 
:overlapped IO structures.
:
:Try using LockFile - the MSDN documentation implies that it is supported 
:on all Win32 platforms, and the error you get:
:
:pywintypes.api_error: (120, 'LockFileEx', 'This function is only valid
:in Win32 mode.')
:
:implies you are running on Win9x.
:
:A quick look at portalocker implies you will also want to drop all 
:references to "_overlapped" - replace them with "None".

Thanks, Mark. I will try that and see what happens.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/