3axap
asked on
flushdns
I need to clear the DNS cache and I don't want to use "ipconfig /flushdns".
It looks like dnsapi.dll can be used for that but I can't find any Delphi code example.
Below is a C language example.
I'd like to have the same function for Delphi 7.
Thanks.
It looks like dnsapi.dll can be used for that but I can't find any Delphi code example.
Below is a C language example.
I'd like to have the same function for Delphi 7.
Thanks.
BOOL DnsFlushResolverCache()
{
BOOL (WINAPI *DoDnsFlushResolverCache)();
*(FARPROC *)&DoDnsFlushResolverCache = GetProcAddress(LoadLibrary("dnsapi.dll"), "DnsFlushResolverCache");
if(!DoDnsFlushResolverCache) return FALSE;
return DoDnsFlushResolverCache();
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.