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.

82 lines
1.5 KiB

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