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

/*++
Copyright (C) 1998 Microsoft Corporation
Abstract:
Test the DS routines for memory, handle leaks.
Author:
Ramesh V (05/18/1998)
Environment:
User mode only.
--*/
#include <windows.h>
#include <dhcpapi.h>
#include <dsauth.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <winsock.h>
void _cdecl main(void) {
char buf[1000];
DWORD IpAddress, Error;
printf("What is the IP address to validate for? :");
scanf("%s", buf);
IpAddress = inet_addr(buf);
while(1) {
Error = DhcpDSValidateServer(
NULL,
ntohl(IpAddress),
NULL,
NULL,
0
);
printf(" DhcpDSValidateServer returned %ld\n", Error);
Sleep(25*1000);
}
}