Commit e8df90b9 authored by James Juran's avatar James Juran Committed by Alexandre Julliard

Add stub for LockFileEx (KERNEL32.513).

parent 39f69f7a
......@@ -1915,6 +1915,36 @@ BOOL WINAPI LockFile( HFILE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh
return !CLIENT_WaitReply( NULL, NULL, 0 );
}
/**************************************************************************
* LockFileEx [KERNEL32.512]
*
* Locks a byte range within an open file for shared or exclusive access.
*
* RETURNS
* success: TRUE
* failure: FALSE
* NOTES
*
* Per Microsoft docs, the third parameter (reserved) must be set to 0.
*/
BOOL WINAPI LockFileEx( HANDLE hFile, DWORD flags, DWORD reserved,
DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh,
LPOVERLAPPED pOverlapped )
{
FIXME(file, "hFile=%d,flags=%ld,reserved=%ld,lowbytes=%ld,highbytes=%ld,overlapped=%p: stub.\n",
hFile, flags, reserved, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh,
pOverlapped);
if (reserved == 0)
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
else
{
ERR(file, "reserved == %ld: Supposed to be 0??\n", reserved);
SetLastError(ERROR_INVALID_PARAMETER);
}
return FALSE;
}
/**************************************************************************
* UnlockFile (KERNEL32.703)
......
......@@ -1369,6 +1369,7 @@ BOOL WINAPI IsProcessorFeaturePresent(DWORD);
BOOL WINAPI IsValidLocale(DWORD,DWORD);
BOOL WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
BOOL WINAPI LockFile(HFILE,DWORD,DWORD,DWORD,DWORD);
BOOL WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
HMODULE WINAPI MapHModuleSL(HMODULE16);
HMODULE16 WINAPI MapHModuleLS(HMODULE);
SEGPTR WINAPI MapLS(LPVOID);
......
......@@ -530,7 +530,7 @@ import ntdll.dll
510 stdcall LocalSize(long) LocalSize
511 stdcall LocalUnlock(long) LocalUnlock
512 stdcall LockFile(long long long long long) LockFile
513 stub LockFileEx
513 stdcall LockFileEx(long long long long long ptr) LockFileEx
514 stdcall LockResource(long) LockResource
515 stdcall MakeCriticalSectionGlobal(ptr) MakeCriticalSectionGlobal
516 register MapHInstLS() MapHInstLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment