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.

37 lines
910 B

  1. #include <precomp.h>
  2. #include "ErrCtrl.h"
  3. #include "wzcutil.h"
  4. // "wzctool e"; args = ""
  5. // prints the list of GUIDs for the detectected adapters
  6. void cmdE(int argc, char *argv[])
  7. {
  8. DWORD rpcStatus = RPC_S_OK;
  9. INTFS_KEY_TABLE IntfsTable;
  10. printf("Calling into WZCEnumInterfaces.\n");
  11. IntfsTable.dwNumIntfs = 0;
  12. IntfsTable.pIntfs = NULL;
  13. rpcStatus = WZCEnumInterfaces(NULL, &IntfsTable);
  14. if (rpcStatus != RPC_S_OK)
  15. {
  16. printf("call failed with rpcStatus=%d.\n", rpcStatus);
  17. }
  18. else
  19. {
  20. UINT i;
  21. // print GUIDs
  22. for (i = 0; i < IntfsTable.dwNumIntfs; i++)
  23. {
  24. printf("%d\t%S\n", i, IntfsTable.pIntfs[i].wszGuid);
  25. // free the GUID after being printed
  26. RpcFree(IntfsTable.pIntfs[i].wszGuid);
  27. }
  28. // free table of pointers to GUIDs
  29. RpcFree(IntfsTable.pIntfs);
  30. }
  31. }