Author: ekohl Date: Fri Jul 7 17:59:14 2017 New Revision: 75300 URL: http://svn.reactos.org/svn/reactos?rev=75300&view=rev Log: [NETAPI32] - Add DsMergeForestTrustInformationW stub. - Implement DsGetForestTrustInformationW.
[SDK/INCLUDE] Add DsGetSiteNameA/W, DsGetForestTrustInformationW and DsMergeForestTrustInformationW prototypes to dsgetdc.h. Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/dll/win32/netapi32/netlogon.c trunk/reactos/sdk/include/psdk/dsgetdc.h Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi32.spec?rev=75300&r1=75299&r2=75300&view=diff ============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Fri Jul 7 17:59:14 2017 @@ -18,10 +18,10 @@ @ 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 Modified: trunk/reactos/dll/win32/netapi32/netlogon.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netlogon.c?rev=75300&r1=75299&r2=75300&view=diff ============================================================================== --- trunk/reactos/dll/win32/netapi32/netlogon.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netlogon.c [iso-8859-1] Fri Jul 7 17:59:14 2017 @@ -170,8 +170,7 @@ { 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 @@ { 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 @@ 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 @@ 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; @@ -308,6 +305,37 @@ 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( _In_ LPCSTR ComputerName, _Out_ LPSTR *SiteName) @@ -341,6 +369,21 @@ RpcEndExcept; return status; +} + + +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; } Modified: trunk/reactos/sdk/include/psdk/dsgetdc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/dsgetdc.h?rev=75300&r1=75299&r2=75300&view=diff ============================================================================== --- trunk/reactos/sdk/include/psdk/dsgetdc.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/dsgetdc.h [iso-8859-1] Fri Jul 7 17:59:14 2017 @@ -138,6 +138,34 @@ 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 @@ #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 @@ #define DsEnumerateDomainTrusts DsEnumerateDomainTrustsA #define DsGetDcName DsGetDcNameA #define DsGetDcSiteCoverage DsGetDcSiteCoverageA +#define DsGetSiteName DsGetSiteNameA #endif #ifdef __cplusplus