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.

79 lines
1.4 KiB

  1. //
  2. // hwcompp.h
  3. //
  4. //
  5. // Include the interface exported in miglib.lib:
  6. //
  7. #include "miglib.h"
  8. #undef HASHTABLE
  9. //
  10. // Enumeration tracking macros
  11. //
  12. #ifdef DEBUG
  13. INT g_EnumsActive;
  14. INT g_NetEnumsActive;
  15. #define START_ENUM g_EnumsActive++
  16. #define END_ENUM g_EnumsActive--
  17. #define START_NET_ENUM g_NetEnumsActive++
  18. #define END_NET_ENUM g_NetEnumsActive--
  19. #else
  20. #define START_ENUM
  21. #define END_ENUM
  22. #define START_NET_ENUM
  23. #define END_NET_ENUM
  24. #endif
  25. //
  26. // Hardware ID tables
  27. //
  28. extern HASHTABLE g_NeededHardwareIds;
  29. extern HASHTABLE g_UiSuppliedIds;
  30. //
  31. // GrowBuffer access
  32. //
  33. #define GETPNPIDTEXT(offset) ((PCTSTR) (g_PnpIdText.Buf + offset))
  34. #define GETINFFILENAME(offset) ((PCTSTR) (g_InfFileName.Buf + offset))
  35. //
  36. // Typedefs
  37. //
  38. typedef struct {
  39. HANDLE File;
  40. HASHITEM InfFileOffset;
  41. BOOL UnsupportedDevice;
  42. } SAVE_ENUM_PARAMS, *PSAVE_ENUM_PARAMS;
  43. //
  44. // Constants
  45. //
  46. #define STATE_ENUM_FIRST_KEY 0
  47. #define STATE_ENUM_NEXT_KEY 1
  48. #define STATE_ENUM_FIRST_VALUE 2
  49. #define STATE_ENUM_NEXT_VALUE 3
  50. #define STATE_EVALUATE_VALUE 4
  51. #define STATE_VALUE_CLEANUP 5
  52. #define STATE_ENUM_CHECK_KEY 6
  53. #define STATE_ENUM_FIRST_HARDWARE 0
  54. #define STATE_ENUM_NEXT_HARDWARE 1
  55. #define STATE_EVALUATE_HARDWARE 2
  56. #define ENUM_USER_SUPPLIED_FLAG_NEEDED (ENUM_WANT_USER_SUPPLIED_FLAG|ENUM_WANT_USER_SUPPLIED_ONLY|ENUM_DONT_WANT_USER_SUPPLIED)
  57. #define MAX_PNP_ID 1024
  58. #define HWCOMPDAT_SIGNATURE "HwCompDat-v2"