https://git.reactos.org/?p=reactos.git;a=commitdiff;h=324afc252cef7c2b9a316…
commit 324afc252cef7c2b9a316b37dbbf34a01c7d2b46
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Aug 25 18:23:38 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Aug 25 18:23:38 2019 +0200
[NETAPI32] Implement DsEnumerateDomainTrustsW
---
dll/win32/netapi32/netlogon.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/dll/win32/netapi32/netlogon.c b/dll/win32/netapi32/netlogon.c
index 293b482aee5..8a03e887b19 100644
--- a/dll/win32/netapi32/netlogon.c
+++ b/dll/win32/netapi32/netlogon.c
@@ -657,9 +657,30 @@ DsEnumerateDomainTrustsW(
_Out_ PDS_DOMAIN_TRUSTSW *Domains,
_Out_ PULONG DomainCount)
{
- FIXME("DsEnumerateDomainTrustsW(%s, %x, %p, %p)\n",
+ NETLOGON_TRUSTED_DOMAIN_ARRAY DomainsArray = {0, NULL};
+ NET_API_STATUS status;
+
+ TRACE("DsEnumerateDomainTrustsW(%s, %x, %p, %p)\n",
debugstr_w(ServerName), Flags, Domains, DomainCount);
- return ERROR_CALL_NOT_IMPLEMENTED;
+
+ RpcTryExcept
+ {
+ status = DsrEnumerateDomainTrusts(ServerName,
+ Flags,
+ &DomainsArray);
+ if (status == NERR_Success)
+ {
+ *Domains = DomainsArray.Domains;
+ *DomainCount = DomainsArray.DomainCount;
+ }
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
}