16#include "netlogon_c.h"
55 TRACE(
"LOGONSRV_HANDLE_bind() called\n");
65 TRACE(
"RpcStringBindingCompose returned 0x%x\n",
status);
74 TRACE(
"RpcBindingFromStringBinding returned 0x%x\n",
status);
95 TRACE(
"LOGONSRV_HANDLE_unbind() called\n");
123 TRACE(
"DsAddressToSiteNamesA(%s, %lu, %p, %p)\n",
124 debugstr_a(ComputerName), EntryCount, SocketAddresses, SiteNames);
129 if (ComputerName !=
NULL)
132 if (pComputerNameW ==
NULL)
149 for (
i = 0;
i < EntryCount;
i++)
151 if (pSiteNamesW[
i] !=
NULL)
168 for (
i = 0;
i < EntryCount;
i++)
170 if (pSiteNamesW[
i] !=
NULL)
172 pSiteNamesA[
i] =
Ptr;
193 *SiteNames = pSiteNamesA;
197 if (pSiteNamesA !=
NULL)
200 if (pSiteNamesW !=
NULL)
203 if (pComputerNameW !=
NULL)
223 TRACE(
"DsAddressToSiteNamesW(%s, %lu, %p, %p)\n",
224 debugstr_w(ComputerName), EntryCount, SocketAddresses, SiteNames);
257 SiteNamesBuffer[
i] =
Ptr;
265 *SiteNames = SiteNamesBuffer;
300 TRACE(
"DsAddressToSiteNamesExA(%s, %lu, %p, %p, %p)\n",
301 debugstr_a(ComputerName), EntryCount, SocketAddresses,
302 SiteNames, SubnetNames);
307 if (ComputerName !=
NULL)
310 if (pComputerNameW ==
NULL)
328 for (
i = 0;
i < EntryCount;
i++)
330 if (pSiteNamesW[
i] !=
NULL)
347 for (
i = 0;
i < EntryCount;
i++)
349 if (pSiteNamesW[
i] !=
NULL)
351 pSiteNamesA[
i] =
Ptr;
374 for (
i = 0;
i < EntryCount;
i++)
376 if (pSubnetNamesW[
i] !=
NULL)
393 for (
i = 0;
i < EntryCount;
i++)
395 if (pSubnetNamesW[
i] !=
NULL)
397 pSubnetNamesA[
i] =
Ptr;
418 *SiteNames = pSiteNamesA;
419 *SubnetNames = pSubnetNamesA;
421 pSubnetNamesA =
NULL;
424 if (pSubnetNamesA !=
NULL)
427 if (pSiteNamesA !=
NULL)
430 if (pSubnetNamesW !=
NULL)
433 if (pSiteNamesW !=
NULL)
436 if (pComputerNameW !=
NULL)
454 ULONG SiteNameBufferSize, SubnetNameBufferSize,
i;
457 TRACE(
"DsAddressToSiteNamesExW(%s, %lu, %p, %p, %p)\n",
458 debugstr_w(ComputerName), EntryCount, SocketAddresses,
459 SiteNames, SubnetNames);
492 ZeroMemory(SiteNamesBuffer, SiteNameBufferSize);
497 SiteNamesBuffer[
i] =
Ptr;
505 *SiteNames = SiteNamesBuffer;
511 ZeroMemory(SubnetNamesBuffer, SubnetNameBufferSize);
516 SubnetNamesBuffer[
i] =
Ptr;
524 *SubnetNames = SubnetNamesBuffer;
554 TRACE(
"DsDeregisterDnsHostRecordsA(%s, %s, %p, %p, %s)\n",
556 DomainGuid, DsaGuid,
debugstr_a(DnsHostName));
558 if (ServerName !=
NULL)
561 if (pServerNameW ==
NULL)
568 if (DnsDomainName !=
NULL)
571 if (pDnsDomainNameW ==
NULL)
579 if (pDnsHostNameW ==
NULL)
592 if (pDnsHostNameW !=
NULL)
595 if (pDnsDomainNameW !=
NULL)
598 if (pServerNameW !=
NULL)
616 TRACE(
"DsDeregisterDnsHostRecordsW(%s, %s, %p, %p, %s)\n",
618 DomainGuid, DsaGuid,
debugstr_w(DnsHostName));
656 TRACE(
"DsEnumerateDomainTrustsA(%s, %x, %p, %p)\n",
659 if (ServerName !=
NULL)
662 if (pServerNameW ==
NULL)
677 for (
i = 0;
i < *DomainCount;
i++)
680 pDomainsW[
i].NetbiosDomainName);
683 if (pDomainsW[
i].DnsDomainName !=
NULL)
686 pDomainsW[
i].DnsDomainName);
699 for (
i = 0;
i < *DomainCount;
i++)
703 pDomainsW[
i].NetbiosDomainName);
720 if (pDomainsW[
i].DnsDomainName !=
NULL)
724 pDomainsW[
i].DnsDomainName);
752 pDomainsW[
i].DomainSid);
763 &pDomainsW[
i].DomainGuid,
767 *Domains = pDomainsA;
771 if (pDomainsA !=
NULL)
774 if (pDomainsW !=
NULL)
777 if (pServerNameW !=
NULL)
795 TRACE(
"DsEnumerateDomainTrustsW(%s, %x, %p, %p)\n",
805 *Domains = DomainsArray.
Domains;
829 TRACE(
"DsGetDcNameA(%s, %s, %s, %s, %08lx, %p): stub\n",
839 DomainControllerInfo);
853 TRACE(
"DsGetDcNameW(%s, %s, %s, %s, %08lx, %p)\n",
863 DomainControllerInfo);
890 TRACE(
"DsGetDcNameWithAccountA(%s, %s, %08lx, %s, %s, %s, %08lx, %p): stub\n",
895 if (ComputerName !=
NULL)
898 if (pComputerNameW ==
NULL)
905 if (AccountName !=
NULL)
908 if (pAccountNameW ==
NULL)
916 if (pDomainNameW ==
NULL)
923 if (pSiteNameW ==
NULL)
936 &pDomainControllerInfoW);
980 pDomainControllerInfoA->
Flags = pDomainControllerInfoW->
Flags;
1106 *DomainControllerInfo = pDomainControllerInfoA;
1107 pDomainControllerInfoA =
NULL;
1110 if (pDomainControllerInfoA !=
NULL)
1113 if (pDomainControllerInfoW !=
NULL)
1116 if (pSiteNameW !=
NULL)
1119 if (pDomainNameW !=
NULL)
1122 if (pAccountNameW !=
NULL)
1125 if (pComputerNameW !=
NULL)
1146 TRACE(
"DsGetDcNameWithAccountW(%s, %s, %08lx, %s, %s, %s, %08lx, %p): stub\n",
1160 DomainControllerInfo);
1189 TRACE(
"DsGetDcSiteCoverageA(%s, %p, %p)\n",
1190 debugstr_a(ServerName), EntryCount, SiteNames);
1192 if (ServerName !=
NULL)
1195 if (pServerNameW ==
NULL)
1209 for (
i = 0;
i < *EntryCount;
i++)
1222 for (
i = 0;
i < *EntryCount;
i++)
1224 pSiteNamesA[
i] =
Ptr;
1245 *SiteNames = pSiteNamesA;
1252 if (pSiteNamesW !=
NULL)
1255 if (pServerNameW !=
NULL)
1274 TRACE(
"DsGetDcSiteCoverageW(%s, %p, %p)\n",
1275 debugstr_w(ServerName), EntryCount, SiteNames);
1304 SiteNamesBuffer[
i] =
Ptr;
1313 *SiteNames = SiteNamesBuffer;
1340 TRACE(
"DsGetForestTrustInformationW(%s, %s, 0x%08lx, %p)\n",
1342 Flags, ForestTrustInfo);
1347 (
PWSTR)TrustedDomainName,
1371 TRACE(
"DsGetSiteNameA(%s, %p)\n",
1374 if (ComputerName !=
NULL)
1377 if (pComputerNameW ==
NULL)
1390 if (*SiteName ==
NULL)
1396 if (pSiteNameW !=
NULL)
1399 if (pComputerNameW !=
NULL)
1414 TRACE(
"DsGetSiteNameW(%s, %p)\n",
1440 FIXME(
"DsMergeForestTrustInformationW(%s, %p, %p, %p)\n",
1442 OldForestTrustInfo, ForestTrustInfo);
1452 FIXME(
"DsValidateSubnetNameA(%s)\n",
1463 FIXME(
"DsValidateSubnetNameW(%s)\n",
1478 TRACE(
"NetEnumerateTrustedDomains(%s, %p)\n",
1508 TRACE(
"NetGetAnyDCName(%s, %s, %p)\n",
1539 FIXME(
"NetGetDCName(%s, %s, %p)\n",
1551 &pDomainControllerInfo);
1565 FIXME(
"Not implemented yet!\n");
1570 if (pDomainControllerInfo !=
NULL)
1586 TRACE(
"NetLogonGetTimeServiceParentDomain(%s, %p, %p)\n",
1587 debugstr_w(ServerName), DomainName, PdcSameSite);
1614 TRACE(
"NetLogonSetServiceBits(%s 0x%lx 0x%lx)\n",
1615 debugstr_w(ServerName), ServiceBitsOfInterest, ServiceBits);
1620 ServiceBitsOfInterest,
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
NTSTATUS __stdcall NetrLogonSetServiceBits(_In_opt_ LOGONSRV_HANDLE ServerName, _In_ DWORD ServiceBitsOfInterest, _In_ DWORD ServiceBits)
NET_API_STATUS __stdcall DsrGetForestTrustInformation(_In_opt_ LOGONSRV_HANDLE ServerName, _In_opt_ wchar_t *TrustedDomainName, _In_ DWORD Flags, _Out_ PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
NET_API_STATUS __stdcall DsrAddressToSiteNamesW(_In_opt_ LOGONSRV_HANDLE ComputerName, _In_ DWORD EntryCount, _In_ PNL_SOCKET_ADDRESS SocketAddresses, _Out_ PNL_SITE_NAME_ARRAY *SiteNames)
NTSTATUS __stdcall NetrEnumerateTrustedDomains(_In_opt_ LOGONSRV_HANDLE ServerName, _Out_ PDOMAIN_NAME_BUFFER DomainNameBuffer)
NET_API_STATUS __stdcall DsrAddressToSiteNamesExW(_In_opt_ LOGONSRV_HANDLE ComputerName, _In_ DWORD EntryCount, _In_ PNL_SOCKET_ADDRESS SocketAddresses, _Out_ PNL_SITE_NAME_EX_ARRAY *SiteNames)
NET_API_STATUS __stdcall DsrGetSiteName(_In_opt_ LOGONSRV_HANDLE ComputerName, _Out_ wchar_t **SiteName)
NET_API_STATUS __stdcall DsrGetDcSiteCoverageW(_In_opt_ LOGONSRV_HANDLE ServerName, _Out_ PNL_SITE_NAME_ARRAY *SiteNames)
NET_API_STATUS __stdcall DsrGetDcNameEx2(_In_opt_ LOGONSRV_HANDLE ComputerName, _In_opt_ wchar_t *AccountName, _In_ ULONG AllowableAccountControlBits, _In_opt_ wchar_t *DomainName, _In_opt_ GUID *DomainGuid, _In_opt_ wchar_t *SiteName, _In_ ULONG Flags, _Out_ PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo)
NET_API_STATUS __stdcall DsrDeregisterDnsHostRecords(_In_opt_ LOGONSRV_HANDLE ServerName, _In_opt_ wchar_t *DnsDomainName, _In_opt_ GUID *DomainGuid, _In_opt_ GUID *DsaGuid, _In_ wchar_t *DnsHostName)
NET_API_STATUS __stdcall DsrEnumerateDomainTrusts(_In_opt_ LOGONSRV_HANDLE ServerName, _In_ ULONG Flags, _Out_ PNETLOGON_TRUSTED_DOMAIN_ARRAY Domains)
NET_API_STATUS __stdcall NetrGetAnyDCName(_In_opt_ LOGONSRV_HANDLE ServerName, _In_opt_ wchar_t *DomainName, _Out_ wchar_t **Buffer)
NET_API_STATUS __stdcall NetrLogonGetTimeServiceParentDomain(_In_opt_ LOGONSRV_HANDLE ServerName, _Out_ wchar_t **DomainName, _Out_ int *PdcSameSite)
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD ByteCount, LPVOID *Buffer)
PWSTR WINAPI NetpAllocWStrFromAnsiStr(_In_ PSTR InString)
PSTR WINAPI NetpAllocAnsiStrFromWStr(_In_ PWSTR InString)
DWORD WINAPI DsGetDcSiteCoverageW(_In_opt_ LPCWSTR ServerName, _Out_ PULONG EntryCount, _Out_ LPWSTR **SiteNames)
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 DsGetForestTrustInformationW(_In_opt_ LPCWSTR ServerName, _In_opt_ LPCWSTR TrustedDomainName, _In_ DWORD Flags, _Out_ PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo)
DWORD WINAPI DsDeregisterDnsHostRecordsW(_In_opt_ LPWSTR ServerName, _In_opt_ LPWSTR DnsDomainName, _In_opt_ GUID *DomainGuid, _In_opt_ GUID *DsaGuid, _In_ LPWSTR DnsHostName)
DWORD WINAPI DsAddressToSiteNamesExA(_In_opt_ LPCSTR ComputerName, _In_ DWORD EntryCount, _In_ PSOCKET_ADDRESS SocketAddresses, _Out_ LPSTR **SiteNames, _Out_ LPSTR **SubnetNames)
DWORD WINAPI DsValidateSubnetNameW(_In_ LPCWSTR SubnetName)
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)
NTSTATUS WINAPI NetLogonSetServiceBits(_In_ LPWSTR ServerName, _In_ DWORD ServiceBitsOfInterest, _In_ DWORD ServiceBits)
DWORD WINAPI DsValidateSubnetNameA(_In_ LPCSTR SubnetName)
DWORD WINAPI DsGetDcNameA(_In_opt_ LPCSTR ComputerName, _In_ LPCSTR DomainName, _In_ GUID *DomainGuid, _In_ LPCSTR SiteName, _In_ ULONG Flags, _Out_ PDOMAIN_CONTROLLER_INFOA *DomainControllerInfo)
NTSTATUS WINAPI NetEnumerateTrustedDomains(_In_ LPWSTR ServerName, _Out_ LPWSTR *DomainNames)
DWORD WINAPI DsAddressToSiteNamesExW(_In_opt_ LPCWSTR ComputerName, _In_ DWORD EntryCount, _In_ PSOCKET_ADDRESS SocketAddresses, _Out_ LPWSTR **SiteNames, _Out_ LPWSTR **SubnetNames)
DWORD WINAPI DsEnumerateDomainTrustsW(_In_opt_ LPWSTR ServerName, _In_ ULONG Flags, _Out_ PDS_DOMAIN_TRUSTSW *Domains, _Out_ PULONG DomainCount)
DWORD WINAPI DsDeregisterDnsHostRecordsA(_In_opt_ LPSTR ServerName, _In_opt_ LPSTR DnsDomainName, _In_opt_ GUID *DomainGuid, _In_opt_ GUID *DsaGuid, _In_ LPSTR DnsHostName)
NET_API_STATUS WINAPI NetLogonGetTimeServiceParentDomain(_In_ LPWSTR ServerName, _Out_ LPWSTR *DomainName, _Out_ LPBOOL PdcSameSite)
DWORD WINAPI DsGetSiteNameW(_In_opt_ LPCWSTR ComputerName, _Out_ LPWSTR *SiteName)
NET_API_STATUS WINAPI NetGetAnyDCName(_In_opt_ LPCWSTR ServerName, _In_opt_ LPCWSTR DomainName, _Out_ LPBYTE *BufPtr)
DWORD WINAPI DsAddressToSiteNamesW(_In_opt_ LPCWSTR ComputerName, _In_ DWORD EntryCount, _In_ PSOCKET_ADDRESS SocketAddresses, _Out_ LPWSTR **SiteNames)
handle_t __RPC_USER LOGONSRV_HANDLE_bind(LOGONSRV_HANDLE pszSystemName)
DWORD WINAPI DsGetSiteNameA(_In_opt_ LPCSTR ComputerName, _Out_ LPSTR *SiteName)
DWORD WINAPI DsGetDcSiteCoverageA(_In_opt_ LPCSTR ServerName, _Out_ PULONG EntryCount, _Out_ LPSTR **SiteNames)
DWORD WINAPI DsEnumerateDomainTrustsA(_In_opt_ LPSTR ServerName, _In_ ULONG Flags, _Out_ PDS_DOMAIN_TRUSTSA *Domains, _Out_ PULONG DomainCount)
NET_API_STATUS WINAPI NetGetDCName(_In_opt_ LPCWSTR ServerName, _In_opt_ LPCWSTR DomainName, _Out_ LPBYTE *BufPtr)
DWORD WINAPI 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)
DWORD WINAPI DsGetDcNameW(_In_opt_ LPCWSTR ComputerName, _In_ LPCWSTR DomainName, _In_ GUID *DomainGuid, _In_ LPCWSTR SiteName, _In_ ULONG Flags, _Out_ PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo)
DWORD WINAPI DsAddressToSiteNamesA(_In_opt_ LPCSTR ComputerName, _In_ DWORD EntryCount, _In_ PSOCKET_ADDRESS SocketAddresses, _Out_ LPSTR **SiteNames)
void __RPC_USER LOGONSRV_HANDLE_unbind(LOGONSRV_HANDLE pszSystemName, handle_t hBinding)
struct _DOMAIN_CONTROLLER_INFOA DOMAIN_CONTROLLER_INFOA
struct _DS_DOMAIN_TRUSTSA DS_DOMAIN_TRUSTSA
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define EXCEPTION_EXECUTE_HANDLER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSYSAPI BOOLEAN WINAPI RtlCopySid(DWORD, PSID, PSID)
void __RPC_USER MIDL_user_free(void *p)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
wchar_t * LOGONSRV_HANDLE
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define RpcExceptionCode()
LPSTR DomainControllerName
ULONG DomainControllerAddressType
LPSTR DomainControllerAddress
LPWSTR DomainControllerName
LPWSTR DomainControllerAddress
ULONG DomainControllerAddressType
PDS_DOMAIN_TRUSTSW Domains
PRPC_UNICODE_STRING SiteNames
PRPC_UNICODE_STRING SiteNames
PRPC_UNICODE_STRING SubnetNames
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ ULONG Flags
#define RtlUnicodeStringToAnsiSize(String)