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.

162 lines
3.4 KiB

  1. //
  2. // Function prototypes
  3. //
  4. LPSTR
  5. CombinePaths(
  6. IN LPCSTR ParentPath,
  7. IN LPCSTR ChildPath,
  8. OUT LPSTR TargetPath
  9. );
  10. BOOL
  11. MyGetFileVersion(
  12. IN LPCSTR FileName,
  13. OUT DWORDLONG *Version
  14. );
  15. BOOL
  16. ConvertVersionStringToQuad(
  17. IN LPCSTR lpFileVersion,
  18. OUT DWORDLONG *FileVersion
  19. );
  20. BOOL
  21. InitializeLog(
  22. BOOL WipeLogFile,
  23. LPCSTR NameOfLogFile
  24. );
  25. VOID
  26. TerminateLog(
  27. VOID
  28. );
  29. BOOL
  30. LogItem(
  31. IN DWORD Description,
  32. IN LPCSTR LogString
  33. );
  34. BOOL
  35. ValidateFileSignature(
  36. IN HCATADMIN hCatAdmin,
  37. IN HANDLE RealFileHandle,
  38. IN PCWSTR BaseFileName,
  39. IN PCWSTR CompleteFileName
  40. );
  41. VOID
  42. PrintStringToConsole(
  43. IN LPCSTR StringToPrint
  44. );
  45. VOID
  46. LogHeader(
  47. VOID
  48. );
  49. BOOL
  50. ParseArgs(
  51. IN int argc,
  52. IN char **argv
  53. );
  54. BOOL
  55. ListNonMatchingHotfixes(
  56. VOID
  57. );
  58. VOID _cdecl main( int,char ** );
  59. //
  60. // more prototypes
  61. //
  62. typedef BOOL
  63. (WINAPI *PCRYPTCATADMINACQUIRECONTEXT)(
  64. OUT HCATADMIN *phCatAdmin,
  65. IN const GUID *pgSubsystem,
  66. IN DWORD dwFlags
  67. );
  68. typedef BOOL
  69. (WINAPI *PCRYPTCATADMINRELEASECONTEXT)(
  70. IN HCATADMIN hCatAdmin,
  71. IN DWORD dwFlags
  72. );
  73. typedef BOOL
  74. (WINAPI *PCRYPTCATADMINCALCHASHFROMFILEHANDLE)(
  75. IN HANDLE hFile,
  76. IN OUT DWORD *pcbHash,
  77. OUT OPTIONAL BYTE *pbHash,
  78. IN DWORD dwFlags
  79. );
  80. typedef HCATINFO
  81. (WINAPI *PCRYPTCATADMINENUMCATALOGFROMHASH)(
  82. IN HCATADMIN hCatAdmin,
  83. IN BYTE *pbHash,
  84. IN DWORD cbHash,
  85. IN DWORD dwFlags,
  86. IN OUT HCATINFO *phPrevCatInfo
  87. );
  88. typedef LONG
  89. (WINAPI *PWINVERIFYTRUST)(
  90. HWND hwnd,
  91. GUID *pgActionID,
  92. LPVOID pWVTData
  93. );
  94. typedef BOOL
  95. (WINAPI *PCRYPTCATCATALOGINFOFROMCONTEXT)(
  96. IN HCATINFO hCatInfo,
  97. IN OUT CATALOG_INFO *psCatInfo,
  98. IN DWORD dwFlags
  99. );
  100. typedef BOOL
  101. (WINAPI *PCRYPTCATADMINRELEASECATALOGCONTEXT)(
  102. IN HCATADMIN hCatAdmin,
  103. IN HCATINFO hCatInfo,
  104. IN DWORD dwFlags
  105. );
  106. typedef PWSTR
  107. (WINAPI *PMULTIBYTETOUNICODE)(
  108. IN PCSTR String,
  109. IN UINT Code
  110. );
  111. extern PCRYPTCATADMINACQUIRECONTEXT pCryptCATAdminAcquireContext;
  112. extern PCRYPTCATADMINRELEASECONTEXT pCryptCATAdminReleaseContext;
  113. extern PCRYPTCATADMINCALCHASHFROMFILEHANDLE pCryptCATAdminCalcHashFromFileHandle;
  114. extern PCRYPTCATADMINENUMCATALOGFROMHASH pCryptCATAdminEnumCatalogFromHash;
  115. extern PCRYPTCATCATALOGINFOFROMCONTEXT pCryptCATCatalogInfoFromContext;
  116. extern PCRYPTCATADMINRELEASECATALOGCONTEXT pCryptCATAdminReleaseCatalogContext;
  117. extern PWINVERIFYTRUST pWinVerifyTrust;
  118. //
  119. // Strings
  120. //
  121. #define STR_NO_SYSDIR 0xff00
  122. #define STR_INVALID_OS_VER 0xff01
  123. #define STR_USAGE 0xff02
  124. #define STR_LOGFILE_INIT_FAILED 0xff03
  125. #define STR_FILES_MISSING 0xff04
  126. #define STR_HOTFIX_CURRENT 0xff05
  127. #define STR_GETCOMPUTERNAME_FAILED 0xff06
  128. // available 0xff07
  129. #define STR_REPORT_DATE 0xff08
  130. #define STR_SP_LEVEL 0xff09
  131. #define STR_HOTFIXES_ID 0xff0a
  132. #define STR_NO_HOTFIXES_FOUND 0xff0b
  133. #define STR_NO_MATCHING_SIG 0xff0c
  134. #define STR_REINSTALL_HOTFIX 0xff0d
  135. #define STR_NO_SP_INSTALLED 0xff0e
  136. // available 0xff0f
  137. #define STR_VALIDATION_REPORT_W2K 0xff10
  138. #define STR_VALIDATION_REPORT_XP 0xff11