shlwapi: Fixed swapped argument order in SHLWAPI_DupSharedHandle command.
This commit is contained in:
parent
cad3e3e5dc
commit
5e4f15db1f
|
@ -106,7 +106,7 @@ static HANDLE SHLWAPI_DupSharedHandle(HANDLE hShared, DWORD dwDstProcId,
|
||||||
if (hSrc)
|
if (hSrc)
|
||||||
{
|
{
|
||||||
/* Make handle available to dest process */
|
/* Make handle available to dest process */
|
||||||
if (!DuplicateHandle(hDst, hShared, hSrc, &hRet,
|
if (!DuplicateHandle(hSrc, hShared, hDst, &hRet,
|
||||||
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS))
|
||||||
hRet = NULL;
|
hRet = NULL;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
|
||||||
TRACE("(%p %d)\n", hShared, dwProcId);
|
TRACE("(%p %d)\n", hShared, dwProcId);
|
||||||
|
|
||||||
/* Get handle to shared memory for current process */
|
/* Get handle to shared memory for current process */
|
||||||
hDup = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
hDup = SHLWAPI_DupSharedHandle(hShared, GetCurrentProcessId(), dwProcId,
|
||||||
FILE_MAP_ALL_ACCESS, 0);
|
FILE_MAP_ALL_ACCESS, 0);
|
||||||
/* Get View */
|
/* Get View */
|
||||||
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
||||||
|
@ -252,7 +252,7 @@ BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
|
||||||
TRACE("(%p %d)\n", hShared, dwProcId);
|
TRACE("(%p %d)\n", hShared, dwProcId);
|
||||||
|
|
||||||
/* Get a copy of the handle for our process, closing the source handle */
|
/* Get a copy of the handle for our process, closing the source handle */
|
||||||
hClose = SHLWAPI_DupSharedHandle(hShared, dwProcId, GetCurrentProcessId(),
|
hClose = SHLWAPI_DupSharedHandle(hShared, GetCurrentProcessId(), dwProcId,
|
||||||
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);
|
||||||
/* Close local copy */
|
/* Close local copy */
|
||||||
return CloseHandle(hClose);
|
return CloseHandle(hClose);
|
||||||
|
|
|
@ -505,16 +505,13 @@ static void test_alloc_shared(int argc, char **argv)
|
||||||
if (hmem2)
|
if (hmem2)
|
||||||
{
|
{
|
||||||
p = pSHLockShared(hmem2, procid);
|
p = pSHLockShared(hmem2, procid);
|
||||||
todo_wine
|
|
||||||
ok(p != NULL,"SHLockShared failed: %u\n", GetLastError());
|
ok(p != NULL,"SHLockShared failed: %u\n", GetLastError());
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
ok(p->value == 0xDEADBEEF, "Wrong value in shared memory: %d instead of %d\n", p->value, 0xDEADBEEF);
|
ok(p->value == 0xDEADBEEF, "Wrong value in shared memory: %d instead of %d\n", p->value, 0xDEADBEEF);
|
||||||
ret = pSHUnlockShared(p);
|
ret = pSHUnlockShared(p);
|
||||||
todo_wine
|
|
||||||
ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
|
ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
|
||||||
|
|
||||||
ret = pSHFreeShared(hmem2, procid);
|
ret = pSHFreeShared(hmem2, procid);
|
||||||
todo_wine
|
|
||||||
ok(ret, "SHFreeShared failed: %u\n", GetLastError());
|
ok(ret, "SHFreeShared failed: %u\n", GetLastError());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue