71 if (!Blob)
goto Quickie;
78 if (!NameCopy)
goto Quickie;
81 Blob->
Name = NameCopy;
112 while (Blob->AliasCount)
115 Dns_Free(Blob->Aliases[Blob->AliasCount]);
140 ULONG AliasCount = Blob->AliasCount;
142 ULONG AddressCount = 0, AddressSize = 0, TotalSize, NamePointerSize;
143 ULONG AliasPointerSize;
145 ULONG StringLength = 0;
147 ULONG HostentSize = 0;
150 PVOID CurrentAddress;
167 TotalSize = AddressSize * AddressCount;
168 NamePointerSize = AddressCount *
sizeof(
PVOID) +
sizeof(
PVOID);
177 StringType) + 1) & ~1;
181 for (
i = AliasCount;
i;
i--)
187 StringType) + 1) & ~1;
191 AliasPointerSize = AliasCount *
sizeof(
PVOID) +
sizeof(
PVOID);
194 HostentSize += TotalSize +
201 if (!BufferAllocated)
226 for (
i = 0;
i < AddressCount;
i++)
239 HostentPtr += AddressSize;
246 HostentPtr += 1 & ~1;
261 for (
i = AliasCount;
i;
i--)
264 HostentPtr += 1 & ~1;
279 if (!BufferAllocated)
282 *HostEntrySize = *BufferPosition - (
ULONG_PTR)HostentPtr;
308 if ((Blob->Name) && (Blob->AliasCount <= 8))
331 if (!Blob->DnsAddrArray)
374 DnsRecord = DnsRecord->pNext;
379 switch(DnsRecord->wType)
437 DnsRecord = DnsRecord->pNext;
451 ULONG ProcessedCount = 0;
457 LocalDnsRecord = DnsRecord;
458 while (LocalDnsRecord)
469 LocalDnsRecord = LocalDnsRecord->pNext;
521 if (!(DnsBlob->
Name) && (DoAliases) && (LocalDnsRecord))
525 LocalDnsRecord->pName,
554 LPWSTR LocalName, LocalNameCopy;
615 DnsBlob->
Name = LocalNameCopy;
PDNS_FAMILY_INFO WINAPI FamilyInfo_GetForFamily(IN WORD AddressFamily)
PVOID WINAPI DnsQueryConfigAllocEx(IN DNS_CONFIG_TYPE Config, OUT PVOID pBuffer, IN OUT PDWORD pBufferLength)
VOID WINAPI DnsApiFree(IN PVOID Data)
DNS_STATUS WINAPI DnsQuery_W(LPCWSTR Name, WORD Type, DWORD Options, PVOID Extra, PDNS_RECORD *QueryResultSet, PVOID *Reserved)
VOID WINAPI DnsRecordListFree(PDNS_RECORD list, DNS_FREE_TYPE type)
BOOL WINAPI DnsAddrArray_AddIp4(IN PDNS_ARRAY DnsAddrArray, IN IN_ADDR Address, IN DWORD AddressType)
BOOLEAN WINAPI DnsAddr_BuildFromDnsRecord(IN PDNS_RECORD DnsRecord, OUT PDNS_ADDRESS DnsAddr)
VOID WINAPI DnsAddrArray_Free(IN PDNS_ARRAY DnsAddrArray)
BOOL WINAPI DnsAddrArray_AddAddr(IN PDNS_ARRAY DnsAddrArray, IN PDNS_ADDRESS DnsAddress, IN WORD AddressFamily OPTIONAL, IN DWORD AddressType OPTIONAL)
PDNS_ARRAY WINAPI DnsAddrArray_Create(ULONG Count)
BOOLEAN WINAPI Dns_ReverseNameToDnsAddr_W(OUT PDNS_ADDRESS DnsAddr, IN LPWSTR Name)
ULONG WINAPI Dns_StringCopy(OUT PVOID Destination, IN OUT PULONG DestinationSize, IN PVOID String, IN ULONG StringSize OPTIONAL, IN DWORD InputType, IN DWORD OutputType)
PVOID WINAPI Dns_AllocZero(IN SIZE_T Size)
ULONG WINAPI Dns_GetBufferLengthForStringCopy(IN PVOID String, IN ULONG Size OPTIONAL, IN DWORD InputType, IN DWORD OutputType)
VOID WINAPI Dns_Free(IN PVOID Address)
LPWSTR WINAPI Dns_CreateStringCopy_W(IN LPWSTR Name)
PVOID WINAPI FlatBuf_Arg_Reserve(IN OUT PULONG_PTR Position, IN OUT PSIZE_T FreeSize, IN SIZE_T Size, IN ULONG Align)
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
PHOSTENT WINAPI Hostent_Init(IN PVOID *Buffer, IN WORD AddressFamily, IN ULONG AddressSize, IN ULONG AddressCount, IN ULONG AliasCount)
VOID WINAPI Hostent_ConvertToOffsets(IN PHOSTENT Hostent)
BOOL WINAPI DnsNameCompare_W(PCWSTR name1, PCWSTR name2)
_In_ NDIS_ERROR_CODE ErrorCode
IN PCO_ADDRESS_FAMILY AddressFamily
INT WINAPI SaBlob_WriteNameOrAlias(IN PDNS_BLOB Blob, IN LPWSTR String, IN BOOLEAN IsAlias)
PDNS_BLOB WINAPI SaBlob_CreateFromIp4(IN LPWSTR Name, IN ULONG Count, IN PIN_ADDR AddressArray)
INT WINAPI SaBlob_WriteAddress(IN PDNS_BLOB Blob, OUT PDNS_ADDRESS DnsAddr)
PDNS_BLOB WINAPI SaBlob_Query(IN LPWSTR Name, IN WORD DnsType, IN ULONG Flags, IN PVOID *Reserved, IN DWORD AddressFamily)
BOOLEAN WINAPI SaBlob_IsSupportedAddrType(WORD DnsType)
INT WINAPI SaBlob_WriteRecords(OUT PDNS_BLOB Blob, IN PDNS_RECORD DnsRecord, IN BOOLEAN DoAlias)
PVOID WINAPI FlatBuf_Arg_ReserveAlignPointer(IN PVOID Position, IN PSIZE_T FreeSize, IN SIZE_T Size)
PDNS_BLOB WINAPI SaBlob_Create(IN ULONG Count)
PDNS_BLOB WINAPI SaBlob_CreateFromRecords(IN PDNS_RECORD DnsRecord, IN BOOLEAN DoAliases, IN DWORD DnsType)
VOID WINAPI SaBlob_Free(IN PDNS_BLOB Blob)
PHOSTENT WINAPI SaBlob_CreateHostent(IN OUT PULONG_PTR BufferPosition, IN OUT PSIZE_T FreeBufferSpace, IN OUT PSIZE_T HostEntrySize, IN PDNS_BLOB Blob, IN DWORD StringType, IN BOOLEAN Relative, IN BOOLEAN BufferAllocated)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
DWORD WINAPI GetLastError(void)
_Reserved_ PVOID Reserved
@ DnsConfigFullHostName_W
#define DNS_INFO_NO_RECORDS
#define RPC_S_SERVER_UNAVAILABLE
_Must_inspect_result_ _In_ ULONG Flags