Source code of Windows XP (NT5)
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.

47 lines
795 B

  1. /*++
  2. Copyright (C) 1998 Microsoft Corporation
  3. Abstract:
  4. Test the DS routines for memory, handle leaks.
  5. Author:
  6. Ramesh V (05/18/1998)
  7. Environment:
  8. User mode only.
  9. --*/
  10. #include <windows.h>
  11. #include <dhcpapi.h>
  12. #include <dsauth.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <wchar.h>
  16. #include <winsock.h>
  17. void _cdecl main(void) {
  18. char buf[1000];
  19. DWORD IpAddress, Error;
  20. printf("What is the IP address to validate for? :");
  21. scanf("%s", buf);
  22. IpAddress = inet_addr(buf);
  23. while(1) {
  24. Error = DhcpDSValidateServer(
  25. NULL,
  26. ntohl(IpAddress),
  27. NULL,
  28. NULL,
  29. 0
  30. );
  31. printf(" DhcpDSValidateServer returned %ld\n", Error);
  32. Sleep(25*1000);
  33. }
  34. }