home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / Chip_2001-06_cd1.bin / zkuste / vbasic / Data / Utility / MSISDK15.msi / Msi.h < prev    next >
C/C++ Source or Header  |  2000-10-30  |  59KB  |  1,301 lines

  1.  
  2. /*****************************************************************************\
  3. *                                                                             *
  4. * msi.h - - Interface for external access to Installer Service                *
  5. *                                                                             *
  6. * Version 1.5                                                                 *
  7. *                                                                             *
  8. * NOTES:  All buffers sizes are TCHAR count, null included only on input      *
  9. *         Return argument pointers may be null if not interested in value     *
  10. *                                                                             *
  11. * Copyright (c) 2000, Microsoft Corp.      All rights reserved.               *
  12. *                                                                             *
  13. \*****************************************************************************/
  14.  
  15. #ifndef _MSI_H_
  16. #define _MSI_H_
  17.  
  18. #ifndef _WIN32_MSI
  19. #if (_WIN32_WINNT >= 0x0501)
  20. #define _WIN32_MSI   150
  21. #elif (_WIN32_WINNT >= 0x0500)
  22. #define _WIN32_MSI   110
  23. #else
  24. #define _WIN32_MSI   100
  25. #endif //_WIN32_WINNT
  26. #endif // !_WIN32_MSI
  27.  
  28. #if (_WIN32_MSI >= 150)
  29. #ifndef _MSI_NO_CRYPTO
  30. #include "wincrypt.h"
  31. #endif // _MSI_NO_CRYPTO
  32. #endif //(_WIN32_MSI >= 150)
  33.  
  34. // --------------------------------------------------------------------------
  35. // Installer generic handle definitions
  36. // --------------------------------------------------------------------------
  37.  
  38. typedef unsigned long MSIHANDLE;     // abstract generic handle, 0 == no handle
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. // Close a open handle of any type
  45. // All handles obtained from API calls must be closed when no longer needed
  46. // Normally succeeds, returning TRUE. 
  47.  
  48. UINT WINAPI MsiCloseHandle(MSIHANDLE hAny);
  49.  
  50. // Close all handles open in the process, a diagnostic call
  51. // This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
  52. // Can be called at termination to assure that all handles have been closed
  53. // Returns 0 if all handles have been close, else number of open handles
  54.  
  55. UINT WINAPI MsiCloseAllHandles();
  56.  
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60.  
  61. #ifdef __cplusplus
  62.  
  63. // C++ wrapper object to automatically free handle when going out of scope
  64.  
  65. class PMSIHANDLE
  66. {
  67.     MSIHANDLE m_h;
  68.  public:
  69.     PMSIHANDLE():m_h(0){}
  70.     PMSIHANDLE(MSIHANDLE h):m_h(h){}
  71.   ~PMSIHANDLE(){if (m_h!=0) MsiCloseHandle(m_h);}
  72.     void operator =(MSIHANDLE h) {if (m_h) MsiCloseHandle(m_h); m_h=h;}
  73.     operator MSIHANDLE() {return m_h;}
  74.     MSIHANDLE* operator &() {if (m_h) MsiCloseHandle(m_h); m_h = 0; return &m_h;}
  75. };
  76. #endif  //__cplusplus
  77.  
  78. // Install message type for callback is a combination of the following:
  79. //  A message box style:      MB_*, where MB_OK is the default
  80. //  A message box icon type:  MB_ICON*, where no icon is the default
  81. //  A default button:         MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
  82. //  One of the following install message types, no default
  83. typedef enum tagINSTALLMESSAGE
  84. {
  85.     INSTALLMESSAGE_FATALEXIT      = 0x00000000L, // premature termination, possibly fatal OOM
  86.     INSTALLMESSAGE_ERROR          = 0x01000000L, // formatted error message
  87.     INSTALLMESSAGE_WARNING        = 0x02000000L, // formatted warning message
  88.     INSTALLMESSAGE_USER           = 0x03000000L, // user request message
  89.     INSTALLMESSAGE_INFO           = 0x04000000L, // informative message for log
  90.     INSTALLMESSAGE_FILESINUSE     = 0x05000000L, // list of files in use that need to be replaced
  91.     INSTALLMESSAGE_RESOLVESOURCE  = 0x06000000L, // request to determine a valid source location
  92.     INSTALLMESSAGE_OUTOFDISKSPACE = 0x07000000L, // insufficient disk space message
  93.     INSTALLMESSAGE_ACTIONSTART    = 0x08000000L, // start of action: action name & description
  94.     INSTALLMESSAGE_ACTIONDATA     = 0x09000000L, // formatted data associated with individual action item
  95.     INSTALLMESSAGE_PROGRESS       = 0x0A000000L, // progress gauge info: units so far, total
  96.     INSTALLMESSAGE_COMMONDATA     = 0x0B000000L, // product info for dialog: language Id, dialog caption
  97.     INSTALLMESSAGE_INITIALIZE     = 0x0C000000L, // sent prior to UI initialization, no string data
  98.     INSTALLMESSAGE_TERMINATE      = 0x0D000000L, // sent after UI termination, no string data
  99.     INSTALLMESSAGE_SHOWDIALOG     = 0x0E000000L, // sent prior to display or authored dialog or wizard
  100. } INSTALLMESSAGE;
  101.  
  102. // external error handler supplied to installation API functions
  103. typedef int (WINAPI *INSTALLUI_HANDLERA)(LPVOID pvContext, UINT iMessageType, LPCSTR szMessage);
  104. // external error handler supplied to installation API functions
  105. typedef int (WINAPI *INSTALLUI_HANDLERW)(LPVOID pvContext, UINT iMessageType, LPCWSTR szMessage);
  106. #ifdef UNICODE
  107. #define INSTALLUI_HANDLER  INSTALLUI_HANDLERW
  108. #else
  109. #define INSTALLUI_HANDLER  INSTALLUI_HANDLERA
  110. #endif // !UNICODE
  111.  
  112. typedef enum tagINSTALLUILEVEL
  113. {
  114.     INSTALLUILEVEL_NOCHANGE = 0,    // UI level is unchanged
  115.     INSTALLUILEVEL_DEFAULT  = 1,    // default UI is used
  116.     INSTALLUILEVEL_NONE     = 2,    // completely silent installation
  117.     INSTALLUILEVEL_BASIC    = 3,    // simple progress and error handling
  118.     INSTALLUILEVEL_REDUCED  = 4,    // authored UI, wizard dialogs suppressed
  119.     INSTALLUILEVEL_FULL     = 5,    // authored UI with wizards, progress, errors
  120.     INSTALLUILEVEL_ENDDIALOG    = 0x80, // display success/failure dialog at end of install
  121.     INSTALLUILEVEL_PROGRESSONLY = 0x40, // display only progress dialog
  122. } INSTALLUILEVEL;
  123.  
  124. typedef enum tagINSTALLSTATE
  125. {
  126.     INSTALLSTATE_NOTUSED      = -7,  // component disabled
  127.     INSTALLSTATE_BADCONFIG    = -6,  // configuration data corrupt
  128.     INSTALLSTATE_INCOMPLETE   = -5,  // installation suspended or in progress
  129.     INSTALLSTATE_SOURCEABSENT = -4,  // run from source, source is unavailable
  130.     INSTALLSTATE_MOREDATA     = -3,  // return buffer overflow
  131.     INSTALLSTATE_INVALIDARG   = -2,  // invalid function argument
  132.     INSTALLSTATE_UNKNOWN      = -1,  // unrecognized product or feature
  133.     INSTALLSTATE_BROKEN       =  0,  // broken
  134.     INSTALLSTATE_ADVERTISED   =  1,  // advertised feature
  135.     INSTALLSTATE_REMOVED      =  1,  // component being removed (action state, not settable)
  136.     INSTALLSTATE_ABSENT       =  2,  // uninstalled (or action state absent but clients remain)
  137.     INSTALLSTATE_LOCAL        =  3,  // installed on local drive
  138.     INSTALLSTATE_SOURCE       =  4,  // run from source, CD or net
  139.     INSTALLSTATE_DEFAULT      =  5,  // use default, local or source
  140. } INSTALLSTATE;
  141.  
  142. typedef enum tagUSERINFOSTATE
  143. {
  144.     USERINFOSTATE_MOREDATA   = -3,  // return buffer overflow
  145.     USERINFOSTATE_INVALIDARG = -2,  // invalid function argument
  146.     USERINFOSTATE_UNKNOWN    = -1,  // unrecognized product
  147.     USERINFOSTATE_ABSENT     =  0,  // user info and PID not initialized
  148.     USERINFOSTATE_PRESENT    =  1,  // user info and PID initialized
  149. } USERINFOSTATE;
  150.  
  151. typedef enum tagINSTALLLEVEL
  152. {
  153.     INSTALLLEVEL_DEFAULT = 0,      // install authored default
  154.     INSTALLLEVEL_MINIMUM = 1,      // install only required features
  155.     INSTALLLEVEL_MAXIMUM = 0xFFFF, // install all features
  156. } INSTALLLEVEL;                   // intermediate levels dependent on authoring
  157.  
  158. typedef enum tagREINSTALLMODE  // bit flags
  159. {
  160.     REINSTALLMODE_REPAIR           = 0x00000001,  // Reserved bit - currently ignored
  161.     REINSTALLMODE_FILEMISSING      = 0x00000002,  // Reinstall only if file is missing
  162.     REINSTALLMODE_FILEOLDERVERSION = 0x00000004,  // Reinstall if file is missing, or older version
  163.     REINSTALLMODE_FILEEQUALVERSION = 0x00000008,  // Reinstall if file is missing, or equal or older version
  164.     REINSTALLMODE_FILEEXACT        = 0x00000010,  // Reinstall if file is missing, or not exact version
  165.     REINSTALLMODE_FILEVERIFY       = 0x00000020,  // checksum executables, reinstall if missing or corrupt
  166.     REINSTALLMODE_FILEREPLACE      = 0x00000040,  // Reinstall all files, regardless of version
  167.     REINSTALLMODE_MACHINEDATA      = 0x00000080,  // insure required machine reg entries
  168.     REINSTALLMODE_USERDATA         = 0x00000100,  // insure required user reg entries
  169.     REINSTALLMODE_SHORTCUT         = 0x00000200,  // validate shortcuts items
  170.     REINSTALLMODE_PACKAGE          = 0x00000400,  // use re-cache source install package
  171. } REINSTALLMODE;
  172.  
  173. typedef enum tagINSTALLOGMODE  // bit flags for use with MsiEnableLog and MsiSetExternalUI
  174. {
  175.     INSTALLLOGMODE_FATALEXIT      = (1 << (INSTALLMESSAGE_FATALEXIT      >> 24)),
  176.     INSTALLLOGMODE_ERROR          = (1 << (INSTALLMESSAGE_ERROR          >> 24)),
  177.     INSTALLLOGMODE_WARNING        = (1 << (INSTALLMESSAGE_WARNING        >> 24)),
  178.     INSTALLLOGMODE_USER           = (1 << (INSTALLMESSAGE_USER           >> 24)),
  179.     INSTALLLOGMODE_INFO           = (1 << (INSTALLMESSAGE_INFO           >> 24)),
  180.     INSTALLLOGMODE_RESOLVESOURCE  = (1 << (INSTALLMESSAGE_RESOLVESOURCE  >> 24)),
  181.     INSTALLLOGMODE_OUTOFDISKSPACE = (1 << (INSTALLMESSAGE_OUTOFDISKSPACE >> 24)),
  182.     INSTALLLOGMODE_ACTIONSTART    = (1 << (INSTALLMESSAGE_ACTIONSTART    >> 24)),
  183.     INSTALLLOGMODE_ACTIONDATA     = (1 << (INSTALLMESSAGE_ACTIONDATA     >> 24)),
  184.     INSTALLLOGMODE_COMMONDATA     = (1 << (INSTALLMESSAGE_COMMONDATA     >> 24)),
  185.     INSTALLLOGMODE_PROPERTYDUMP   = (1 << (INSTALLMESSAGE_PROGRESS       >> 24)), // log only
  186.     INSTALLLOGMODE_VERBOSE        = (1 << (INSTALLMESSAGE_INITIALIZE     >> 24)), // log only
  187.     INSTALLLOGMODE_PROGRESS       = (1 << (INSTALLMESSAGE_PROGRESS       >> 24)), // external handler only
  188.     INSTALLLOGMODE_INITIALIZE     = (1 << (INSTALLMESSAGE_INITIALIZE     >> 24)), // external handler only
  189.     INSTALLLOGMODE_TERMINATE      = (1 << (INSTALLMESSAGE_TERMINATE      >> 24)), // external handler only
  190.     INSTALLLOGMODE_SHOWDIALOG     = (1 << (INSTALLMESSAGE_SHOWDIALOG     >> 24)), // external handler only
  191. } INSTALLLOGMODE;
  192.  
  193. typedef enum tagINSTALLLOGATTRIBUTES // flag attributes for MsiEnableLog
  194. {
  195.     INSTALLLOGATTRIBUTES_APPEND            = (1 << 0),
  196.     INSTALLLOGATTRIBUTES_FLUSHEACHLINE     = (1 << 1),
  197. } INSTALLLOGATTRIBUTES;
  198.  
  199. typedef enum tagINSTALLFEATUREATTRIBUTE // bit flags
  200. {
  201.     INSTALLFEATUREATTRIBUTE_FAVORLOCAL             = 1 << 0,
  202.     INSTALLFEATUREATTRIBUTE_FAVORSOURCE            = 1 << 1,
  203.     INSTALLFEATUREATTRIBUTE_FOLLOWPARENT           = 1 << 2,
  204.     INSTALLFEATUREATTRIBUTE_FAVORADVERTISE         = 1 << 3,
  205.     INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE      = 1 << 4,
  206.     INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 << 5,
  207. } INSTALLFEATUREATTRIBUTE;
  208.  
  209. typedef enum tagINSTALLMODE
  210. {
  211.     INSTALLMODE_NOSOURCERESOLUTION   = -3,  // skip source resolution
  212.     INSTALLMODE_NODETECTION          = -2,  // skip detection
  213.     INSTALLMODE_EXISTING             = -1,  // provide, if available
  214.     INSTALLMODE_DEFAULT              =  0,  // install, if absent
  215. } INSTALLMODE;
  216.  
  217. #define MAX_FEATURE_CHARS  38   // maximum chars in feature name (same as string GUID)
  218.  
  219.  
  220. // Product info attributes: advertised information
  221.  
  222. #define INSTALLPROPERTY_PACKAGENAME           __TEXT("PackageName")
  223. #define INSTALLPROPERTY_TRANSFORMS            __TEXT("Transforms")
  224. #define INSTALLPROPERTY_LANGUAGE              __TEXT("Language")
  225. #define INSTALLPROPERTY_PRODUCTNAME           __TEXT("ProductName")
  226. #define INSTALLPROPERTY_ASSIGNMENTTYPE        __TEXT("AssignmentType")
  227. #define INSTALLPROPERTY_PACKAGECODE           __TEXT("PackageCode")
  228. #define INSTALLPROPERTY_VERSION               __TEXT("Version")
  229. #if (_WIN32_MSI >=  110)
  230. #define INSTALLPROPERTY_PRODUCTICON           __TEXT("ProductIcon")
  231. #endif //(_WIN32_MSI >=  110)
  232.  
  233. // Product info attributes: installed information
  234.  
  235. #define INSTALLPROPERTY_INSTALLEDPRODUCTNAME  __TEXT("InstalledProductName")
  236. #define INSTALLPROPERTY_VERSIONSTRING         __TEXT("VersionString")
  237. #define INSTALLPROPERTY_HELPLINK              __TEXT("HelpLink")
  238. #define INSTALLPROPERTY_HELPTELEPHONE         __TEXT("HelpTelephone")
  239. #define INSTALLPROPERTY_INSTALLLOCATION       __TEXT("InstallLocation")
  240. #define INSTALLPROPERTY_INSTALLSOURCE         __TEXT("InstallSource")
  241. #define INSTALLPROPERTY_INSTALLDATE           __TEXT("InstallDate")
  242. #define INSTALLPROPERTY_PUBLISHER             __TEXT("Publisher")
  243. #define INSTALLPROPERTY_LOCALPACKAGE          __TEXT("LocalPackage")
  244. #define INSTALLPROPERTY_URLINFOABOUT          __TEXT("URLInfoAbout")
  245. #define INSTALLPROPERTY_URLUPDATEINFO         __TEXT("URLUpdateInfo")
  246. #define INSTALLPROPERTY_VERSIONMINOR          __TEXT("VersionMinor")
  247. #define INSTALLPROPERTY_VERSIONMAJOR          __TEXT("VersionMajor")
  248.  
  249.  
  250. typedef enum tagINSTALLTYPE
  251. {
  252.     INSTALLTYPE_DEFAULT            =    0,   // set to indicate default behavior
  253.     INSTALLTYPE_NETWORK_IMAGE      =    1,   // set to indicate network install
  254. }INSTALLTYPE;
  255.  
  256. #if (_WIN32_MSI >=  150)
  257.  
  258. typedef struct _MSIFILEHASHINFO {
  259.     ULONG dwFileHashInfoSize;
  260.     ULONG dwData [ 4 ];
  261. } MSIFILEHASHINFO, *PMSIFILEHASHINFO;
  262.  
  263. #endif //(_WIN32_MSI >=  150)
  264.  
  265.  
  266. #ifdef __cplusplus
  267. extern "C" {
  268. #endif
  269.  
  270. // --------------------------------------------------------------------------
  271. // Functions to set the UI handling and logging. The UI will be used for error,
  272. // progress, and log messages for all subsequent calls to Installer Service
  273. // API functions that require UI.
  274. // --------------------------------------------------------------------------
  275.  
  276. // Enable internal UI
  277.  
  278. INSTALLUILEVEL WINAPI MsiSetInternalUI(
  279.     INSTALLUILEVEL  dwUILevel,     // UI level
  280.     HWND  *phWnd);                   // handle of owner window
  281.  
  282. // Enable external UI handling, returns any previous handler or NULL if none.
  283. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  284.  
  285. INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(
  286.     INSTALLUI_HANDLERA puiHandler,   // for progress and error handling 
  287.     DWORD              dwMessageFilter, // bit flags designating messages to handle
  288.     LPVOID             pvContext);   // application context
  289. INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(
  290.     INSTALLUI_HANDLERW puiHandler,   // for progress and error handling 
  291.     DWORD              dwMessageFilter, // bit flags designating messages to handle
  292.     LPVOID             pvContext);   // application context
  293. #ifdef UNICODE
  294. #define MsiSetExternalUI  MsiSetExternalUIW
  295. #else
  296. #define MsiSetExternalUI  MsiSetExternalUIA
  297. #endif // !UNICODE
  298.  
  299.  
  300. // Enable logging to a file for all install sessions for the client process,
  301. // with control over which log messages are passed to the specified log file.
  302. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  303.  
  304. UINT WINAPI MsiEnableLogA(
  305.     DWORD     dwLogMode,           // bit flags designating operations to report
  306.     LPCSTR  szLogFile,           // log file, or NULL to disable logging
  307.     DWORD     dwLogAttributes);    // INSTALLLOGATTRIBUTES flags
  308. UINT WINAPI MsiEnableLogW(
  309.     DWORD     dwLogMode,           // bit flags designating operations to report
  310.     LPCWSTR  szLogFile,           // log file, or NULL to disable logging
  311.     DWORD     dwLogAttributes);    // INSTALLLOGATTRIBUTES flags
  312. #ifdef UNICODE
  313. #define MsiEnableLog  MsiEnableLogW
  314. #else
  315. #define MsiEnableLog  MsiEnableLogA
  316. #endif // !UNICODE
  317.  
  318. // --------------------------------------------------------------------------
  319. // Functions to query and configure a product as a whole.
  320. // --------------------------------------------------------------------------
  321.  
  322. // Return the installed state for a product
  323.  
  324. INSTALLSTATE WINAPI MsiQueryProductStateA(
  325.     LPCSTR  szProduct);
  326. INSTALLSTATE WINAPI MsiQueryProductStateW(
  327.     LPCWSTR  szProduct);
  328. #ifdef UNICODE
  329. #define MsiQueryProductState  MsiQueryProductStateW
  330. #else
  331. #define MsiQueryProductState  MsiQueryProductStateA
  332. #endif // !UNICODE
  333.  
  334. // Return product info
  335.  
  336. UINT WINAPI MsiGetProductInfoA(
  337.     LPCSTR   szProduct,      // product code
  338.     LPCSTR   szAttribute,    // attribute name, case-sensitive
  339.     LPSTR    lpValueBuf,     // returned value, NULL if not desired
  340.     DWORD      *pcchValueBuf); // in/out buffer character count
  341. UINT WINAPI MsiGetProductInfoW(
  342.     LPCWSTR   szProduct,      // product code
  343.     LPCWSTR   szAttribute,    // attribute name, case-sensitive
  344.     LPWSTR    lpValueBuf,     // returned value, NULL if not desired
  345.     DWORD      *pcchValueBuf); // in/out buffer character count
  346. #ifdef UNICODE
  347. #define MsiGetProductInfo  MsiGetProductInfoW
  348. #else
  349. #define MsiGetProductInfo  MsiGetProductInfoA
  350. #endif // !UNICODE
  351.  
  352. // Install a new product.
  353. // Either may be NULL, but the DATABASE property must be specfied
  354.  
  355. UINT WINAPI MsiInstallProductA(
  356.     LPCSTR      szPackagePath,    // location of package to install
  357.     LPCSTR      szCommandLine);   // command line <property settings>
  358. UINT WINAPI MsiInstallProductW(
  359.     LPCWSTR      szPackagePath,    // location of package to install
  360.     LPCWSTR      szCommandLine);   // command line <property settings>
  361. #ifdef UNICODE
  362. #define MsiInstallProduct  MsiInstallProductW
  363. #else
  364. #define MsiInstallProduct  MsiInstallProductA
  365. #endif // !UNICODE
  366.  
  367. // Install/uninstall an advertised or installed product
  368. // No action if installed and INSTALLSTATE_DEFAULT specified
  369.  
  370. UINT WINAPI MsiConfigureProductA(
  371.     LPCSTR      szProduct,        // product code
  372.     int          iInstallLevel,    // how much of the product to install
  373.     INSTALLSTATE eInstallState);   // local/source/default/absent/lock/uncache
  374. UINT WINAPI MsiConfigureProductW(
  375.     LPCWSTR      szProduct,        // product code
  376.     int          iInstallLevel,    // how much of the product to install
  377.     INSTALLSTATE eInstallState);   // local/source/default/absent/lock/uncache
  378. #ifdef UNICODE
  379. #define MsiConfigureProduct  MsiConfigureProductW
  380. #else
  381. #define MsiConfigureProduct  MsiConfigureProductA
  382. #endif // !UNICODE
  383.  
  384. // Install/uninstall an advertised or installed product
  385. // No action if installed and INSTALLSTATE_DEFAULT specified
  386.  
  387. UINT WINAPI MsiConfigureProductExA(
  388.     LPCSTR      szProduct,        // product code
  389.     int          iInstallLevel,    // how much of the product to install
  390.     INSTALLSTATE eInstallState,    // local/source/default/absent/lock/uncache
  391.     LPCSTR      szCommandLine);   // command line <property settings>
  392. UINT WINAPI MsiConfigureProductExW(
  393.     LPCWSTR      szProduct,        // product code
  394.     int          iInstallLevel,    // how much of the product to install
  395.     INSTALLSTATE eInstallState,    // local/source/default/absent/lock/uncache
  396.     LPCWSTR      szCommandLine);   // command line <property settings>
  397. #ifdef UNICODE
  398. #define MsiConfigureProductEx  MsiConfigureProductExW
  399. #else
  400. #define MsiConfigureProductEx  MsiConfigureProductExA
  401. #endif // !UNICODE
  402.  
  403. // Reinstall product, used to validate or correct problems
  404.  
  405. UINT WINAPI MsiReinstallProductA(
  406.     LPCSTR      szProduct,        // product code
  407.     DWORD         szReinstallMode); // one or more REINSTALLMODE modes
  408. UINT WINAPI MsiReinstallProductW(
  409.     LPCWSTR      szProduct,        // product code
  410.     DWORD         szReinstallMode); // one or more REINSTALLMODE modes
  411. #ifdef UNICODE
  412. #define MsiReinstallProduct  MsiReinstallProductW
  413. #else
  414. #define MsiReinstallProduct  MsiReinstallProductA
  415. #endif // !UNICODE
  416.  
  417.  
  418. // Return the product code for a registered component, called once by apps
  419.  
  420. UINT WINAPI MsiGetProductCodeA(
  421.     LPCSTR   szComponent,   // component Id registered for this product
  422.     LPSTR    lpBuf39);      // returned string GUID, sized for 39 characters
  423. UINT WINAPI MsiGetProductCodeW(
  424.     LPCWSTR   szComponent,   // component Id registered for this product
  425.     LPWSTR    lpBuf39);      // returned string GUID, sized for 39 characters
  426. #ifdef UNICODE
  427. #define MsiGetProductCode  MsiGetProductCodeW
  428. #else
  429. #define MsiGetProductCode  MsiGetProductCodeA
  430. #endif // !UNICODE
  431.  
  432. // Return the registered user information for an installed product
  433.  
  434. USERINFOSTATE WINAPI MsiGetUserInfoA(
  435.     LPCSTR  szProduct,        // product code, string GUID
  436.     LPSTR   lpUserNameBuf,    // return user name           
  437.     DWORD    *pcchUserNameBuf, // in/out buffer character count
  438.     LPSTR   lpOrgNameBuf,     // return company name           
  439.     DWORD    *pcchOrgNameBuf,  // in/out buffer character count
  440.     LPSTR   lpSerialBuf,      // return product serial number
  441.     DWORD    *pcchSerialBuf);  // in/out buffer character count
  442. USERINFOSTATE WINAPI MsiGetUserInfoW(
  443.     LPCWSTR  szProduct,        // product code, string GUID
  444.     LPWSTR   lpUserNameBuf,    // return user name           
  445.     DWORD    *pcchUserNameBuf, // in/out buffer character count
  446.     LPWSTR   lpOrgNameBuf,     // return company name           
  447.     DWORD    *pcchOrgNameBuf,  // in/out buffer character count
  448.     LPWSTR   lpSerialBuf,      // return product serial number
  449.     DWORD    *pcchSerialBuf);  // in/out buffer character count
  450. #ifdef UNICODE
  451. #define MsiGetUserInfo  MsiGetUserInfoW
  452. #else
  453. #define MsiGetUserInfo  MsiGetUserInfoA
  454. #endif // !UNICODE
  455.  
  456. // Obtain and store user info and PID from installation wizard (first run)
  457.  
  458. UINT WINAPI MsiCollectUserInfoA(
  459.     LPCSTR  szProduct);     // product code, string GUID
  460. UINT WINAPI MsiCollectUserInfoW(
  461.     LPCWSTR  szProduct);     // product code, string GUID
  462. #ifdef UNICODE
  463. #define MsiCollectUserInfo  MsiCollectUserInfoW
  464. #else
  465. #define MsiCollectUserInfo  MsiCollectUserInfoA
  466. #endif // !UNICODE
  467.  
  468. // --------------------------------------------------------------------------
  469. // Functions to patch existing products
  470. // --------------------------------------------------------------------------
  471.  
  472. // Patch all possible installed products.
  473.  
  474. UINT WINAPI MsiApplyPatchA(
  475.     LPCSTR      szPatchPackage,   // location of patch package
  476.     LPCSTR      szInstallPackage, // location of package for install to patch <optional>
  477.     INSTALLTYPE   eInstallType,     // type of install to patch
  478.     LPCSTR      szCommandLine);   // command line <property settings>
  479. UINT WINAPI MsiApplyPatchW(
  480.     LPCWSTR      szPatchPackage,   // location of patch package
  481.     LPCWSTR      szInstallPackage, // location of package for install to patch <optional>
  482.     INSTALLTYPE   eInstallType,     // type of install to patch
  483.     LPCWSTR      szCommandLine);   // command line <property settings>
  484. #ifdef UNICODE
  485. #define MsiApplyPatch  MsiApplyPatchW
  486. #else
  487. #define MsiApplyPatch  MsiApplyPatchA
  488. #endif // !UNICODE
  489.  
  490. // Return patch info
  491.  
  492. UINT WINAPI MsiGetPatchInfoA(
  493.     LPCSTR   szPatch,        // patch code
  494.     LPCSTR   szAttribute,    // attribute name, case-sensitive
  495.     LPSTR    lpValueBuf,     // returned value, NULL if not desired
  496.     DWORD      *pcchValueBuf); // in/out buffer character count
  497. UINT WINAPI MsiGetPatchInfoW(
  498.     LPCWSTR   szPatch,        // patch code
  499.     LPCWSTR   szAttribute,    // attribute name, case-sensitive
  500.     LPWSTR    lpValueBuf,     // returned value, NULL if not desired
  501.     DWORD      *pcchValueBuf); // in/out buffer character count
  502. #ifdef UNICODE
  503. #define MsiGetPatchInfo  MsiGetPatchInfoW
  504. #else
  505. #define MsiGetPatchInfo  MsiGetPatchInfoA
  506. #endif // !UNICODE
  507.  
  508. // Enumerate all patches for a product
  509.  
  510. UINT WINAPI MsiEnumPatchesA(
  511.     LPCSTR szProduct,
  512.     DWORD    iPatchIndex,
  513.     LPSTR  lpPatchBuf,
  514.     LPSTR  lpTransformsBuf,
  515.     DWORD    *pcchTransformsBuf);
  516. UINT WINAPI MsiEnumPatchesW(
  517.     LPCWSTR szProduct,
  518.     DWORD    iPatchIndex,
  519.     LPWSTR  lpPatchBuf,
  520.     LPWSTR  lpTransformsBuf,
  521.     DWORD    *pcchTransformsBuf);
  522. #ifdef UNICODE
  523. #define MsiEnumPatches  MsiEnumPatchesW
  524. #else
  525. #define MsiEnumPatches  MsiEnumPatchesA
  526. #endif // !UNICODE
  527.  
  528. // --------------------------------------------------------------------------
  529. // Functions to query and configure a feature within a product.
  530. // --------------------------------------------------------------------------
  531.  
  532. // Return the installed state for a product feature
  533.  
  534. INSTALLSTATE WINAPI MsiQueryFeatureStateA(
  535.     LPCSTR  szProduct,
  536.     LPCSTR  szFeature);
  537. INSTALLSTATE WINAPI MsiQueryFeatureStateW(
  538.     LPCWSTR  szProduct,
  539.     LPCWSTR  szFeature);
  540. #ifdef UNICODE
  541. #define MsiQueryFeatureState  MsiQueryFeatureStateW
  542. #else
  543. #define MsiQueryFeatureState  MsiQueryFeatureStateA
  544. #endif // !UNICODE
  545.  
  546. // Indicate intent to use a product feature, increments usage count
  547. // Prompts for CD if not loaded, does not install feature
  548.  
  549. INSTALLSTATE WINAPI MsiUseFeatureA(
  550.     LPCSTR  szProduct,
  551.     LPCSTR  szFeature);
  552. INSTALLSTATE WINAPI MsiUseFeatureW(
  553.     LPCWSTR  szProduct,
  554.     LPCWSTR  szFeature);
  555. #ifdef UNICODE
  556. #define MsiUseFeature  MsiUseFeatureW
  557. #else
  558. #define MsiUseFeature  MsiUseFeatureA
  559. #endif // !UNICODE
  560.  
  561. // Indicate intent to use a product feature, increments usage count
  562. // Prompts for CD if not loaded, does not install feature
  563. // Allows for bypassing component detection where performance is critical
  564.  
  565. INSTALLSTATE WINAPI MsiUseFeatureExA(
  566.     LPCSTR  szProduct,          // product code
  567.     LPCSTR  szFeature,          // feature ID
  568.     DWORD     dwInstallMode,      // INSTALLMODE_NODETECTION, else 0
  569.     DWORD     dwReserved);        // reserved, must be 0
  570. INSTALLSTATE WINAPI MsiUseFeatureExW(
  571.     LPCWSTR  szProduct,          // product code
  572.     LPCWSTR  szFeature,          // feature ID
  573.     DWORD     dwInstallMode,      // INSTALLMODE_NODETECTION, else 0
  574.     DWORD     dwReserved);        // reserved, must be 0
  575. #ifdef UNICODE
  576. #define MsiUseFeatureEx  MsiUseFeatureExW
  577. #else
  578. #define MsiUseFeatureEx  MsiUseFeatureExA
  579. #endif // !UNICODE
  580.  
  581. // Return the usage metrics for a product feature
  582.  
  583. UINT WINAPI MsiGetFeatureUsageA(
  584.     LPCSTR      szProduct,        // product code
  585.     LPCSTR      szFeature,        // feature ID
  586.     DWORD        *pdwUseCount,     // returned use count
  587.     WORD         *pwDateUsed);     // last date used (DOS date format)
  588. UINT WINAPI MsiGetFeatureUsageW(
  589.     LPCWSTR      szProduct,        // product code
  590.     LPCWSTR      szFeature,        // feature ID
  591.     DWORD        *pdwUseCount,     // returned use count
  592.     WORD         *pwDateUsed);     // last date used (DOS date format)
  593. #ifdef UNICODE
  594. #define MsiGetFeatureUsage  MsiGetFeatureUsageW
  595. #else
  596. #define MsiGetFeatureUsage  MsiGetFeatureUsageA
  597. #endif // !UNICODE
  598.  
  599. // Force the installed state for a product feature
  600.  
  601. UINT WINAPI MsiConfigureFeatureA(
  602.     LPCSTR  szProduct,
  603.     LPCSTR  szFeature,
  604.     INSTALLSTATE eInstallState);   // local/source/default/absent/lock/uncache
  605. UINT WINAPI MsiConfigureFeatureW(
  606.     LPCWSTR  szProduct,
  607.     LPCWSTR  szFeature,
  608.     INSTALLSTATE eInstallState);   // local/source/default/absent/lock/uncache
  609. #ifdef UNICODE
  610. #define MsiConfigureFeature  MsiConfigureFeatureW
  611. #else
  612. #define MsiConfigureFeature  MsiConfigureFeatureA
  613. #endif // !UNICODE
  614.  
  615.  
  616. // Reinstall feature, used to validate or correct problems
  617.  
  618. UINT WINAPI MsiReinstallFeatureA(
  619.     LPCSTR      szProduct,        // product code
  620.     LPCSTR      szFeature,        // feature ID, NULL for entire product
  621.     DWORD         dwReinstallMode); // one or more REINSTALLMODE modes
  622. UINT WINAPI MsiReinstallFeatureW(
  623.     LPCWSTR      szProduct,        // product code
  624.     LPCWSTR      szFeature,        // feature ID, NULL for entire product
  625.     DWORD         dwReinstallMode); // one or more REINSTALLMODE modes
  626. #ifdef UNICODE
  627. #define MsiReinstallFeature  MsiReinstallFeatureW
  628. #else
  629. #define MsiReinstallFeature  MsiReinstallFeatureA
  630. #endif // !UNICODE
  631.  
  632. // --------------------------------------------------------------------------
  633. // Functions to return a path to a particular component.
  634. // The state of the feature being used should have been checked previously.
  635. // --------------------------------------------------------------------------
  636.  
  637. // Return full component path, performing any necessary installation
  638. // calls MsiQueryFeatureState to detect that all components are installed
  639. // then calls MsiConfigureFeature if any of its components are uninstalled
  640. // then calls MsiLocateComponent to obtain the path the its key file
  641.  
  642. UINT WINAPI MsiProvideComponentA(
  643.     LPCSTR     szProduct,    // product code in case install required
  644.     LPCSTR     szFeature,    // feature ID in case install required
  645.     LPCSTR     szComponent,  // component ID
  646.     DWORD        dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  647.     LPSTR      lpPathBuf,    // returned path, NULL if not desired
  648.     DWORD       *pcchPathBuf);// in/out buffer character count
  649. UINT WINAPI MsiProvideComponentW(
  650.     LPCWSTR     szProduct,    // product code in case install required
  651.     LPCWSTR     szFeature,    // feature ID in case install required
  652.     LPCWSTR     szComponent,  // component ID
  653.     DWORD        dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  654.     LPWSTR      lpPathBuf,    // returned path, NULL if not desired
  655.     DWORD       *pcchPathBuf);// in/out buffer character count
  656. #ifdef UNICODE
  657. #define MsiProvideComponent  MsiProvideComponentW
  658. #else
  659. #define MsiProvideComponent  MsiProvideComponentA
  660. #endif // !UNICODE
  661.  
  662. // Return full component path for a qualified component, performing any necessary installation. 
  663. // Prompts for source if necessary and increments the usage count for the feature.
  664.  
  665. UINT WINAPI MsiProvideQualifiedComponentA(
  666.     LPCSTR     szCategory,   // component category ID
  667.     LPCSTR     szQualifier,  // specifies which component to access
  668.     DWORD        dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  669.     LPSTR      lpPathBuf,    // returned path, NULL if not desired
  670.     DWORD       *pcchPathBuf); // in/out buffer character count
  671. UINT WINAPI MsiProvideQualifiedComponentW(
  672.     LPCWSTR     szCategory,   // component category ID
  673.     LPCWSTR     szQualifier,  // specifies which component to access
  674.     DWORD        dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  675.     LPWSTR      lpPathBuf,    // returned path, NULL if not desired
  676.     DWORD       *pcchPathBuf); // in/out buffer character count
  677. #ifdef UNICODE
  678. #define MsiProvideQualifiedComponent  MsiProvideQualifiedComponentW
  679. #else
  680. #define MsiProvideQualifiedComponent  MsiProvideQualifiedComponentA
  681. #endif // !UNICODE
  682.  
  683. // Return full component path for a qualified component, performing any necessary installation. 
  684. // Prompts for source if necessary and increments the usage count for the feature.
  685. // The szProduct parameter specifies the product to match that has published the qualified
  686. // component. If null, this API works the same as MsiProvideQualifiedComponent. 
  687.  
  688. UINT WINAPI MsiProvideQualifiedComponentExA(
  689.     LPCSTR     szCategory,   // component category ID
  690.     LPCSTR     szQualifier,  // specifies which component to access
  691.     DWORD        dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  692.     LPCSTR     szProduct,    // the product code 
  693.     DWORD        dwUnused1,    // not used, must be zero
  694.     DWORD        dwUnused2,    // not used, must be zero
  695.     LPSTR      lpPathBuf,    // returned path, NULL if not desired
  696.     DWORD       *pcchPathBuf); // in/out buffer character count
  697. UINT WINAPI MsiProvideQualifiedComponentExW(
  698.     LPCWSTR     szCategory,   // component category ID
  699.     LPCWSTR     szQualifier,  // specifies which component to access
  700.     DWORD        dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  701.     LPCWSTR     szProduct,    // the product code 
  702.     DWORD        dwUnused1,    // not used, must be zero
  703.     DWORD        dwUnused2,    // not used, must be zero
  704.     LPWSTR      lpPathBuf,    // returned path, NULL if not desired
  705.     DWORD       *pcchPathBuf); // in/out buffer character count
  706. #ifdef UNICODE
  707. #define MsiProvideQualifiedComponentEx  MsiProvideQualifiedComponentExW
  708. #else
  709. #define MsiProvideQualifiedComponentEx  MsiProvideQualifiedComponentExA
  710. #endif // !UNICODE
  711.  
  712. // Return full path to an installed component
  713.  
  714. INSTALLSTATE WINAPI MsiGetComponentPathA(
  715.     LPCSTR   szProduct,   // product code for client product
  716.     LPCSTR   szComponent, // component Id, string GUID
  717.     LPSTR    lpPathBuf,   // returned path
  718.     DWORD     *pcchBuf);    // in/out buffer character count
  719. INSTALLSTATE WINAPI MsiGetComponentPathW(
  720.     LPCWSTR   szProduct,   // product code for client product
  721.     LPCWSTR   szComponent, // component Id, string GUID
  722.     LPWSTR    lpPathBuf,   // returned path
  723.     DWORD     *pcchBuf);    // in/out buffer character count
  724. #ifdef UNICODE
  725. #define MsiGetComponentPath  MsiGetComponentPathW
  726. #else
  727. #define MsiGetComponentPath  MsiGetComponentPathA
  728. #endif // !UNICODE
  729.  
  730. #if (_WIN32_MSI >= 150)
  731.  
  732. // Return full component path for an assembly installed via the WI, performing any necessary installation. 
  733. // Prompts for source if necessary and increments the usage count for the feature.
  734. // The szAssemblyName parameter specifies the stringized assembly name. 
  735. // The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested 
  736. // has been privatised to, which is null for global assemblies
  737.  
  738. UINT WINAPI MsiProvideAssemblyA(
  739.     LPCSTR    szAssemblyName,   // stringized assembly name
  740.     LPCSTR    szAppContext,  // specifies the full path to the parent asm's .cfg file, null for global assemblies
  741.     DWORD       dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  742.     DWORD       dwUnused,    // not used, must be zero
  743.     LPSTR     lpPathBuf,    // returned path, NULL if not desired
  744.     DWORD       *pcchPathBuf); // in/out buffer character count
  745. UINT WINAPI MsiProvideAssemblyW(
  746.     LPCWSTR    szAssemblyName,   // stringized assembly name
  747.     LPCWSTR    szAppContext,  // specifies the full path to the parent asm's .cfg file, null for global assemblies
  748.     DWORD       dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  749.     DWORD       dwUnused,    // not used, must be zero
  750.     LPWSTR     lpPathBuf,    // returned path, NULL if not desired
  751.     DWORD       *pcchPathBuf); // in/out buffer character count
  752. #ifdef UNICODE
  753. #define MsiProvideAssembly  MsiProvideAssemblyW
  754. #else
  755. #define MsiProvideAssembly  MsiProvideAssemblyA
  756. #endif // !UNICODE
  757.  
  758. #endif //(_WIN32_MSI >=  150)
  759.  
  760.  
  761. // --------------------------------------------------------------------------
  762. // Functions to iterate registered products, features, and components.
  763. // As with reg keys, they accept a 0-based index into the enumeration.
  764. // --------------------------------------------------------------------------
  765.  
  766. // Enumerate the registered products, either installed or advertised
  767.  
  768. UINT WINAPI MsiEnumProductsA(
  769.     DWORD     iProductIndex,    // 0-based index into registered products
  770.     LPSTR   lpProductBuf);    // buffer of char count: 39 (size of string GUID)
  771. UINT WINAPI MsiEnumProductsW(
  772.     DWORD     iProductIndex,    // 0-based index into registered products
  773.     LPWSTR   lpProductBuf);    // buffer of char count: 39 (size of string GUID)
  774. #ifdef UNICODE
  775. #define MsiEnumProducts  MsiEnumProductsW
  776. #else
  777. #define MsiEnumProducts  MsiEnumProductsA
  778. #endif // !UNICODE
  779.  
  780. #if (_WIN32_MSI >=  110)
  781.  
  782. // Enumerate products with given upgrade code
  783.  
  784. UINT WINAPI MsiEnumRelatedProductsA(
  785.     LPCSTR  lpUpgradeCode,    // upgrade code of products to enumerate
  786.     DWORD     dwReserved,       // reserved, must be 0
  787.     DWORD     iProductIndex,    // 0-based index into registered products
  788.     LPSTR   lpProductBuf);    // buffer of char count: 39 (size of string GUID)
  789. UINT WINAPI MsiEnumRelatedProductsW(
  790.     LPCWSTR  lpUpgradeCode,    // upgrade code of products to enumerate
  791.     DWORD     dwReserved,       // reserved, must be 0
  792.     DWORD     iProductIndex,    // 0-based index into registered products
  793.     LPWSTR   lpProductBuf);    // buffer of char count: 39 (size of string GUID)
  794. #ifdef UNICODE
  795. #define MsiEnumRelatedProducts  MsiEnumRelatedProductsW
  796. #else
  797. #define MsiEnumRelatedProducts  MsiEnumRelatedProductsA
  798. #endif // !UNICODE
  799.  
  800. #endif //(_WIN32_MSI >=  110)
  801.  
  802. // Enumerate the advertised features for a given product.
  803. // If parent is not required, supplying NULL will improve performance.
  804.  
  805. UINT WINAPI MsiEnumFeaturesA(
  806.     LPCSTR  szProduct,
  807.     DWORD     iFeatureIndex,  // 0-based index into published features
  808.     LPSTR   lpFeatureBuf,   // feature name buffer,   size=MAX_FEATURE_CHARS+1
  809.     LPSTR   lpParentBuf);   // parent feature buffer, size=MAX_FEATURE_CHARS+1
  810. UINT WINAPI MsiEnumFeaturesW(
  811.     LPCWSTR  szProduct,
  812.     DWORD     iFeatureIndex,  // 0-based index into published features
  813.     LPWSTR   lpFeatureBuf,   // feature name buffer,   size=MAX_FEATURE_CHARS+1
  814.     LPWSTR   lpParentBuf);   // parent feature buffer, size=MAX_FEATURE_CHARS+1
  815. #ifdef UNICODE
  816. #define MsiEnumFeatures  MsiEnumFeaturesW
  817. #else
  818. #define MsiEnumFeatures  MsiEnumFeaturesA
  819. #endif // !UNICODE
  820.  
  821. // Enumerate the installed components for all products
  822.  
  823. UINT WINAPI MsiEnumComponentsA(
  824.     DWORD    iComponentIndex,  // 0-based index into installed components
  825.     LPSTR   lpComponentBuf);  // buffer of char count: 39 (size of string GUID)
  826. UINT WINAPI MsiEnumComponentsW(
  827.     DWORD    iComponentIndex,  // 0-based index into installed components
  828.     LPWSTR   lpComponentBuf);  // buffer of char count: 39 (size of string GUID)
  829. #ifdef UNICODE
  830. #define MsiEnumComponents  MsiEnumComponentsW
  831. #else
  832. #define MsiEnumComponents  MsiEnumComponentsA
  833. #endif // !UNICODE
  834.  
  835. // Enumerate the client products for a component
  836.  
  837. UINT WINAPI MsiEnumClientsA(
  838.     LPCSTR  szComponent,
  839.     DWORD     iProductIndex,    // 0-based index into client products
  840.     LPSTR   lpProductBuf);    // buffer of char count: 39 (size of string GUID)
  841. UINT WINAPI MsiEnumClientsW(
  842.     LPCWSTR  szComponent,
  843.     DWORD     iProductIndex,    // 0-based index into client products
  844.     LPWSTR   lpProductBuf);    // buffer of char count: 39 (size of string GUID)
  845. #ifdef UNICODE
  846. #define MsiEnumClients  MsiEnumClientsW
  847. #else
  848. #define MsiEnumClients  MsiEnumClientsA
  849. #endif // !UNICODE
  850.  
  851. // Enumerate the qualifiers for an advertised component.
  852.  
  853. UINT WINAPI MsiEnumComponentQualifiersA(
  854.     LPCSTR   szComponent,         // generic component ID that is qualified
  855.     DWORD     iIndex,               // 0-based index into qualifiers
  856.     LPSTR    lpQualifierBuf,      // qualifier buffer
  857.     DWORD     *pcchQualifierBuf,   // in/out qualifier buffer character count
  858.     LPSTR    lpApplicationDataBuf,    // description buffer
  859.     DWORD     *pcchApplicationDataBuf); // in/out description buffer character count
  860. UINT WINAPI MsiEnumComponentQualifiersW(
  861.     LPCWSTR   szComponent,         // generic component ID that is qualified
  862.     DWORD     iIndex,               // 0-based index into qualifiers
  863.     LPWSTR    lpQualifierBuf,      // qualifier buffer
  864.     DWORD     *pcchQualifierBuf,   // in/out qualifier buffer character count
  865.     LPWSTR    lpApplicationDataBuf,    // description buffer
  866.     DWORD     *pcchApplicationDataBuf); // in/out description buffer character count
  867. #ifdef UNICODE
  868. #define MsiEnumComponentQualifiers  MsiEnumComponentQualifiersW
  869. #else
  870. #define MsiEnumComponentQualifiers  MsiEnumComponentQualifiersA
  871. #endif // !UNICODE
  872.  
  873. // --------------------------------------------------------------------------
  874. // Functions to obtain product or package information.
  875. // --------------------------------------------------------------------------
  876.  
  877. // Open the installation for a product to obtain detailed information
  878.  
  879. UINT WINAPI MsiOpenProductA(
  880.     LPCSTR   szProduct,    // product code
  881.     MSIHANDLE  *hProduct);   // returned product handle, must be closed
  882. UINT WINAPI MsiOpenProductW(
  883.     LPCWSTR   szProduct,    // product code
  884.     MSIHANDLE  *hProduct);   // returned product handle, must be closed
  885. #ifdef UNICODE
  886. #define MsiOpenProduct  MsiOpenProductW
  887. #else
  888. #define MsiOpenProduct  MsiOpenProductA
  889. #endif // !UNICODE
  890.  
  891. // Open a product package in order to access product properties
  892.  
  893. UINT WINAPI MsiOpenPackageA(
  894.     LPCSTR    szPackagePath,     // path to package, or database handle: #nnnn
  895.     MSIHANDLE  *hProduct);         // returned product handle, must be closed
  896. UINT WINAPI MsiOpenPackageW(
  897.     LPCWSTR    szPackagePath,     // path to package, or database handle: #nnnn
  898.     MSIHANDLE  *hProduct);         // returned product handle, must be closed
  899. #ifdef UNICODE
  900. #define MsiOpenPackage  MsiOpenPackageW
  901. #else
  902. #define MsiOpenPackage  MsiOpenPackageA
  903. #endif // !UNICODE
  904.  
  905. // Provide the value for an installation property.
  906.  
  907. UINT WINAPI MsiGetProductPropertyA(
  908.     MSIHANDLE   hProduct,       // product handle obtained from MsiOpenProduct
  909.     LPCSTR    szProperty,     // property name, case-sensitive
  910.     LPSTR     lpValueBuf,     // returned value, NULL if not desired
  911.     DWORD      *pcchValueBuf); // in/out buffer character count
  912. UINT WINAPI MsiGetProductPropertyW(
  913.     MSIHANDLE   hProduct,       // product handle obtained from MsiOpenProduct
  914.     LPCWSTR    szProperty,     // property name, case-sensitive
  915.     LPWSTR     lpValueBuf,     // returned value, NULL if not desired
  916.     DWORD      *pcchValueBuf); // in/out buffer character count
  917. #ifdef UNICODE
  918. #define MsiGetProductProperty  MsiGetProductPropertyW
  919. #else
  920. #define MsiGetProductProperty  MsiGetProductPropertyA
  921. #endif // !UNICODE
  922.  
  923.  
  924. // Determine whether a file is a package
  925. // Returns ERROR_SUCCESS if file is a package.
  926.  
  927. UINT WINAPI MsiVerifyPackageA(
  928.     LPCSTR      szPackagePath);   // location of package
  929. UINT WINAPI MsiVerifyPackageW(
  930.     LPCWSTR      szPackagePath);   // location of package
  931. #ifdef UNICODE
  932. #define MsiVerifyPackage  MsiVerifyPackageW
  933. #else
  934. #define MsiVerifyPackage  MsiVerifyPackageA
  935. #endif // !UNICODE
  936.  
  937.  
  938. // Provide descriptive information for product feature: title and description.
  939. // Returns the install level for the feature, or -1 if feature is unknown.
  940. //   0 = feature is not available on this machine
  941. //   1 = highest priority, feature installed if parent is installed
  942. //  >1 = decreasing priority, feature installation based on InstallLevel property
  943.  
  944. UINT WINAPI MsiGetFeatureInfoA(
  945.     MSIHANDLE   hProduct,       // product handle obtained from MsiOpenProduct
  946.     LPCSTR    szFeature,      // feature name
  947.     DWORD      *lpAttributes,  // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  948.     LPSTR     lpTitleBuf,     // returned localized name, NULL if not desired
  949.     DWORD      *pcchTitleBuf,  // in/out buffer character count
  950.     LPSTR     lpHelpBuf,      // returned description, NULL if not desired
  951.     DWORD      *pcchHelpBuf);  // in/out buffer character count
  952. UINT WINAPI MsiGetFeatureInfoW(
  953.     MSIHANDLE   hProduct,       // product handle obtained from MsiOpenProduct
  954.     LPCWSTR    szFeature,      // feature name
  955.     DWORD      *lpAttributes,  // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  956.     LPWSTR     lpTitleBuf,     // returned localized name, NULL if not desired
  957.     DWORD      *pcchTitleBuf,  // in/out buffer character count
  958.     LPWSTR     lpHelpBuf,      // returned description, NULL if not desired
  959.     DWORD      *pcchHelpBuf);  // in/out buffer character count
  960. #ifdef UNICODE
  961. #define MsiGetFeatureInfo  MsiGetFeatureInfoW
  962. #else
  963. #define MsiGetFeatureInfo  MsiGetFeatureInfoA
  964. #endif // !UNICODE
  965.  
  966. // --------------------------------------------------------------------------
  967. // Functions to access or install missing components and files.
  968. // These should be used as a last resort.
  969. // --------------------------------------------------------------------------
  970.  
  971. // Install a component unexpectedly missing, provided only for error recovery
  972. // This would typically occur due to failue to establish feature availability
  973. // The product feature having the smallest incremental cost is installed
  974.  
  975. UINT WINAPI MsiInstallMissingComponentA(
  976.     LPCSTR      szProduct,        // product code
  977.     LPCSTR      szComponent,      // component Id, string GUID
  978.     INSTALLSTATE eInstallState);  // local/source/default, absent invalid
  979. UINT WINAPI MsiInstallMissingComponentW(
  980.     LPCWSTR      szProduct,        // product code
  981.     LPCWSTR      szComponent,      // component Id, string GUID
  982.     INSTALLSTATE eInstallState);  // local/source/default, absent invalid
  983. #ifdef UNICODE
  984. #define MsiInstallMissingComponent  MsiInstallMissingComponentW
  985. #else
  986. #define MsiInstallMissingComponent  MsiInstallMissingComponentA
  987. #endif // !UNICODE
  988.  
  989. // Install a file unexpectedly missing, provided only for error recovery
  990. // This would typically occur due to failue to establish feature availability
  991. // The missing component is determined from the product's File table, then
  992. // the product feature having the smallest incremental cost is installed
  993.  
  994. UINT WINAPI MsiInstallMissingFileA(
  995.     LPCSTR      szProduct,        // product code
  996.     LPCSTR      szFile);          // file name, without path
  997. UINT WINAPI MsiInstallMissingFileW(
  998.     LPCWSTR      szProduct,        // product code
  999.     LPCWSTR      szFile);          // file name, without path
  1000. #ifdef UNICODE
  1001. #define MsiInstallMissingFile  MsiInstallMissingFileW
  1002. #else
  1003. #define MsiInstallMissingFile  MsiInstallMissingFileA
  1004. #endif // !UNICODE
  1005.  
  1006. // Return full path to an installed component without a product code
  1007. // This function attempts to determine the product using MsiGetProductCode
  1008. // but is not guaranteed to find the correct product for the caller.
  1009. // MsiGetComponentPath should always be called when possible.
  1010.  
  1011. INSTALLSTATE WINAPI MsiLocateComponentA(
  1012.     LPCSTR szComponent,  // component Id, string GUID
  1013.     LPSTR  lpPathBuf,    // returned path
  1014.     DWORD   *pcchBuf);    // in/out buffer character count
  1015. INSTALLSTATE WINAPI MsiLocateComponentW(
  1016.     LPCWSTR szComponent,  // component Id, string GUID
  1017.     LPWSTR  lpPathBuf,    // returned path
  1018.     DWORD   *pcchBuf);    // in/out buffer character count
  1019. #ifdef UNICODE
  1020. #define MsiLocateComponent  MsiLocateComponentW
  1021. #else
  1022. #define MsiLocateComponent  MsiLocateComponentA
  1023. #endif // !UNICODE
  1024.  
  1025. #if (_WIN32_MSI >=  110)
  1026.  
  1027. // --------------------------------------------------------------------------
  1028. // Functions used to manage the list of valid sources.
  1029. // --------------------------------------------------------------------------
  1030.  
  1031. // Opens the list of sources for the specified user's install of the product
  1032. // and removes all network sources from the list. A NULL or empty value for
  1033. // the user name indicates the per-machine install.
  1034.  
  1035. UINT WINAPI MsiSourceListClearAllA(
  1036.     LPCSTR szProduct,          // product code
  1037.     LPCSTR szUserName,         // user name or NULL/empty for per-machine
  1038.     DWORD    dwReserved);        // reserved - must be 0
  1039. UINT WINAPI MsiSourceListClearAllW(
  1040.     LPCWSTR szProduct,          // product code
  1041.     LPCWSTR szUserName,         // user name or NULL/empty for per-machine
  1042.     DWORD    dwReserved);        // reserved - must be 0
  1043. #ifdef UNICODE
  1044. #define MsiSourceListClearAll  MsiSourceListClearAllW
  1045. #else
  1046. #define MsiSourceListClearAll  MsiSourceListClearAllA
  1047. #endif // !UNICODE
  1048.  
  1049. // Opens the list of sources for the specified user's install of the product
  1050. // and adds the provided source as a new network source. A NULL or empty 
  1051. // value for the user name indicates the per-machine install.
  1052.  
  1053. UINT WINAPI MsiSourceListAddSourceA(
  1054.     LPCSTR szProduct,          // product code
  1055.     LPCSTR szUserName,         // user name or NULL/empty for per-machine
  1056.     DWORD    dwReserved,         // reserved - must be 0
  1057.     LPCSTR szSource);          // new source
  1058. UINT WINAPI MsiSourceListAddSourceW(
  1059.     LPCWSTR szProduct,          // product code
  1060.     LPCWSTR szUserName,         // user name or NULL/empty for per-machine
  1061.     DWORD    dwReserved,         // reserved - must be 0
  1062.     LPCWSTR szSource);          // new source
  1063. #ifdef UNICODE
  1064. #define MsiSourceListAddSource  MsiSourceListAddSourceW
  1065. #else
  1066. #define MsiSourceListAddSource  MsiSourceListAddSourceA
  1067. #endif // !UNICODE
  1068.  
  1069. // Forces the installer to reevaluate the list of sources the next time that
  1070. // the specified product needs a source.
  1071.  
  1072. UINT WINAPI MsiSourceListForceResolutionA(
  1073.     LPCSTR szProduct,          // product code
  1074.     LPCSTR szUserName,         // user name or NULL/empty for per-machine
  1075.     DWORD    dwReserved);        // reserved - must be 0
  1076. UINT WINAPI MsiSourceListForceResolutionW(
  1077.     LPCWSTR szProduct,          // product code
  1078.     LPCWSTR szUserName,         // user name or NULL/empty for per-machine
  1079.     DWORD    dwReserved);        // reserved - must be 0
  1080. #ifdef UNICODE
  1081. #define MsiSourceListForceResolution  MsiSourceListForceResolutionW
  1082. #else
  1083. #define MsiSourceListForceResolution  MsiSourceListForceResolutionA
  1084. #endif // !UNICODE
  1085.     
  1086. #endif //(_WIN32_MSI >=  110)
  1087.  
  1088. // --------------------------------------------------------------------------
  1089. // Utility functions
  1090. // --------------------------------------------------------------------------
  1091.  
  1092. // Give the version string and language for a specified file
  1093.  
  1094. UINT WINAPI MsiGetFileVersionA(
  1095.     LPCSTR    szFilePath,       // path to the file
  1096.     LPSTR     lpVersionBuf,     // returned version string
  1097.     DWORD      *pcchVersionBuf,   // in/out buffer byte count
  1098.     LPSTR     lpLangBuf,        // returned language string
  1099.     DWORD       *pcchLangBuf);    // in/out buffer byte count
  1100. UINT WINAPI MsiGetFileVersionW(
  1101.     LPCWSTR    szFilePath,       // path to the file
  1102.     LPWSTR     lpVersionBuf,     // returned version string
  1103.     DWORD      *pcchVersionBuf,   // in/out buffer byte count
  1104.     LPWSTR     lpLangBuf,        // returned language string
  1105.     DWORD       *pcchLangBuf);    // in/out buffer byte count
  1106. #ifdef UNICODE
  1107. #define MsiGetFileVersion  MsiGetFileVersionW
  1108. #else
  1109. #define MsiGetFileVersion  MsiGetFileVersionA
  1110. #endif // !UNICODE
  1111.  
  1112.  
  1113. #if (_WIN32_MSI >=  150)
  1114.  
  1115. UINT WINAPI MsiGetFileHashA(
  1116.     LPCSTR         szFilePath,  // path to the file
  1117.     DWORD            dwOptions,   // options
  1118.     PMSIFILEHASHINFO pHash);      // returned file hash info
  1119. UINT WINAPI MsiGetFileHashW(
  1120.     LPCWSTR         szFilePath,  // path to the file
  1121.     DWORD            dwOptions,   // options
  1122.     PMSIFILEHASHINFO pHash);      // returned file hash info
  1123. #ifdef UNICODE
  1124. #define MsiGetFileHash  MsiGetFileHashW
  1125. #else
  1126. #define MsiGetFileHash  MsiGetFileHashA
  1127. #endif // !UNICODE
  1128.  
  1129. #endif //(_WIN32_MSI >=  150)
  1130.  
  1131. #if (_WIN32_MSI >= 150)
  1132. #ifndef _MSI_NO_CRYPTO
  1133.  
  1134. HRESULT WINAPI MsiGetFileSignatureInformationA(
  1135.     LPCSTR     szSignedObjectPath, // path to the signed object
  1136.     DWORD            dwFlags,            // special extra error case flags
  1137.     PCCERT_CONTEXT  *ppcCertContext,     // returned signer cert context
  1138.     BYTE            *pbHashData,         // returned hash buffer, NULL if not desired
  1139.     DWORD           *pcbHashData);       // in/out buffer byte count
  1140. HRESULT WINAPI MsiGetFileSignatureInformationW(
  1141.     LPCWSTR     szSignedObjectPath, // path to the signed object
  1142.     DWORD            dwFlags,            // special extra error case flags
  1143.     PCCERT_CONTEXT  *ppcCertContext,     // returned signer cert context
  1144.     BYTE            *pbHashData,         // returned hash buffer, NULL if not desired
  1145.     DWORD           *pcbHashData);       // in/out buffer byte count
  1146. #ifdef UNICODE
  1147. #define MsiGetFileSignatureInformation  MsiGetFileSignatureInformationW
  1148. #else
  1149. #define MsiGetFileSignatureInformation  MsiGetFileSignatureInformationA
  1150. #endif // !UNICODE
  1151.  
  1152. // By default, when only requesting the certificate context, an invalid hash
  1153. // in the digital signature is not a fatal error.  Set this flag in the dwFlags
  1154. // parameter to make the TRUST_E_BAD_DIGEST error fatal.
  1155. #define MSI_INVALID_HASH_IS_FATAL 0x1
  1156.  
  1157. #endif// _MSI_NO_CRYPTO
  1158. #endif //(_WIN32_MSI >= 150)
  1159.  
  1160. #if (_WIN32_MSI >=  110)
  1161.  
  1162. // examine a shortcut, and retrieve its descriptor information 
  1163. // if available.
  1164.  
  1165. UINT WINAPI MsiGetShortcutTargetA(
  1166.     LPCSTR    szShortcutPath,    // full file path for the shortcut
  1167.     LPSTR     szProductCode,     // returned product code   - GUID
  1168.     LPSTR     szFeatureId,       // returned Feature Id.
  1169.     LPSTR     szComponentCode);  // returned component code - GUID
  1170. UINT WINAPI MsiGetShortcutTargetW(
  1171.     LPCWSTR    szShortcutPath,    // full file path for the shortcut
  1172.     LPWSTR     szProductCode,     // returned product code   - GUID
  1173.     LPWSTR     szFeatureId,       // returned Feature Id.
  1174.     LPWSTR     szComponentCode);  // returned component code - GUID
  1175. #ifdef UNICODE
  1176. #define MsiGetShortcutTarget  MsiGetShortcutTargetW
  1177. #else
  1178. #define MsiGetShortcutTarget  MsiGetShortcutTargetA
  1179. #endif // !UNICODE
  1180.  
  1181. #endif //(_WIN32_MSI >=  110)
  1182.  
  1183. #ifdef __cplusplus
  1184. }
  1185. #endif
  1186.  
  1187. // --------------------------------------------------------------------------
  1188. // Error codes for installer access functions - until merged to winerr.h
  1189. // --------------------------------------------------------------------------
  1190.  
  1191. #ifndef ERROR_INSTALL_FAILURE
  1192. #define ERROR_INSTALL_USEREXIT      1602L  // User cancel installation.
  1193. #define ERROR_INSTALL_FAILURE       1603L  // Fatal error during installation.
  1194. #define ERROR_INSTALL_SUSPEND       1604L  // Installation suspended, incomplete.
  1195. // LOCALIZE BEGIN:
  1196. #define ERROR_UNKNOWN_PRODUCT       1605L  // This action is only valid for products that are currently installed.
  1197. // LOCALIZE END
  1198. #define ERROR_UNKNOWN_FEATURE       1606L  // Feature ID not registered.
  1199. #define ERROR_UNKNOWN_COMPONENT     1607L  // Component ID not registered.
  1200. #define ERROR_UNKNOWN_PROPERTY      1608L  // Unknown property.
  1201. #define ERROR_INVALID_HANDLE_STATE  1609L  // Handle is in an invalid state.
  1202. // LOCALIZE BEGIN:
  1203. #define ERROR_BAD_CONFIGURATION     1610L  // The configuration data for this product is corrupt.  Contact your support personnel.
  1204. // LOCALIZE END:
  1205. #define ERROR_INDEX_ABSENT          1611L  // Component qualifier not present.
  1206. // LOCALIZE BEGIN:
  1207. #define ERROR_INSTALL_SOURCE_ABSENT 1612L  // The installation source for this product is not available.  Verify that the source exists and that you can access it.
  1208. // LOCALIZE END
  1209. #define ERROR_PRODUCT_UNINSTALLED   1614L  // Product is uninstalled.
  1210. #define ERROR_BAD_QUERY_SYNTAX      1615L  // SQL query syntax invalid or unsupported.
  1211. #define ERROR_INVALID_FIELD         1616L  // Record field does not exist.
  1212. #endif
  1213.  
  1214. // LOCALIZE BEGIN:
  1215. #ifndef ERROR_INSTALL_SERVICE_FAILURE
  1216. #define ERROR_INSTALL_SERVICE_FAILURE      1601L // The Windows Installer service could not be accessed.  Contact your support personnel to verify that the Windows Installer service is properly registered.
  1217. #define ERROR_INSTALL_PACKAGE_VERSION      1613L // This installation package cannot be installed by the Windows Installer service.  You must install a Windows service pack that contains a newer version of the Windows Installer service.
  1218. #define ERROR_INSTALL_ALREADY_RUNNING      1618L // Another installation is already in progress.  Complete that installation before proceeding with this install.
  1219. #define ERROR_INSTALL_PACKAGE_OPEN_FAILED  1619L // This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
  1220. #define ERROR_INSTALL_PACKAGE_INVALID      1620L // This installation package could not be opened.  Contact the application vendor to verify that this is a valid Windows Installer package.
  1221. #define ERROR_INSTALL_UI_FAILURE           1621L // There was an error starting the Windows Installer service user interface.  Contact your support personnel.
  1222. #define ERROR_INSTALL_LOG_FAILURE          1622L // Error opening installation log file.  Verify that the specified log file location exists and is writable.
  1223. #define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L // This language of this installation package is not supported by your system.
  1224. #define ERROR_INSTALL_PACKAGE_REJECTED     1625L // The system administrator has set policies to prevent this installation.
  1225. // LOCALIZE END
  1226.  
  1227. #define ERROR_FUNCTION_NOT_CALLED          1626L // Function could not be executed.
  1228. #define ERROR_FUNCTION_FAILED              1627L // Function failed during execution.
  1229. #define ERROR_INVALID_TABLE                1628L // Invalid or unknown table specified.
  1230. #define ERROR_DATATYPE_MISMATCH            1629L // Data supplied is of wrong type.
  1231. #define ERROR_UNSUPPORTED_TYPE             1630L // Data of this type is not supported.
  1232. // LOCALIZE BEGIN:
  1233. #define ERROR_CREATE_FAILED                1631L // The Windows Installer service failed to start.  Contact your support personnel.
  1234. // LOCALIZE END:
  1235. #endif
  1236.  
  1237. // LOCALIZE BEGIN:
  1238. #ifndef ERROR_INSTALL_TEMP_UNWRITABLE      
  1239. #define ERROR_INSTALL_TEMP_UNWRITABLE      1632L // The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
  1240. #endif
  1241.  
  1242. #ifndef ERROR_INSTALL_PLATFORM_UNSUPPORTED
  1243. #define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L // This installation package is not supported by this processor type. Contact your product vendor.
  1244. #endif
  1245. // LOCALIZE END
  1246.  
  1247. #ifndef ERROR_INSTALL_NOTUSED
  1248. #define ERROR_INSTALL_NOTUSED              1634L // Component not used on this machine
  1249. #endif
  1250.  
  1251. // LOCALIZE BEGIN:
  1252. #ifndef ERROR_INSTALL_TRANSFORM_FAILURE
  1253. #define ERROR_INSTALL_TRANSFORM_FAILURE     1624L // Error applying transforms.  Verify that the specified transform paths are valid.
  1254. #endif
  1255.  
  1256. #ifndef ERROR_PATCH_PACKAGE_OPEN_FAILED
  1257. #define ERROR_PATCH_PACKAGE_OPEN_FAILED    1635L // This patch package could not be opened.  Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
  1258. #define ERROR_PATCH_PACKAGE_INVALID        1636L // This patch package could not be opened.  Contact the application vendor to verify that this is a valid Windows Installer patch package.
  1259. #define ERROR_PATCH_PACKAGE_UNSUPPORTED    1637L // This patch package cannot be processed by the Windows Installer service.  You must install a Windows service pack that contains a newer version of the Windows Installer service.
  1260. #endif
  1261.  
  1262. #ifndef ERROR_PRODUCT_VERSION
  1263. #define ERROR_PRODUCT_VERSION              1638L // Another version of this product is already installed.  Installation of this version cannot continue.  To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
  1264. #endif
  1265.  
  1266. #ifndef ERROR_INVALID_COMMAND_LINE
  1267. #define ERROR_INVALID_COMMAND_LINE         1639L // Invalid command line argument.  Consult the Windows Installer SDK for detailed command line help.
  1268. #endif
  1269.  
  1270. // The following three error codes are not returned from MSI version 1.0
  1271.  
  1272. #ifndef ERROR_INSTALL_REMOTE_DISALLOWED
  1273. #define ERROR_INSTALL_REMOTE_DISALLOWED    1640L // Configuration of this product is not permitted from remote sessions. Contact your administrator.
  1274. #endif
  1275.  
  1276. // LOCALIZE END
  1277.  
  1278. #ifndef ERROR_SUCCESS_REBOOT_INITIATED
  1279. #define ERROR_SUCCESS_REBOOT_INITIATED     1641L // The requested operation completed successfully.  The system will be restarted so the changes can take effect.
  1280. #endif
  1281.  
  1282. // LOCALIZE BEGIN:
  1283. #ifndef ERROR_PATCH_TARGET_NOT_FOUND
  1284. #define ERROR_PATCH_TARGET_NOT_FOUND       1642L // The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
  1285. #endif
  1286. // LOCALIZE END
  1287.  
  1288. // The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
  1289.  
  1290. // LOCALIZE BEGIN:
  1291. #ifndef ERROR_PATCH_PACKAGE_REJECTED
  1292. #define ERROR_PATCH_PACKAGE_REJECTED       1643L // The patch package is not permitted by system policy.  It is not signed with an appropriate certificate.
  1293. #endif
  1294.  
  1295. #ifndef ERROR_INSTALL_TRANSFORM_REJECTED
  1296. #define ERROR_INSTALL_TRANSFORM_REJECTED   1644L // One or more customizations are not permitted by system policy.  They are not signed with an appropriate certificate.
  1297. #endif
  1298. // LOCALIZE END
  1299.  
  1300. #endif // _MSI_H_
  1301.