[NETAPI32] Implement DsGetDcNameA/W --> DsGetDcNameWithAccountA/W --> DsrGetDcNameEx2.

This commit is contained in:
Eric Kohl 2018-11-25 22:39:47 +01:00
parent e397003617
commit 57d48a7f1c
2 changed files with 107 additions and 9 deletions

View file

@ -10,8 +10,8 @@
@ stub DsGetDcCloseW
@ stdcall DsGetDcNameA(str str ptr str long ptr)
@ stdcall DsGetDcNameW(wstr wstr ptr wstr long ptr)
@ stub DsGetDcNameWithAccountA
@ stub DsGetDcNameWithAccountW
@ stdcall DsGetDcNameWithAccountA(str str long str ptr str long ptr)
@ stdcall DsGetDcNameWithAccountW(wstr wstr long wstr ptr wstr long ptr)
@ stub DsGetDcNextA
@ stub DsGetDcNextW
@ stub DsGetDcOpenA

View file

@ -17,6 +17,30 @@
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
DWORD
WINAPI
DsGetDcNameWithAccountA(
_In_opt_ LPCSTR ComputerName,
_In_opt_ LPCSTR AccountName,
_In_ ULONG AccountControlBits,
_In_ LPCSTR DomainName,
_In_ GUID *DomainGuid,
_In_ LPCSTR SiteName,
_In_ ULONG Flags,
_Out_ PDOMAIN_CONTROLLER_INFOA *DomainControllerInfo);
DWORD
WINAPI
DsGetDcNameWithAccountW(
_In_ LPCWSTR ComputerName,
_In_opt_ LPCWSTR AccountName,
_In_ ULONG AccountControlBits,
_In_ LPCWSTR DomainName,
_In_ GUID *DomainGuid,
_In_ LPCWSTR SiteName,
_In_ ULONG Flags,
_Out_ PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
/* FUNCTIONS *****************************************************************/
handle_t
@ -360,34 +384,108 @@ DsEnumerateDomainTrustsW(
DWORD
WINAPI
DsGetDcNameA(
_In_ LPCSTR ComputerName,
_In_opt_ LPCSTR ComputerName,
_In_ LPCSTR DomainName,
_In_ GUID *DomainGuid,
_In_ LPCSTR SiteName,
_In_ ULONG Flags,
_Out_ PDOMAIN_CONTROLLER_INFOA *DomainControllerInfo)
{
FIXME("DsGetDcNameA(%s, %s, %s, %s, %08x, %p): stub\n",
TRACE("DsGetDcNameA(%s, %s, %s, %s, %08lx, %p): stub\n",
debugstr_a(ComputerName), debugstr_a(DomainName), debugstr_guid(DomainGuid),
debugstr_a(SiteName), Flags, DomainControllerInfo);
return DsGetDcNameWithAccountA(ComputerName,
NULL,
0,
DomainName,
DomainGuid,
SiteName,
Flags,
DomainControllerInfo);
}
DWORD
WINAPI
DsGetDcNameW(
_In_opt_ LPCWSTR ComputerName,
_In_ LPCWSTR DomainName,
_In_ GUID *DomainGuid,
_In_ LPCWSTR SiteName,
_In_ ULONG Flags,
_Out_ PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo)
{
TRACE("DsGetDcNameW(%s, %s, %s, %s, %08lx, %p)\n",
debugstr_w(ComputerName), debugstr_w(DomainName), debugstr_guid(DomainGuid),
debugstr_w(SiteName), Flags, DomainControllerInfo);
return DsGetDcNameWithAccountW(ComputerName,
NULL,
0,
DomainName,
DomainGuid,
SiteName,
Flags,
DomainControllerInfo);
}
DWORD
WINAPI
DsGetDcNameWithAccountA(
_In_opt_ LPCSTR ComputerName,
_In_opt_ LPCSTR AccountName,
_In_ ULONG AccountControlBits,
_In_ LPCSTR DomainName,
_In_ GUID *DomainGuid,
_In_ LPCSTR SiteName,
_In_ ULONG Flags,
_Out_ PDOMAIN_CONTROLLER_INFOA *DomainControllerInfo)
{
FIXME("DsGetDcNameWithAccountA(%s, %s, %08lx, %s, %s, %s, %08lx, %p): stub\n",
debugstr_a(ComputerName), debugstr_a(AccountName), AccountControlBits,
debugstr_a(DomainName), debugstr_guid(DomainGuid),
debugstr_a(SiteName), Flags, DomainControllerInfo);
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD
WINAPI
DsGetDcNameW(
_In_ LPCWSTR ComputerName,
DsGetDcNameWithAccountW(
_In_opt_ LPCWSTR ComputerName,
_In_opt_ LPCWSTR AccountName,
_In_ ULONG AccountControlBits,
_In_ LPCWSTR DomainName,
_In_ GUID *DomainGuid,
_In_ LPCWSTR SiteName,
_In_ ULONG Flags,
_Out_ PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo)
{
FIXME("DsGetDcNameW(%s, %s, %s, %s, %08x, %p)\n",
debugstr_w(ComputerName), debugstr_w(DomainName), debugstr_guid(DomainGuid),
NET_API_STATUS status;
FIXME("DsGetDcNameWithAccountW(%s, %s, %08lx, %s, %s, %s, %08lx, %p): stub\n",
debugstr_w(ComputerName), debugstr_w(AccountName), AccountControlBits,
debugstr_w(DomainName), debugstr_guid(DomainGuid),
debugstr_w(SiteName), Flags, DomainControllerInfo);
return ERROR_CALL_NOT_IMPLEMENTED;
RpcTryExcept
{
status = DsrGetDcNameEx2((PWSTR)ComputerName,
(PWSTR)AccountName,
AccountControlBits,
(PWSTR)DomainName,
DomainGuid,
(PWSTR)SiteName,
Flags,
DomainControllerInfo);
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{
status = I_RpcMapWin32Status(RpcExceptionCode());
}
RpcEndExcept;
return status;
}