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.

174 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. sptxtfil.h
  5. Abstract:
  6. Public header file for text file functions in text setup.
  7. Author:
  8. Ted Miller (tedm) 29-July-1993
  9. Revision History:
  10. --*/
  11. #ifndef _SPTXTFIL_DEFN_
  12. #define _SPTXTFIL_DEFN_
  13. #define DBLSPACE_SECTION L"DBLSPACE_SECTION"
  14. NTSTATUS
  15. SpLoadSetupTextFile(
  16. IN PWCHAR Filename,
  17. IN PVOID Image, OPTIONAL
  18. IN ULONG ImageSize, OPTIONAL
  19. OUT PVOID *Handle,
  20. OUT PULONG ErrorLine,
  21. IN BOOLEAN ClearScreen,
  22. IN BOOLEAN ScreenNotReady
  23. );
  24. BOOLEAN
  25. SpFreeTextFile(
  26. IN PVOID Handle
  27. );
  28. BOOLEAN
  29. SpSearchTextFileSection( // searches for the existance of a section
  30. IN PVOID Handle,
  31. IN PWCHAR SectionName
  32. );
  33. ULONG
  34. SpCountLinesInSection( // count # lines in section; 0 if no such section
  35. IN PVOID Handle,
  36. IN PWCHAR SectionName
  37. );
  38. ULONG
  39. SpGetKeyIndex(
  40. IN PVOID Handle,
  41. IN PWCHAR SectionName,
  42. IN PWCHAR KeyName
  43. );
  44. PWCHAR
  45. SpGetSectionLineIndex( // given section name, line number and index return the value.
  46. IN PVOID Handle,
  47. IN LPCWSTR SectionName,
  48. IN ULONG LineIndex,
  49. IN ULONG ValueIndex
  50. );
  51. BOOLEAN
  52. SpGetSectionKeyExists( // given section name, key searches existance
  53. IN PVOID Handle,
  54. IN PWCHAR SectionName,
  55. IN PWCHAR Key
  56. );
  57. PWCHAR
  58. SpGetSectionKeyIndex( // given section name, key and index return the value
  59. IN PVOID Handle,
  60. IN PWCHAR Section,
  61. IN PWCHAR Key,
  62. IN ULONG ValueIndex
  63. );
  64. PWCHAR
  65. SpGetKeyName( // given section name and line index, return key
  66. IN PVOID Handle,
  67. IN LPCWSTR SectionName,
  68. IN ULONG LineIndex
  69. );
  70. PWSTR
  71. SpGetKeyNameByValue( // given section name and value, return key
  72. IN PVOID Inf,
  73. IN PWSTR SectionName,
  74. IN PWSTR Value
  75. );
  76. ULONG
  77. SpCountSectionsInFile( // count # sections in file;
  78. IN PVOID Handle
  79. );
  80. PWSTR
  81. SpGetSectionName( // given section index, return section name
  82. IN PVOID Handle,
  83. IN ULONG Index
  84. );
  85. VOID
  86. SpProcessForStringSubs(
  87. IN PVOID SifHandle,
  88. IN LPCWSTR StringIn,
  89. OUT LPWSTR StringOut,
  90. IN ULONG BufferSizeChars
  91. );
  92. PVOID
  93. SpNewSetupTextFile(
  94. VOID
  95. );
  96. VOID
  97. SpAddLineToSection(
  98. IN PVOID Handle,
  99. IN PWSTR SectionName,
  100. IN PWSTR KeyName, OPTIONAL
  101. IN PWSTR Values[],
  102. IN ULONG ValueCount
  103. );
  104. NTSTATUS
  105. SpWriteSetupTextFile(
  106. IN PVOID Handle,
  107. IN PWSTR FilenamePart1,
  108. IN PWSTR FilenamePart2, OPTIONAL
  109. IN PWSTR FilenamePart3 OPTIONAL
  110. );
  111. NTSTATUS
  112. SpProcessAddRegSection(
  113. IN PVOID SifHandle,
  114. IN LPCWSTR SectionName,
  115. IN HANDLE HKLM_SYSTEM,
  116. IN HANDLE HKLM_SOFTWARE,
  117. IN HANDLE HKCU,
  118. IN HANDLE HKR
  119. );
  120. NTSTATUS
  121. SpProcessDelRegSection(
  122. IN PVOID SifHandle,
  123. IN LPCWSTR SectionName,
  124. IN HANDLE HKLM_SYSTEM,
  125. IN HANDLE HKLM_SOFTWARE,
  126. IN HANDLE HKCU,
  127. IN HANDLE HKR
  128. );
  129. BOOLEAN
  130. pSpIsFileInPrivateInf(
  131. IN PCWSTR FileName
  132. );
  133. BOOLEAN
  134. SpNonZeroValuesInSection(
  135. PVOID Handle,
  136. PCWSTR SectionName,
  137. ULONG ValueIndex
  138. );
  139. #endif // ndef _SPTXTFIL_DEFN_