[...] >> Well, samba uses it pretty heaviliy. I don't know about the limited >> portability, could you expand on this? (is it limited to *nix or do you >> refer to something else?) > > Strictly non-unixes, AFAIK. If I lock bytes 40-44 on a Win32 > file on a network share or under win9x, I'm locking bytes 0-4095. > It's not really good about byte ranges, except perhaps on the local NT > volume between processes.
Ok, but you wouldn't want your db to reside on a network drive anyway, would you (this sucks the life right out of performance)? Also, locally there should be no 4k block size locking issues. If you read http://msdn.microsoft.com/library/psdk/winbase/filesio_63xh.htm and http://msdn.microsoft.com/library/psdk/winbase/filesio_39h4.htm you see that there is nothing mentioned about it (this doesn't actually mean anything, I know :^P ). LockFile() is available on W95+ and NT3.1+, LockFileEx() on NT3.1+. Sander
