[NETAPI32]
authorEric Kohl <eric.kohl@reactos.org>
Fri, 7 Jul 2017 17:59:14 +0000 (17:59 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 7 Jul 2017 17:59:14 +0000 (17:59 +0000)
- Add DsMergeForestTrustInformationW stub.
- Implement DsGetForestTrustInformationW.

[SDK/INCLUDE]
Add DsGetSiteNameA/W, DsGetForestTrustInformationW and DsMergeForestTrustInformationW prototypes to dsgetdc.h.

svn path=/trunk/; revision=75300

reactos/dll/win32/netapi32/netapi32.spec
reactos/dll/win32/netapi32/netlogon.c
reactos/sdk/include/psdk/dsgetdc.h

index becd474..619f76a 100644 (file)
 @ stub DsGetDcOpenW
 @ stdcall DsGetDcSiteCoverageA(str ptr str)
 @ stdcall DsGetDcSiteCoverageW(wstr ptr wstr)
-@ stub DsGetForestTrustInformationW
+@ stdcall DsGetForestTrustInformationW(wstr wstr long ptr)
 @ stdcall DsGetSiteNameA(str str)
 @ stdcall DsGetSiteNameW(wstr wstr)
-@ stub DsMergeForestTrustInformationW
+@ stdcall DsMergeForestTrustInformationW(wstr ptr ptr ptr)
 @ stub DsRoleAbortDownlevelServerUpgrade
 @ stub DsRoleCancel
 @ stub DsRoleDcAsDc
index 5acffd5..933e8f5 100644 (file)
@@ -170,8 +170,7 @@ DsEnumerateDomainTrustsA(
 {
     FIXME("DsEnumerateDomainTrustsA(%s, %x, %p, %p)\n",
           debugstr_a(ServerName), Flags, Domains, DomainCount);
-
-    return ERROR_NO_LOGON_SERVERS;
+    return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
 
@@ -185,8 +184,7 @@ DsEnumerateDomainTrustsW(
 {
     FIXME("DsEnumerateDomainTrustsW(%s, %x, %p, %p)\n",
           debugstr_w(ServerName), Flags, Domains, DomainCount);
-
-    return ERROR_NO_LOGON_SERVERS;
+    return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
 
@@ -203,7 +201,6 @@ DsGetDcNameA(
     FIXME("DsGetDcNameA(%s, %s, %s, %s, %08x, %p): stub\n",
           debugstr_a(ComputerName), debugstr_a(DomainName), debugstr_guid(DomainGuid),
           debugstr_a(SiteName), Flags, DomainControllerInfo);
-
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
@@ -250,7 +247,7 @@ DsGetDcSiteCoverageW(
     ULONG BufferSize, i;
     NET_API_STATUS status;
 
-    TRACE("DsGetDcSiteCoverageA(%s, %p, %p)\n",
+    TRACE("DsGetDcSiteCoverageW(%s, %p, %p)\n",
           debugstr_w(ServerName), EntryCount, SiteNames);
 
     *EntryCount = 0;
@@ -306,6 +303,37 @@ DsGetDcSiteCoverageW(
 }
 
 
+DWORD
+WINAPI
+DsGetForestTrustInformationW(
+    _In_opt_ LPCWSTR ServerName,
+    _In_opt_ LPCWSTR TrustedDomainName,
+    _In_ DWORD Flags,
+    _Out_ PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
+{
+    NET_API_STATUS status;
+
+    TRACE("DsGetForestTrustInformationW(%s, %s, 0x%08lx, %p)\n",
+          debugstr_w(ServerName), debugstr_w(TrustedDomainName),
+          Flags, ForestTrustInfo);
+
+    RpcTryExcept
+    {
+        status = DsrGetForestTrustInformation((PWSTR)ServerName,
+                                              (PWSTR)TrustedDomainName,
+                                              Flags,
+                                              ForestTrustInfo);
+    }
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
+
+    return status;
+}
+
+
 DWORD
 WINAPI
 DsGetSiteNameA(
@@ -344,6 +372,21 @@ DsGetSiteNameW(
 }
 
 
+DWORD
+WINAPI
+DsMergeForestTrustInformationW(
+    _In_ LPCWSTR DomainName,
+    _In_ PLSA_FOREST_TRUST_INFORMATION NewForestTrustInfo,
+    _In_opt_ PLSA_FOREST_TRUST_INFORMATION OldForestTrustInfo,
+    _Out_ PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
+{
+    FIXME("DsMergeForestTrustInformationW(%s, %p, %p, %p)\n",
+          debugstr_w(DomainName), NewForestTrustInfo,
+          OldForestTrustInfo, ForestTrustInfo);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+
 VOID
 WINAPI
 DsRoleFreeMemory(
index 253ee77..d55fe3a 100644 (file)
@@ -138,6 +138,34 @@ DsGetDcSiteCoverageW(
        PULONG EntryCount,
        LPWSTR **SiteNames);
 
+DWORD
+WINAPI
+DsGetForestTrustInformationW(
+       LPCWSTR ServerName,
+       LPCWSTR TrustedDomainName,
+       DWORD Flags,
+       PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
+
+DWORD
+WINAPI
+DsGetSiteNameA(
+       LPCSTR ComputerName,
+       LPSTR *SiteName);
+
+DWORD
+WINAPI
+DsGetSiteNameW(
+       LPCWSTR ComputerName,
+       LPWSTR *SiteName);
+
+DWORD
+WINAPI
+DsMergeForestTrustInformationW(
+       LPCWSTR DomainName,
+       PLSA_FOREST_TRUST_INFORMATION NewForestTrustInfo,
+       PLSA_FOREST_TRUST_INFORMATION OldForestTrustInfo,
+       PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
+
 #ifdef UNICODE
 typedef DOMAIN_CONTROLLER_INFOW DOMAIN_CONTROLLER_INFO, *PDOMAIN_CONTROLLER_INFO;
 typedef DS_DOMAIN_TRUSTSW DS_DOMAIN_TRUSTS, *PDS_DOMAIN_TRUSTS;
@@ -146,6 +174,7 @@ typedef DS_DOMAIN_TRUSTSW DS_DOMAIN_TRUSTS, *PDS_DOMAIN_TRUSTS;
 #define DsEnumerateDomainTrusts DsEnumerateDomainTrustsW
 #define DsGetDcName DsGetDcNameW
 #define DsGetDcSiteCoverage DsGetDcSiteCoverageW
+#define DsGetSiteName DsGetSiteNameW
 #else
 typedef DOMAIN_CONTROLLER_INFOA DOMAIN_CONTROLLER_INFO, *PDOMAIN_CONTROLLER_INFO;
 typedef DS_DOMAIN_TRUSTSA DS_DOMAIN_TRUSTS, *PDS_DOMAIN_TRUSTS;
@@ -154,6 +183,7 @@ typedef DS_DOMAIN_TRUSTSA DS_DOMAIN_TRUSTS, *PDS_DOMAIN_TRUSTS;
 #define DsEnumerateDomainTrusts DsEnumerateDomainTrustsA
 #define DsGetDcName DsGetDcNameA
 #define DsGetDcSiteCoverage DsGetDcSiteCoverageA
+#define DsGetSiteName DsGetSiteNameA
 #endif
 
 #ifdef __cplusplus