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.

159 lines
2.2 KiB

  1. #ifndef _DNINF_
  2. #define _DNINF_
  3. //
  4. // returns a handle to use for further inf parsing
  5. //
  6. int
  7. DnInitINFBuffer (
  8. IN FILE *InfFileHandle,
  9. OUT PVOID *pINFHandle,
  10. OUT unsigned *LineNumber
  11. );
  12. //
  13. // frees an INF Buffer
  14. //
  15. int
  16. DnFreeINFBuffer (
  17. IN PVOID INFHandle
  18. );
  19. //
  20. // searches for the existance of a particular section
  21. //
  22. BOOLEAN
  23. DnSearchINFSection (
  24. IN PVOID INFHandle,
  25. IN PCHAR SectionName
  26. );
  27. //
  28. // given section name, line number and index return the value.
  29. //
  30. PCHAR
  31. DnGetSectionLineIndex (
  32. IN PVOID INFHandle,
  33. IN PCHAR SectionName,
  34. IN unsigned LineIndex,
  35. IN unsigned ValueIndex
  36. );
  37. //
  38. // given section name, key searches existance
  39. //
  40. BOOLEAN
  41. DnGetSectionKeyExists (
  42. IN PVOID INFHandle,
  43. IN PCHAR SectionName,
  44. IN PCHAR Key
  45. );
  46. //
  47. // given section name, entry searches existance as key or first value
  48. //
  49. BOOLEAN
  50. DnGetSectionEntryExists (
  51. IN PVOID INFHandle,
  52. IN PCHAR SectionName,
  53. IN PCHAR Entry
  54. );
  55. //
  56. // given section name, key and index return the value
  57. //
  58. PCHAR
  59. DnGetSectionKeyIndex (
  60. IN PVOID INFHandle,
  61. IN PCHAR SectionName,
  62. IN PCHAR Key,
  63. IN unsigned ValueIndex
  64. );
  65. //
  66. // given section name and line index, return key
  67. //
  68. PCHAR
  69. DnGetKeyName (
  70. IN PVOID INFHandle,
  71. IN PCHAR SectionName,
  72. IN unsigned LineIndex
  73. );
  74. //
  75. // Return a handle to a new INF handle
  76. //
  77. PVOID
  78. DnNewSetupTextFile (
  79. VOID
  80. );
  81. //
  82. // Write an Inf file to disk
  83. //
  84. BOOLEAN
  85. DnWriteSetupTextFile (
  86. IN PVOID INFHandle,
  87. IN PCHAR FileName
  88. );
  89. //
  90. // Add a line to a section in the
  91. // inf file
  92. //
  93. VOID
  94. DnAddLineToSection (
  95. IN PVOID INFHandle,
  96. IN PCHAR SectionName,
  97. IN PCHAR KeyName,
  98. IN PCHAR Values[],
  99. IN ULONG ValueCount
  100. );
  101. //
  102. // Get the next section name in the inf file
  103. //
  104. PCHAR
  105. DnGetSectionName (
  106. IN PVOID INFHandle
  107. );
  108. //
  109. // Copy a section from one inf to another inf
  110. //
  111. VOID
  112. DnCopySetupTextSection (
  113. IN PVOID FromInf,
  114. IN PVOID ToInf,
  115. IN PCHAR SectionName
  116. );
  117. #endif // _DNINF