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.

155 lines
3.9 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. Main.h
  5. Abstract:
  6. Contains constants, function prototypes,
  7. structures, and other items used by
  8. the application.
  9. Notes:
  10. Unicode only - Windows 2000 & XP
  11. History:
  12. 01/02/2002 rparsons Created
  13. --*/
  14. #ifndef _AVRFINST_H
  15. #define _AVRFINST_H
  16. #include <nt.h>
  17. #include <ntrtl.h>
  18. #include <nturtl.h>
  19. #include <windows.h>
  20. #include <commctrl.h>
  21. #include <capi.h> // Crypto API functions
  22. #include <wincrypt.h> // Crypto API functions
  23. #include <mscat.h> // Catalog functions
  24. #include <mssip.h> // Catalog functions
  25. #include <stdio.h>
  26. #include <strsafe.h>
  27. #include "resource.h"
  28. //
  29. // Macro to calculate the size of a buffer.
  30. //
  31. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  32. //
  33. // Number of progress bar steps.
  34. //
  35. #define NUM_PB_STEPS 3
  36. //
  37. // Custom message for installation.
  38. //
  39. #define WM_CUSTOM_INSTALL WM_APP + 0x500
  40. //
  41. // General constants.
  42. //
  43. #define APP_CLASS L"AVRFINST"
  44. #define APP_NAME L"Application Verifier Installer IA64"
  45. //
  46. // The number of files that we'll be installing.
  47. //
  48. #define NUM_FILES 6
  49. //
  50. // Source and destination filenames.
  51. //
  52. #define FILENAME_APPVERIF_EXE L"appverif.exe"
  53. #define FILENAME_APPVERIF_EXE_PDB L"appverif.pdb"
  54. #define FILENAME_APPVERIF_CHM L"appverif.chm"
  55. #define FILENAME_ACVERFYR_DLL L"acverfyr.dll"
  56. #define FILENAME_ACVERFYR_DLL_PDB L"acverfyr.pdb"
  57. #define FILENAME_SYSMAIN_SDB L"sysmain.sdb"
  58. typedef enum {
  59. dlNone = 0,
  60. dlPrint,
  61. dlError,
  62. dlWarning,
  63. dlInfo
  64. } DEBUGLEVEL;
  65. void
  66. __cdecl
  67. DebugPrintfEx(
  68. IN DEBUGLEVEL dwDetail,
  69. IN LPSTR pszFmt,
  70. ...
  71. );
  72. #define DPF DebugPrintfEx
  73. //
  74. // Contains information about the files that will be installed/uninstalled
  75. // by the application.
  76. //
  77. typedef struct _FILEINFO {
  78. BOOL bInstall; // indicates that this file should be installed
  79. WCHAR wszFileName[MAX_PATH]; // the name of the file (no path)
  80. WCHAR wszSrcFileName[MAX_PATH]; // the full path and name of the source file
  81. WCHAR wszDestFileName[MAX_PATH]; // the full path and name of the destination file
  82. DWORDLONG dwlSrcFileVersion; // the version information of the source file
  83. DWORDLONG dwlDestFileVersion; // the version information of the destination file
  84. } FILEINFO, *LPFILEINFO;
  85. //
  86. // Contains all the information that we'll need to access throughout
  87. // the application.
  88. //
  89. typedef struct _APPINFO {
  90. BOOL bQuiet; // if TRUE the install should run quietly
  91. BOOL bInstallSuccess; // if TRUE the install was successful; if FALSE it was not
  92. HWND hMainDlg; // main dialog handle
  93. HWND hWndProgress; // progress bar handle
  94. HINSTANCE hInstance; // main instance handle
  95. WCHAR wszModuleName[MAX_PATH]; // directory that we're running from (includes module name)
  96. WCHAR wszCurrentDir[MAX_PATH]; // directory that we're running from (no module name)
  97. WCHAR wszWinDir[MAX_PATH]; // path to the Windows directory
  98. WCHAR wszSysDir[MAX_PATH]; // path to the (terminal server aware) Windows\System32 directory
  99. FILEINFO rgFileInfo[NUM_FILES];
  100. } APPINFO, *LPAPPINFO;
  101. int
  102. InitializeInstaller(
  103. void
  104. );
  105. BOOL
  106. InitializeFileInfo(
  107. void
  108. );
  109. void
  110. PerformInstallation(
  111. IN HWND hWndParent
  112. );
  113. BOOL
  114. StringToGuid(
  115. IN LPCWSTR pwszIn,
  116. OUT GUID* pgOut
  117. );
  118. void
  119. InstallLaunchExe(
  120. void
  121. );
  122. BOOL
  123. IsPkgAppVerifNewer(
  124. void
  125. );
  126. #endif // _AVRFINST_H