shlwapi: Fix swapped argument order in SHMapHandle.

This commit is contained in:
Sebastian Lackner 2014-10-02 14:43:33 +02:00 committed by Alexandre Julliard
parent ef065486dd
commit c95b182d15
2 changed files with 3 additions and 7 deletions

View File

@ -265,8 +265,8 @@ BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
*
* PARAMS
* hShared [I] Shared memory handle to duplicate
* dwDstProcId [I] ID of the process wanting the duplicated handle
* dwSrcProcId [I] ID of the process owning hShared
* dwDstProcId [I] ID of the process wanting the duplicated handle
* dwAccess [I] Desired DuplicateHandle() access
* dwOptions [I] Desired DuplicateHandle() options
*
@ -275,7 +275,7 @@ BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
* Failure: A NULL handle.
*
*/
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwDstProcId, DWORD dwSrcProcId,
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId,
DWORD dwAccess, DWORD dwOptions)
{
HANDLE hRet;

View File

@ -548,28 +548,24 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem)
/* It seems like Windows Vista/2008 uses a different internal implementation
* for shared memory, and calling SHMapHandle fails with ERROR_INVALID_HANDLE. */
todo_wine
ok(hmem2 != NULL || broken(hmem2 == NULL && GetLastError() == ERROR_INVALID_HANDLE),
"SHMapHandle failed: %u\n", GetLastError());
if (hmem2 == NULL && GetLastError() == ERROR_INVALID_HANDLE)
{
skip("Subprocess failed to map shared memory, skipping test\n");
win_skip("Subprocess failed to map shared memory, skipping test\n");
return;
}
p = pSHLockShared(hmem2, GetCurrentProcessId());
todo_wine
ok(p != NULL, "SHLockShared failed: %u\n", GetLastError());
if (p != NULL)
ok(p->value == 0x12345679, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345679);
ret = pSHUnlockShared(p);
todo_wine
ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
ret = pSHFreeShared(hmem2, GetCurrentProcessId());
todo_wine
ok(ret, "SHFreeShared failed: %u\n", GetLastError());
}