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.

166 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. hwdbp.h
  5. Abstract:
  6. Module's private definitions.
  7. Author:
  8. Ovidiu Temereanca (ovidiut) 11-Jul-2000 Initial implementation
  9. Revision History:
  10. --*/
  11. #include "migshared.h"
  12. #include "hwdb.h"
  13. #include <infstr.h>
  14. #include <strsafe.h>
  15. typedef struct {
  16. HASHTABLE InfFileTable;
  17. HASHTABLE PnpIdTable;
  18. HASHTABLE UnsupPnpIdTable;
  19. DWORD Checksum;
  20. } HWDB, *PHWDB;
  21. BOOL
  22. HwdbpInitialized (
  23. VOID
  24. );
  25. BOOL
  26. HwdbpInitialize (
  27. VOID
  28. );
  29. VOID
  30. HwdbpTerminate (
  31. VOID
  32. );
  33. PHWDB
  34. HwdbpOpen (
  35. IN PCSTR DatabaseFile
  36. );
  37. BOOL
  38. HwdbpClose (
  39. IN HANDLE Hwdb
  40. );
  41. BOOL
  42. HwdbpAppendInfs (
  43. IN HANDLE Hwdb,
  44. IN PCSTR SourceDirectory,
  45. IN HWDBAPPENDINFSCALLBACKA Callback, OPTIONAL
  46. IN PVOID CallbackContext, OPTIONAL
  47. IN BOOL CallbackIsUnicode
  48. );
  49. BOOL
  50. HwdbpAppendDatabase (
  51. IN HANDLE HwdbTarget,
  52. IN HANDLE HwdbSource
  53. );
  54. BOOL
  55. HwdbpFlush (
  56. IN HANDLE Hwdb,
  57. IN PCSTR OutputFile
  58. );
  59. BOOL
  60. HwdbpHasDriver (
  61. IN HANDLE Hwdb,
  62. IN PCSTR PnpId,
  63. OUT PBOOL Unsupported
  64. );
  65. BOOL
  66. HwdbpHasAnyDriver (
  67. IN HANDLE Hwdb,
  68. IN PCSTR PnpIds,
  69. OUT PBOOL Unsupported
  70. );
  71. BOOL
  72. HwpAddPnpIdsInInf (
  73. IN PCSTR InfPath,
  74. IN OUT PHWDB Hwdb,
  75. IN PCSTR SourceDirectory,
  76. IN PCSTR InfFilename,
  77. IN HWDBAPPENDINFSCALLBACKA Callback, OPTIONAL
  78. IN PVOID CallbackContext, OPTIONAL
  79. IN BOOL CallbackIsUnicode
  80. );
  81. #if 0
  82. BOOL
  83. HwdbpEnumeratePnpIdA (
  84. IN PHWDB Hwdb,
  85. IN PHWDBENUM_CALLBACKA EnumCallback,
  86. IN PVOID UserContext
  87. );
  88. BOOL
  89. HwdbpEnumeratePnpIdW (
  90. IN PHWDB Hwdb,
  91. IN PHWDBENUM_CALLBACKW EnumCallback,
  92. IN PVOID UserContext
  93. );
  94. #endif
  95. typedef struct {
  96. HANDLE File;
  97. GROWBUFFER GrowBuf;
  98. } HWDBINF_ENUM_INTERNAL, *PHWDBINF_ENUM_INTERNAL;
  99. BOOL
  100. HwdbpEnumFirstInfA (
  101. OUT PHWDBINF_ENUMA EnumPtr,
  102. IN PCSTR DatabaseFile
  103. );
  104. BOOL
  105. HwdbpEnumFirstInfW (
  106. OUT PHWDBINF_ENUMW EnumPtr,
  107. IN PCSTR DatabaseFile
  108. );
  109. BOOL
  110. HwdbpEnumNextInfA (
  111. IN OUT PHWDBINF_ENUMA EnumPtr
  112. );
  113. BOOL
  114. HwdbpEnumNextInfW (
  115. IN OUT PHWDBINF_ENUMW EnumPtr
  116. );
  117. VOID
  118. HwdbpAbortEnumInfA (
  119. IN OUT PHWDBINF_ENUMA EnumPtr
  120. );
  121. VOID
  122. HwdbpAbortEnumInfW (
  123. IN OUT PHWDBINF_ENUMW EnumPtr
  124. );
  125. BOOL
  126. HwdbpSetTempDir (
  127. IN PCSTR TempDir
  128. );