Author: ekohl
Date: Wed Jun 14 13:06:41 2017
New Revision: 75037
URL:
http://svn.reactos.org/svn/reactos?rev=75037&view=rev
Log:
[NETAPI32]
Implement NetEnumerateComputerNames. This function calls its counterpart in the
workstation service.
Modified:
trunk/reactos/dll/win32/netapi32/netapi32.spec
trunk/reactos/dll/win32/netapi32/wksta_new.c
Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Wed Jun 14 13:06:41 2017
@@ -139,7 +139,7 @@
@ stub NetDfsSetInfo
@ stub NetDfsSetSecurity
@ stub NetDfsSetStdContainerSecurity
-@ stub NetEnumerateComputerNames
+@ stdcall NetEnumerateComputerNames(wstr long long ptr ptr)
@ stdcall NetEnumerateTrustedDomains(wstr ptr)
@ stdcall NetErrorLogClear(wstr wstr ptr)
@ stdcall NetErrorLogRead(wstr wstr ptr long ptr long long ptr long ptr ptr)
Modified: trunk/reactos/dll/win32/netapi32/wksta_new.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta_n…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] Wed Jun 14 13:06:41 2017
@@ -167,6 +167,44 @@
(PWSTR)DomainAccount,
EncryptedPassword,
Reserved);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetEnumerateComputerNames(
+ _In_opt_ LPCWSTR Server,
+ _In_ NET_COMPUTER_NAME_TYPE NameType,
+ _In_ ULONG Reserved,
+ _Out_ PDWORD EntryCount,
+ _Out_ LPWSTR **ComputerNames)
+{
+ PNET_COMPUTER_NAME_ARRAY ComputerNameArray = NULL;
+ NET_API_STATUS status;
+
+ TRACE("NetEnumerateComputerNames(%s %lu %lu %p %p)\n",
+ debugstr_w(Server), NameType, Reserved, EntryCount, ComputerNames);
+
+ RpcTryExcept
+ {
+ status = NetrEnumerateComputerNames((PWSTR)Server,
+ NameType,
+ Reserved,
+ &ComputerNameArray);
+ if (status == NERR_Success)
+ {
+ *EntryCount = ComputerNameArray->EntryCount;
+ /* FIXME */
+ // *ComputerNames =
+ }
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{