wtsapi32: Implement WTSFreeMemory.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f297fd800b
commit
90681e3a76
|
@ -47,21 +47,21 @@ static void test_WTSEnumerateProcessesW(void)
|
||||||
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 1, 1, &info, &count);
|
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 1, 1, &info, &count);
|
||||||
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
||||||
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
||||||
if (info) WTSFreeMemory(info);
|
WTSFreeMemory(info);
|
||||||
|
|
||||||
info = NULL;
|
info = NULL;
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 0, &info, &count);
|
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 0, &info, &count);
|
||||||
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
||||||
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
||||||
if (info) WTSFreeMemory(info);
|
WTSFreeMemory(info);
|
||||||
|
|
||||||
info = NULL;
|
info = NULL;
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 2, &info, &count);
|
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 2, &info, &count);
|
||||||
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
||||||
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
||||||
if (info) WTSFreeMemory(info);
|
WTSFreeMemory(info);
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, NULL, &count);
|
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, NULL, &count);
|
||||||
|
@ -73,7 +73,7 @@ static void test_WTSEnumerateProcessesW(void)
|
||||||
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, NULL);
|
ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, NULL);
|
||||||
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
ok(!ret, "expected WTSEnumerateProcessesW to fail\n");
|
||||||
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
|
||||||
if (info) WTSFreeMemory(info);
|
WTSFreeMemory(info);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
info = NULL;
|
info = NULL;
|
||||||
|
@ -87,7 +87,7 @@ static void test_WTSEnumerateProcessesW(void)
|
||||||
}
|
}
|
||||||
todo_wine
|
todo_wine
|
||||||
ok(found || broken(!ret), "process name %s not found\n", wine_dbgstr_w(pname));
|
ok(found || broken(!ret), "process name %s not found\n", wine_dbgstr_w(pname));
|
||||||
if (info) WTSFreeMemory(info);
|
WTSFreeMemory(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST (wtsapi)
|
START_TEST (wtsapi)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wtsapi32.h"
|
#include "wtsapi32.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
#include "wine/heap.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
|
WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
|
||||||
|
|
||||||
|
@ -168,9 +169,7 @@ BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version,
|
||||||
*/
|
*/
|
||||||
void WINAPI WTSFreeMemory(PVOID pMemory)
|
void WINAPI WTSFreeMemory(PVOID pMemory)
|
||||||
{
|
{
|
||||||
static int once;
|
heap_free(pMemory);
|
||||||
|
|
||||||
if (!once++) FIXME("Stub %p\n", pMemory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************
|
/************************************************************
|
||||||
|
|
Loading…
Reference in New Issue