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.

170 lines
3.5 KiB

  1. #pragma once
  2. #define UPGWIZ_VERSION 1
  3. #define DTF_ONE_SELECTION 0x0001
  4. #define DTF_REQUEST_TEXT 0x0002
  5. #define DTF_REQUEST_DESCRIPTION 0x0004
  6. #define DTF_REQUIRE_TEXT 0x000a
  7. #define DTF_REQUIRE_DESCRIPTION 0x0014
  8. #define DTF_NO_DATA_OBJECT 0x0020
  9. typedef struct {
  10. // filled in by the DLL
  11. DWORD Version;
  12. PCSTR Name;
  13. PCSTR Description;
  14. UINT DataTypeId;
  15. DWORD Flags;
  16. // if DTF_REQUEST_TEXT specified in Flags...
  17. UINT MaxTextSize;
  18. PCSTR OptionalDescTitle; OPTIONAL
  19. PCSTR OptionalTextTitle; OPTIONAL
  20. // wizard private use
  21. PVOID Reserved;
  22. } DATATYPE, *PDATATYPE;
  23. #define DOF_SELECTED 0x0001
  24. #define DOF_NO_SPLIT_ON_WACK 0x0002
  25. #define DOF_NO_SORT 0x0004
  26. typedef struct {
  27. // filled in by the DLL
  28. DWORD Version;
  29. PCSTR NameOrPath;
  30. PVOID DllParam; // for private use by the DLL
  31. // filled in by the DLL, altered by the wizard
  32. DWORD Flags;
  33. } DATAOBJECT, *PDATAOBJECT;
  34. typedef struct {
  35. // filled in by wizard, modified by optional UI page
  36. PBOOL StartOverFlag;
  37. // filled in by the wizard
  38. DWORD Version;
  39. PCSTR InboundInfDir;
  40. PCSTR OutboundDir;
  41. UINT DataTypeId;
  42. PCSTR OptionalText;
  43. PCSTR OptionalDescription;
  44. } OUTPUTARGS, *POUTPUTARGS;
  45. UINT
  46. GiveVersion (
  47. VOID
  48. );
  49. PDATATYPE
  50. GiveDataTypeList (
  51. OUT PUINT Count
  52. );
  53. PDATAOBJECT
  54. GiveDataObjectList (
  55. IN UINT DataTypeId,
  56. OUT PUINT Count
  57. );
  58. BOOL
  59. GenerateOutput (
  60. IN POUTPUTARGS Args
  61. );
  62. //
  63. // Routines in wiztools.dll
  64. //
  65. VOID
  66. WizToolsMain (
  67. IN DWORD dwReason
  68. );
  69. BOOL
  70. WizardWriteRealString (
  71. IN HANDLE File,
  72. IN PCSTR String
  73. );
  74. VOID
  75. GenerateUniqueStringSectKey (
  76. IN PCSTR TwoLetterId,
  77. OUT PSTR Buffer
  78. );
  79. BOOL
  80. WriteHeader (
  81. IN HANDLE File
  82. );
  83. BOOL
  84. WriteStringSectKey (
  85. IN HANDLE File,
  86. IN PCSTR KeyName,
  87. IN PCSTR String
  88. );
  89. BOOL
  90. WriteFileAttributes (
  91. IN POUTPUTARGS Args,
  92. IN PCSTR NonLocalizedName, OPTIONAL
  93. IN HANDLE FileHandle,
  94. IN PCSTR FileSpec,
  95. IN PCSTR Section OPTIONAL
  96. );
  97. BOOL
  98. GetFileAttributesLine (
  99. IN PCTSTR FileName,
  100. OUT PTSTR Buffer,
  101. IN DWORD BufferSize
  102. );
  103. BOOL
  104. WizardWriteInfString (
  105. IN HANDLE File,
  106. IN PCSTR String,
  107. IN BOOL Quoted,
  108. IN BOOL SkipCRLF,
  109. IN BOOL ReplaceSpace,
  110. IN CHAR SpaceReplacement,
  111. IN DWORD ColumnWidth
  112. );
  113. #define WizardWriteQuotedString(File,String) WizardWriteInfString(File,String,TRUE,FALSE,FALSE,0,0)
  114. #define WizardWriteQuotedColumn(File,String,ColW) WizardWriteInfString(File,String,TRUE,FALSE,FALSE,0,ColW)
  115. #define WizardWriteString(File,String) WizardWriteInfString(File,String,FALSE,FALSE,FALSE,0,0)
  116. #define WizardWriteColumn(File,String,ColW) WizardWriteInfString(File,String,FALSE,FALSE,FALSE,0,ColW)
  117. /* OvidiuT */
  118. #ifdef UPGWIZ4FLOPPY
  119. extern OSVERSIONINFOA g_OsInfo;
  120. extern PTSTR g_WinDir;
  121. extern PTSTR g_SystemDir;
  122. extern HANDLE g_hHeap;
  123. #define g_OsInfo Get_g_OsInfo()
  124. #define g_WinDir Get_g_WinDir()
  125. #define g_SystemDir Get_g_SystemDir()
  126. #define g_hHeap Get_g_hHeap()
  127. OSVERSIONINFOA Get_g_OsInfo (VOID);
  128. PCTSTR Get_g_WinDir (VOID);
  129. PCTSTR Get_g_SystemDir (VOID);
  130. HANDLE Get_g_hHeap(VOID);
  131. #endif // UPGWIZ4FLOPPY