#ifndef _DNSRSLVR_PCH_ #define _DNSRSLVR_PCH_ #include #include #define WIN32_NO_STATUS #define _INC_WINDOWS #define COM_NO_WINDOWS_H #include #include #include #include #include #include #include #define NTOS_MODE_USER #include #include #include #include typedef struct _RESOLVER_CACHE_ENTRY { LIST_ENTRY CacheLink; BOOL bHostsFileEntry; PDNS_RECORDW Record; } RESOLVER_CACHE_ENTRY, *PRESOLVER_CACHE_ENTRY; typedef struct _RESOLVER_CACHE { LIST_ENTRY RecordList; CRITICAL_SECTION Lock; } RESOLVER_CACHE, *PRESOLVER_CACHE; /* cache.c */ VOID DnsIntCacheInitialize(VOID); VOID DnsIntCacheRemoveEntryItem(PRESOLVER_CACHE_ENTRY CacheEntry); VOID DnsIntCacheFree(VOID); #define CACHE_FLUSH_HOSTS_FILE_ENTRIES 0x00000001 #define CACHE_FLUSH_NON_HOSTS_FILE_ENTRIES 0x00000002 #define CACHE_FLUSH_ALL 0x00000003 DNS_STATUS DnsIntCacheFlush( _In_ ULONG ulFlags); DNS_STATUS DnsIntCacheGetEntryByName( LPCWSTR Name, WORD wType, DWORD dwFlags, PDNS_RECORDW *Record); VOID DnsIntCacheAddEntry( _In_ PDNS_RECORDW Record, _In_ BOOL bHostsFileEntry); BOOL DnsIntCacheRemoveEntryByName( _In_ LPCWSTR Name); DNS_STATUS DnsIntCacheGetEntries( _Out_ DNS_CACHE_ENTRY **ppCacheEntries); /* hostsfile.c */ BOOL ReadHostsFile(VOID); #endif /* _DNSRSLVR_PCH_ */