add_library(wtsapi32 SHARED ${SOURCE})
set_module_type(wtsapi32 win32dll)
target_link_libraries(wtsapi32 wine)
-add_importlibs(wtsapi32 msvcrt kernel32 ntdll)
+add_importlibs(wtsapi32 advapi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET wtsapi32 DESTINATION reactos/system32 FOR all)
#include "wine/winternl.h"
#include "wtsapi32.h"
#include "wine/debug.h"
+#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
*/
void WINAPI WTSFreeMemory(PVOID pMemory)
{
- HeapFree(GetProcessHeap(), 0, pMemory);
+ heap_free(pMemory);
}
/************************************************************
FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
Buffer, BytesReturned);
+ if (WTSInfoClass == WTSUserName)
+ {
+ WCHAR *username;
+ DWORD count = 0;
+
+ GetUserNameW(NULL, &count);
+ if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) return FALSE;
+ if (!(username = heap_alloc(count * sizeof(WCHAR)))) return FALSE;
+ GetUserNameW(username, &count);
+ *Buffer = username;
+ *BytesReturned = count * sizeof(WCHAR);
+ return TRUE;
+ }
return FALSE;
}
reactos/dll/win32/wmiutils # Synced to WineStaging-3.3
reactos/dll/win32/wmvcore # Synced to WineStaging-3.9
reactos/dll/win32/wshom.ocx # Synced to WineStaging-3.3
-reactos/dll/win32/wtsapi32 # Synced to WineStaging-3.3
+reactos/dll/win32/wtsapi32 # Synced to WineStaging-3.9
reactos/dll/win32/wuapi # Synced to WineStaging-3.3
reactos/dll/win32/xinput1_1 # Synced to WineStaging-2.9
reactos/dll/win32/xinput1_2 # Synced to WineStaging-2.9