Thema: Delphi Dateisperre freigeben

Einzelnen Beitrag anzeigen

generic

Registriert seit: 24. Mär 2004
Ort: bei Hannover
2.416 Beiträge
 
Delphi XE5 Professional
 
#4

Re: Dateisperre freigeben

  Alt 8. Sep 2005, 14:16
Zitat:
The UnlockFile function unlocks a region in an open file. Unlocking a region enables other processes to access the region.

For an alternate way to specify the region, use the UnlockFileEx function.

BOOL UnlockFile(
HANDLE hFile,
DWORD dwFileOffsetLow,
DWORD dwFileOffsetHigh,
DWORD nNumberOfBytesToUnlockLow,
DWORD nNumberOfBytesToUnlockHigh
);

Parameters
hFile
[in] Handle to a file that contains a region locked with LockFile. The file handle must have been created with either the GENERIC_READ or GENERIC_WRITE access right. For more information, see File Security and Access Rights.
dwFileOffsetLow
[in] Low-order word of the starting byte offset in the file where the locked region begins.
dwFileOffsetHigh
[in] High-order word of the starting byte offset in the file where the locked region begins.
Windows Me/98/95: dwFileOffsetHigh must be 0, the sign extension of the value of dwFileOffsetLow. Any other value will be rejected.
nNumberOfBytesToUnlockLow
[in] Low-order word of the length of the byte range to be unlocked.
nNumberOfBytesToUnlockHigh
[in] High-order word of the length of the byte range to be unlocked.
wenn du den gesamten dateilock freigeben willst wird die funktion wohl nicht taugen oder?

aber vieleicht hilft dir die msdn doku.
Coding BOTT - Video Tutorials rund um das Programmieren - https://www.youtube.com/@codingbott
  Mit Zitat antworten Zitat