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.

116 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. MySetup.h
  6. Abstract:
  7. USBMON setupapi header file
  8. --*/
  9. #ifndef MYSETUPAPI_H
  10. #define MYSETUPAPI_H
  11. #include <setupapi.h>
  12. #include <cfgmgr32.h> // For dot4 pnp reenumeration code.
  13. typedef
  14. (WINAPI * pfSetupDiDestroyDeviceInfoList)(
  15. IN HDEVINFO DeviceInfoSet
  16. );
  17. typedef
  18. HDEVINFO
  19. (WINAPI * pfSetupDiGetClassDevs)(
  20. IN LPGUID ClassGuid, OPTIONAL
  21. IN PCTSTR Enumerator, OPTIONAL
  22. IN HWND hwndParent, OPTIONAL
  23. IN DWORD Flags
  24. );
  25. typedef
  26. BOOL
  27. (WINAPI * pfSetupDiEnumDeviceInfo)(
  28. IN HDEVINFO DeviceInfoSet,
  29. IN DWORD MemberIndex,
  30. OUT PSP_DEVINFO_DATA DeviceInfoData
  31. );
  32. typedef
  33. BOOL
  34. (WINAPI * pfSetupDiEnumDeviceInterfaces)(
  35. IN HDEVINFO DeviceInfoSet,
  36. IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
  37. IN CONST GUID *InterfaceClassGuid,
  38. IN DWORD MemberIndex,
  39. OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData
  40. );
  41. typedef
  42. BOOL
  43. (WINAPI * pfSetupDiGetDeviceInterfaceDetail)(
  44. IN HDEVINFO DeviceInfoSet,
  45. IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
  46. #ifdef UNICODE
  47. OUT PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData, OPTIONAL
  48. #else
  49. OUT PSP_DEVICE_INTERFACE_DETAIL_DATA_A DeviceInterfaceDetailData, OPTIONAL
  50. #endif
  51. IN DWORD DeviceInterfaceDetailDataSize,
  52. OUT PDWORD RequiredSize, OPTIONAL
  53. OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  54. );
  55. typedef
  56. HKEY
  57. (WINAPI * pfSetupDiOpenDeviceInterfaceRegKey)(
  58. IN HDEVINFO DeviceInfoSet,
  59. IN PSP_DEVICE_INTERFACE_DATA pDeviceInterface,
  60. IN DWORD Reserved,
  61. IN REGSAM samDesired
  62. );
  63. typedef struct _SETUPAPI_INFO {
  64. HMODULE hSetupApi;
  65. pfSetupDiGetClassDevs GetClassDevs;
  66. pfSetupDiDestroyDeviceInfoList DestroyDeviceInfoList;
  67. pfSetupDiEnumDeviceInfo EnumDeviceInfo;
  68. pfSetupDiEnumDeviceInterfaces EnumDeviceInterfaces;
  69. pfSetupDiGetDeviceInterfaceDetail GetDeviceInterfaceDetail;
  70. pfSetupDiOpenDeviceInterfaceRegKey OpenDeviceInterfaceRegKey;
  71. } SETUPAPI_INFO, *PSETUPAPI_INFO;
  72. // For dot4 pnp reenumeration code.
  73. typedef
  74. CONFIGRET
  75. (WINAPI * pfCM_Locate_DevNode_Ex)(
  76. OUT PDEVINST pdnDevInst,
  77. #ifdef UNICODE
  78. IN DEVINSTID_W pDeviceID, OPTIONAL
  79. #else
  80. IN DEVINSTID_A pDeviceID, OPTIONAL
  81. #endif
  82. IN ULONG ulFlags,
  83. IN HMACHINE hMachine
  84. );
  85. typedef
  86. CONFIGRET
  87. (WINAPI * pfCM_Reenumerate_DevNode_Ex)(
  88. IN DEVINST dnDevInst,
  89. IN ULONG ulFlags,
  90. IN HMACHINE hMachine
  91. );
  92. #endif