Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
793 B

  1. #include <nt.h>
  2. #include <ntrtl.h>
  3. #include <nturtl.h>
  4. #include <windows.h>
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <dnsapi.h>
  8. #include "..\dnslib.h"
  9. VOID
  10. PrintIpAddress (
  11. IN DWORD dwIpAddress )
  12. {
  13. printf( "%d.%d.%d.%d\n",
  14. ((BYTE *) &dwIpAddress)[0],
  15. ((BYTE *) &dwIpAddress)[1],
  16. ((BYTE *) &dwIpAddress)[2],
  17. ((BYTE *) &dwIpAddress)[3] );
  18. }
  19. _cdecl
  20. main(int argc, char **argv)
  21. {
  22. DWORD sysVersion;
  23. DWORD iter;
  24. DWORD Count;
  25. DNS_ADDRESS_INFO ipInfoArray[256];
  26. system( "pause" );
  27. for ( iter = 0; iter < 100000; iter++ )
  28. {
  29. Count = Dns_GetIpAddresses( ipInfoArray, 256 );
  30. }
  31. system( "pause" );
  32. return(0);
  33. }