From d144147237622e4e6d63cf450d2d9c1af3502dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 3 Jun 2017 20:26:26 +0000 Subject: [PATCH] [NTDLL][USER32]: Stub out two APIs that are called by Win32 dlls: - ntdll.dll: RtlConvertUiListToApiList(), which is a helper used by netapi32.dll; - user32.dll: GetWinStationInfo() (that just calls into win32k), which is called by e.g. winmm.dll . svn path=/trunk/; revision=74803 --- reactos/dll/ntdll/CMakeLists.txt | 1 + reactos/dll/ntdll/def/ntdll.spec | 2 +- reactos/dll/ntdll/rtl/uilist.c | 40 +++++++++++++++++++++++ reactos/win32ss/user/user32/misc/winsta.c | 10 ++++++ reactos/win32ss/user/user32/user32.spec | 2 +- 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 reactos/dll/ntdll/rtl/uilist.c diff --git a/reactos/dll/ntdll/CMakeLists.txt b/reactos/dll/ntdll/CMakeLists.txt index 3483aace0e5..aefdaf5c400 100644 --- a/reactos/dll/ntdll/CMakeLists.txt +++ b/reactos/dll/ntdll/CMakeLists.txt @@ -20,6 +20,7 @@ list(APPEND SOURCE ldr/ldrpe.c ldr/ldrutils.c rtl/libsupp.c + rtl/uilist.c rtl/version.c etw/trace.c include/ntdll.h) diff --git a/reactos/dll/ntdll/def/ntdll.spec b/reactos/dll/ntdll/def/ntdll.spec index d55c41fe303..5c54b4c8e5a 100644 --- a/reactos/dll/ntdll/def/ntdll.spec +++ b/reactos/dll/ntdll/def/ntdll.spec @@ -502,7 +502,7 @@ 501 stdcall RtlConvertSharedToExclusive(ptr) 502 stdcall RtlConvertSidToUnicodeString(ptr ptr long) 503 stdcall RtlConvertToAutoInheritSecurityObject(ptr ptr ptr ptr long ptr) -# stdcall RtlConvertUiListToApiList +504 stdcall RtlConvertUiListToApiList(ptr ptr long) 505 stdcall -arch=win32 -ret64 RtlConvertUlongToLargeInteger(long) 506 stdcall RtlCopyLuid(ptr ptr) 507 stdcall RtlCopyLuidAndAttributesArray(long ptr ptr) diff --git a/reactos/dll/ntdll/rtl/uilist.c b/reactos/dll/ntdll/rtl/uilist.c new file mode 100644 index 00000000000..3c78cb55e8c --- /dev/null +++ b/reactos/dll/ntdll/rtl/uilist.c @@ -0,0 +1,40 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS NT User-Mode DLL + * FILE: lib/ntdll/rtl/uilist.c + * PURPOSE: RTL UI to API network computers list conversion. + * Helper for NETAPI32.DLL + * PROGRAMMERS: Hermes Belusca-Maito + */ + +/* INCLUDES *****************************************************************/ + +#include + +#define NDEBUG +#include + +/* FUNCTIONS ***************************************************************/ + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +RtlConvertUiListToApiList( + IN PUNICODE_STRING UiList, + OUT PUNICODE_STRING ApiList, + IN BOOLEAN SpaceAsSeparator) +{ + DPRINT1("RtlConvertUiListToApiList(%wZ, 0x%p, %s) called\n", + UiList, &ApiList, SpaceAsSeparator ? "true" : "false"); + UNIMPLEMENTED; + /* + * Experiments show that returning a success code but setting the + * ApiList length to zero is better than returning a failure code. + */ + RtlInitEmptyUnicodeString(ApiList, NULL, 0); + return STATUS_SUCCESS; +} + +/* EOF */ diff --git a/reactos/win32ss/user/user32/misc/winsta.c b/reactos/win32ss/user/user32/misc/winsta.c index f416dd117f7..a5ecc5cd629 100644 --- a/reactos/win32ss/user/user32/misc/winsta.c +++ b/reactos/win32ss/user/user32/misc/winsta.c @@ -285,6 +285,16 @@ EnumWindowStationsW(WINSTAENUMPROCW EnumFunc, } +/* + * @unimplemented on Win32k side + */ +BOOL WINAPI +GetWinStationInfo(PVOID pUnknown) +{ + return (BOOL)NtUserCallOneParam((DWORD_PTR)pUnknown, ONEPARAM_ROUTINE_GETWINSTAINFO); +} + + /* * @implemented */ diff --git a/reactos/win32ss/user/user32/user32.spec b/reactos/win32ss/user/user32/user32.spec index 179fc179245..79c0693ac96 100644 --- a/reactos/win32ss/user/user32/user32.spec +++ b/reactos/win32ss/user/user32/user32.spec @@ -366,7 +366,7 @@ 363 stdcall GetUserObjectInformationA(long long ptr long ptr) 364 stdcall GetUserObjectInformationW(long long ptr long ptr) NtUserGetObjectInformation 365 stdcall GetUserObjectSecurity (long ptr ptr long ptr) -# GetWinStationInfo +366 stdcall GetWinStationInfo(ptr) 367 stdcall GetWindow(long long) 368 stdcall GetWindowContextHelpId(long) 369 stdcall GetWindowDC(long) NtUserGetWindowDC