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.

47 lines
1.1 KiB

  1. #include <nt.h>
  2. #include <ntrtl.h>
  3. #include <nturtl.h>
  4. #include <windows.h>
  5. #include <winsock.h>
  6. #include <nspapi.h>
  7. #include <wsipx.h>
  8. #include <svcguid.h>
  9. #include <nspapi.h>
  10. #include <stdio.h>
  11. #include <stdlib.h>
  12. #include <rpc.h>
  13. #include <rpcdce.h>
  14. _cdecl
  15. main(int argc, char **argv)
  16. {
  17. WSADATA wsaData;
  18. BYTE AddrBuffer[1000];
  19. DWORD AddrBufLen = 1000;
  20. LPCSADDR_INFO lpCSAddrInfo = (LPCSADDR_INFO) AddrBuffer;
  21. GUID ServiceType = SVCID_NAMESERVER_UDP;
  22. DWORD err;
  23. WSAStartup( MAKEWORD(1, 1), &wsaData );
  24. err = GetAddressByName( 0,
  25. &ServiceType,
  26. NULL,
  27. NULL,
  28. 0,
  29. NULL,
  30. lpCSAddrInfo,
  31. &AddrBufLen,
  32. NULL,
  33. NULL );
  34. if ( err <= 0 )
  35. return INVALID_SOCKET;
  36. WSACleanup();
  37. return( 0 );
  38. }