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.

154 lines
5.8 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. badapp.h
  5. Abstract:
  6. Declares the structures used for CheckBadApps data.
  7. Author:
  8. Calin Negreanu (calinn) 01/20/1999
  9. Revision History:
  10. --*/
  11. #pragma once
  12. #define APPTYPE_TYPE_MASK 0x000000FF
  13. #define APPTYPE_INC_NOBLOCK 0x00000001
  14. #define APPTYPE_INC_HARDBLOCK 0x00000002
  15. #define APPTYPE_MINORPROBLEM 0x00000003
  16. #define APPTYPE_REINSTALL 0x00000004
  17. #define APPTYPE_FLAG_MASK 0xFFFFFF00
  18. #define APPTYPE_FLAG_NONET 0x00000100
  19. #define APPTYPE_FLAG_FAT32 0x00000200
  20. #define APPTYPE_FLAG_NTFS 0x00000400
  21. typedef struct {
  22. DWORD Size;
  23. DWORD MsgId;
  24. DWORD AppType;
  25. } BADAPP_PROP, *PBADAPP_PROP;
  26. typedef struct {
  27. DWORD Size;
  28. PCWSTR FilePath;
  29. PBYTE Blob;
  30. } BADAPP_DATA, *PBADAPP_DATA;
  31. BOOL
  32. IsBadApp (
  33. IN PBADAPP_DATA Data,
  34. OUT PBADAPP_PROP Prop
  35. );
  36. #define EDIT TRUE
  37. #define NOEDIT FALSE
  38. #define ALLFILES TRUE
  39. #define NOT4MAINFILE FALSE
  40. //
  41. // Do not change any values in this enum. You can only add new values
  42. // immediately above VTID_LASTID
  43. //
  44. typedef enum {
  45. VTID_BAD_VTID = 0, // do not use or change !!!
  46. VTID_REQFILE = 1, // this should never change !!!
  47. VTID_FILESIZE = VTID_REQFILE + 1,
  48. VTID_EXETYPE = VTID_REQFILE + 2,
  49. VTID_BINFILEVER = VTID_REQFILE + 3,
  50. VTID_BINPRODUCTVER = VTID_REQFILE + 4,
  51. VTID_FILEDATEHI = VTID_REQFILE + 5,
  52. VTID_FILEDATELO = VTID_REQFILE + 6,
  53. VTID_FILEVEROS = VTID_REQFILE + 7,
  54. VTID_FILEVERTYPE = VTID_REQFILE + 8,
  55. VTID_CHECKSUM = VTID_REQFILE + 9,
  56. VTID_PECHECKSUM = VTID_REQFILE +10,
  57. VTID_COMPANYNAME = VTID_REQFILE +11,
  58. VTID_PRODUCTVERSION = VTID_REQFILE +12,
  59. VTID_PRODUCTNAME = VTID_REQFILE +13,
  60. VTID_FILEDESCRIPTION = VTID_REQFILE +14,
  61. VTID_FILEVERSION = VTID_REQFILE +15,
  62. VTID_ORIGINALFILENAME = VTID_REQFILE +16,
  63. VTID_INTERNALNAME = VTID_REQFILE +17,
  64. VTID_LEGALCOPYRIGHT = VTID_REQFILE +18,
  65. VTID_16BITDESCRIPTION = VTID_REQFILE +19,
  66. VTID_UPTOBINPRODUCTVER = VTID_REQFILE +20,
  67. // add new versions here
  68. VTID_LASTID
  69. };
  70. #define VERSION_STAMPS \
  71. LIBARGS(VTID_FILESIZE, CheckFileSize) \
  72. TOOLARGS(TEXT("FILESIZE"), TEXT("File Size:"), ALLFILES, NOEDIT, QueryFileSize, OutputHexValue)\
  73. \
  74. LIBARGS(VTID_EXETYPE, CheckModuleType) \
  75. TOOLARGS(TEXT("EXETYPE"), TEXT("Module Type:"), NOT4MAINFILE, NOEDIT, QueryModuleType, OutputModuleTypeValue)\
  76. \
  77. LIBARGS(VTID_BINFILEVER, CheckBinFileVer) \
  78. TOOLARGS(TEXT("BINFILEVER"), TEXT("Binary File Version:"), ALLFILES, EDIT, QueryBinFileVer, OutputBinVerValue)\
  79. \
  80. LIBARGS(VTID_BINPRODUCTVER, CheckBinProductVer) \
  81. TOOLARGS(TEXT("BINPRODUCTVER"), TEXT("Binary Product Version:"), ALLFILES, EDIT, QueryBinProductVer, OutputBinVerValue)\
  82. \
  83. LIBARGS(VTID_FILEDATEHI, CheckFileDateHi) \
  84. TOOLARGS(TEXT("FILEDATEHI"), TEXT("File Date (HI):"), ALLFILES, NOEDIT, QueryFileDateHi, OutputHexValue)\
  85. \
  86. LIBARGS(VTID_FILEDATELO, CheckFileDateLo) \
  87. TOOLARGS(TEXT("FILEDATELO"), TEXT("File Date (LO):"), ALLFILES, NOEDIT, QueryFileDateLo, OutputHexValue)\
  88. \
  89. LIBARGS(VTID_FILEVEROS, CheckFileVerOs) \
  90. TOOLARGS(TEXT("FILEVEROS"), TEXT("File OS Version:"), ALLFILES, NOEDIT, QueryFileVerOs, OutputHexValue)\
  91. \
  92. LIBARGS(VTID_FILEVERTYPE, CheckFileVerType) \
  93. TOOLARGS(TEXT("FILEVERTYPE"), TEXT("File Type:"), ALLFILES, NOEDIT, QueryFileVerType, OutputHexValue)\
  94. \
  95. LIBARGS(VTID_CHECKSUM, CheckFileCheckSum) \
  96. TOOLARGS(TEXT("CHECKSUM"), TEXT("File CheckSum:"), ALLFILES, NOEDIT, QueryFileCheckSum, OutputHexValue)\
  97. \
  98. LIBARGS(VTID_PECHECKSUM, CheckFilePECheckSum) \
  99. TOOLARGS(TEXT("PECHECKSUM"), TEXT("File Header CheckSum:"), ALLFILES, NOEDIT, QueryFilePECheckSum, OutputHexValue)\
  100. \
  101. LIBARGS(VTID_COMPANYNAME, CheckCompanyName) \
  102. TOOLARGS(TEXT("COMPANYNAME"), TEXT("Company Name:"), ALLFILES, EDIT, QueryCompanyName, OutputStrValue)\
  103. \
  104. LIBARGS(VTID_PRODUCTVERSION, CheckProductVersion) \
  105. TOOLARGS(TEXT("PRODUCTVERSION"), TEXT("Product Version:"), ALLFILES, EDIT, QueryProductVersion, OutputStrValue)\
  106. \
  107. LIBARGS(VTID_PRODUCTNAME, CheckProductName) \
  108. TOOLARGS(TEXT("PRODUCTNAME"), TEXT("Product Name:"), ALLFILES, EDIT, QueryProductName, OutputStrValue)\
  109. \
  110. LIBARGS(VTID_FILEDESCRIPTION, CheckFileDescription) \
  111. TOOLARGS(TEXT("FILEDESCRIPTION"), TEXT("File Description:"), ALLFILES, EDIT, QueryFileDescription, OutputStrValue)\
  112. \
  113. LIBARGS(VTID_FILEVERSION, CheckFileVersion) \
  114. TOOLARGS(TEXT("FILEVERSION"), TEXT("File Version:"), ALLFILES, EDIT, QueryFileVersion, OutputStrValue)\
  115. \
  116. LIBARGS(VTID_ORIGINALFILENAME, CheckOriginalFileName) \
  117. TOOLARGS(TEXT("ORIGINALFILENAME"), TEXT("Original File Name:"), ALLFILES, EDIT, QueryOriginalFileName, OutputStrValue)\
  118. \
  119. LIBARGS(VTID_INTERNALNAME, CheckInternalName) \
  120. TOOLARGS(TEXT("INTERNALNAME"), TEXT("Internal Name:"), ALLFILES, EDIT, QueryInternalName, OutputStrValue)\
  121. \
  122. LIBARGS(VTID_LEGALCOPYRIGHT, CheckLegalCopyright) \
  123. TOOLARGS(TEXT("LEGALCOPYRIGHT"), TEXT("Legal Copyright:"), ALLFILES, EDIT, QueryLegalCopyright, OutputStrValue)\
  124. \
  125. LIBARGS(VTID_16BITDESCRIPTION, Check16BitDescription) \
  126. TOOLARGS(TEXT("DESCRIPTION"), TEXT("16 Bit Description:"), ALLFILES, EDIT, Query16BitDescription, OutputStrValue)\
  127. \
  128. LIBARGS(VTID_UPTOBINPRODUCTVER, CheckUpToBinProductVer) \
  129. TOOLARGS(TEXT("UPTOBINPRODUCTVER"), TEXT("Up To Binary Product Version:"), ALLFILES, NOEDIT, QueryBinProductVer, OutputUpToBinVerValue)\
  130. \