News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

LockFile (Low-order word of the starting byte)

Started by gavin, October 07, 2005, 09:32:16 PM

Previous topic - Next topic

gavin

Hi guys

I'm recoding an app i wrote as i know how to do it more effienctly now and with more options.
But ran into this slight problem maybe you have used this before?


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    invoke LockFile,     
    hFile,                                      ;file handle
    dwFileOffsetLow,                     ;where the lock should begin
   dwFileOffsetHigh,                      ;where the lock should begin
   nNumberOfBytesToLockLow,      ;length of the byte range to be locked
   nNumberOfBytesToLockHigh       ;length of the byte range to be locked
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Im just locking this file just incase of users trying to edit it read it or write to it etc.
Thanks

QvasiModo

You shouldn't need this API unless you want to lock parts of the file. If you want to lock the whole file pass the appropriate flags to CreateFile. :)

gavin

Ah i see now.
How stupid i was to try use this.

I used the file_share_read instead  :lol
Thanks .