Headers diff for msi.dll between 5.0.7601.18896-Windows_7.0 and 5.0.9600.17415-Windows_8.1 versions



 msi.h (5.0.7601.18896-Windows_7.0)   msi.h (5.0.9600.17415-Windows_8.1) 
skipping to change at line 18 skipping to change at line 18
* NOTES: All buffers sizes are TCHAR count, null included only on input * * NOTES: All buffers sizes are TCHAR count, null included only on input *
* Return argument pointers may be null if not interested in value * * Return argument pointers may be null if not interested in value *
* * * *
* Copyright (c) Microsoft Corporation. All rights reserved. * * Copyright (c) Microsoft Corporation. All rights reserved. *
* * * *
\*****************************************************************************/ \*****************************************************************************/
#ifndef _MSI_H_ #ifndef _MSI_H_
#define _MSI_H_ #define _MSI_H_
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef NTDDI_WIN2K #ifndef NTDDI_WIN2K
#define NTDDI_WIN2K 0x05000000 #define NTDDI_WIN2K 0x05000000
#endif #endif
#ifndef NTDDI_WINXP #ifndef NTDDI_WINXP
#define NTDDI_WINXP 0x05010000 #define NTDDI_WINXP 0x05010000
#endif #endif
#ifndef NTDDI_WINXPSP2 #ifndef NTDDI_WINXPSP2
#define NTDDI_WINXPSP2 0x05010200 #define NTDDI_WINXPSP2 0x05010200
#endif #endif
#ifndef NTDDI_WS03SP1 #ifndef NTDDI_WS03SP1
skipping to change at line 39 skipping to change at line 44
#endif #endif
#ifndef NTDDI_VISTA #ifndef NTDDI_VISTA
#define NTDDI_VISTA 0x06000000 #define NTDDI_VISTA 0x06000000
#endif #endif
#ifndef NTDDI_VISTASP1 #ifndef NTDDI_VISTASP1
#define NTDDI_VISTASP1 0x06000100 #define NTDDI_VISTASP1 0x06000100
#endif #endif
#ifndef NTDDI_WIN7 #ifndef NTDDI_WIN7
#define NTDDI_WIN7 0x06010000 #define NTDDI_WIN7 0x06010000
#endif #endif
#ifndef NTDDI_WIN8
#define NTDDI_WIN8 0x06020000
#endif
#ifndef NTDDI_WINBLUE
#define NTDDI_WINBLUE 0x06030000
#endif
#ifndef _WIN32_MSI #ifndef _WIN32_MSI
#if (_WIN32_WINNT >= 0x0601 || (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI _WIN7)) #if (_WIN32_WINNT >= 0x0601 || (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI _WIN7))
#define _WIN32_MSI 500 #define _WIN32_MSI 500
#elif (_WIN32_WINNT >= 0x0501 || (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTD DI_WINXP)) #elif (_WIN32_WINNT >= 0x0501 || (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTD DI_WINXP))
#if (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_VISTASP1) #if (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_VISTASP1)
#define _WIN32_MSI 450 #define _WIN32_MSI 450
#elif (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_VISTA) #elif (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_VISTA)
#define _WIN32_MSI 400 #define _WIN32_MSI 400
#elif (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WS03SP1) #elif (defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WS03SP1)
skipping to change at line 443 skipping to change at line 454
typedef struct _MSIFILEHASHINFO { typedef struct _MSIFILEHASHINFO {
ULONG dwFileHashInfoSize; ULONG dwFileHashInfoSize;
ULONG dwData [ 4 ]; ULONG dwData [ 4 ];
} MSIFILEHASHINFO, *PMSIFILEHASHINFO; } MSIFILEHASHINFO, *PMSIFILEHASHINFO;
typedef enum tagMSIARCHITECTUREFLAGS typedef enum tagMSIARCHITECTUREFLAGS
{ {
MSIARCHITECTUREFLAGS_X86 = 0x00000001L, // set if creating the script f or i386 platform MSIARCHITECTUREFLAGS_X86 = 0x00000001L, // set if creating the script f or i386 platform
MSIARCHITECTUREFLAGS_IA64 = 0x00000002L, // set if creating the script f or IA64 platform MSIARCHITECTUREFLAGS_IA64 = 0x00000002L, // set if creating the script f or IA64 platform
MSIARCHITECTUREFLAGS_AMD64 = 0x00000004L // set if creating the script fo MSIARCHITECTUREFLAGS_AMD64 = 0x00000004L, // set if creating the script f
r AMD64 platform or AMD64 platform
MSIARCHITECTUREFLAGS_ARM = 0x00000008L //set if creating the script for
ARM platform
}MSIARCHITECTUREFLAGS; }MSIARCHITECTUREFLAGS;
typedef enum tagMSIOPENPACKAGEFLAGS typedef enum tagMSIOPENPACKAGEFLAGS
{ {
MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = 0x00000001L, // ignore the machi ne state when creating the engine MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = 0x00000001L, // ignore the machi ne state when creating the engine
}MSIOPENPACKAGEFLAGS; }MSIOPENPACKAGEFLAGS;
typedef enum tagMSIADVERTISEOPTIONFLAGS typedef enum tagMSIADVERTISEOPTIONFLAGS
{ {
MSIADVERTISEOPTIONFLAGS_INSTANCE = 0x00000001L, // set if advertising a n ew instance MSIADVERTISEOPTIONFLAGS_INSTANCE = 0x00000001L, // set if advertising a n ew instance
skipping to change at line 506 skipping to change at line 518
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to set the UI handling and logging. The UI will be used for error, // Functions to set the UI handling and logging. The UI will be used for error,
// progress, and log messages for all subsequent calls to Installer Service // progress, and log messages for all subsequent calls to Installer Service
// API functions that require UI. // API functions that require UI.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Enable internal UI // Enable internal UI
INSTALLUILEVEL WINAPI MsiSetInternalUI( INSTALLUILEVEL WINAPI MsiSetInternalUI(
__in INSTALLUILEVEL dwUILevel, // UI level _In_ INSTALLUILEVEL dwUILevel, // UI level
__inout_opt HWND *phWnd); // handle of owner window _Inout_opt_ HWND *phWnd); // handle of owner window
// Enable external UI handling, returns any previous handler or NULL if none. // Enable external UI handling, returns any previous handler or NULL if none.
// Messages are designated with a combination of bits from INSTALLLOGMODE enum. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA( INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(
__in_opt INSTALLUI_HANDLERA puiHandler, // for progress and error handli _In_opt_ INSTALLUI_HANDLERA puiHandler, // for progress and error handli
ng ng
__in DWORD dwMessageFilter, // bit flags designating message _In_ DWORD dwMessageFilter, // bit flags designating message
s to handle s to handle
__in_opt LPVOID pvContext); // application context _In_opt_ LPVOID pvContext); // application context
INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW( INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(
__in_opt INSTALLUI_HANDLERW puiHandler, // for progress and error handli _In_opt_ INSTALLUI_HANDLERW puiHandler, // for progress and error handli
ng ng
__in DWORD dwMessageFilter, // bit flags designating message _In_ DWORD dwMessageFilter, // bit flags designating message
s to handle s to handle
__in_opt LPVOID pvContext); // application context _In_opt_ LPVOID pvContext); // application context
#ifdef UNICODE #ifdef UNICODE
#define MsiSetExternalUI MsiSetExternalUIW #define MsiSetExternalUI MsiSetExternalUIW
#else #else
#define MsiSetExternalUI MsiSetExternalUIA #define MsiSetExternalUI MsiSetExternalUIA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 310) #if (_WIN32_MSI >= 310)
UINT WINAPI MsiSetExternalUIRecord( UINT WINAPI MsiSetExternalUIRecord(
__in_opt INSTALLUI_HANDLER_RECORD puiHandler, // for progress and _In_opt_ INSTALLUI_HANDLER_RECORD puiHandler, // for progress and
error handling error handling
__in DWORD dwMessageFilter, // bit flags design _In_ DWORD dwMessageFilter, // bit flags design
ating messages to handle ating messages to handle
__in_opt LPVOID pvContext, // application cont _In_opt_ LPVOID pvContext, // application cont
ext ext
__out_opt PINSTALLUI_HANDLER_RECORD ppuiPrevHandler); // pointer to the p _Out_opt_ PINSTALLUI_HANDLER_RECORD ppuiPrevHandler); // pointer to the p
reviously set handler reviously set handler
#endif // (_WIN32_MSI >= 310) #endif // (_WIN32_MSI >= 310)
// Enable logging to a file for all install sessions for the client process, // Enable logging to a file for all install sessions for the client process,
// with control over which log messages are passed to the specified log file. // with control over which log messages are passed to the specified log file.
// Messages are designated with a combination of bits from INSTALLLOGMODE enum. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
UINT WINAPI MsiEnableLogA( UINT WINAPI MsiEnableLogA(
__in DWORD dwLogMode, // bit flags designating operations t _In_ DWORD dwLogMode, // bit flags designating operations t
o report o report
__in_opt LPCSTR szLogFile, // log file, or NULL to disable logging _In_opt_ LPCSTR szLogFile, // log file, or NULL to disable logging
__in DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags _In_ DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
UINT WINAPI MsiEnableLogW( UINT WINAPI MsiEnableLogW(
__in DWORD dwLogMode, // bit flags designating operations t _In_ DWORD dwLogMode, // bit flags designating operations t
o report o report
__in_opt LPCWSTR szLogFile, // log file, or NULL to disable loggin _In_opt_ LPCWSTR szLogFile, // log file, or NULL to disable loggin
g g
__in DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags _In_ DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
#ifdef UNICODE #ifdef UNICODE
#define MsiEnableLog MsiEnableLogW #define MsiEnableLog MsiEnableLogW
#else #else
#define MsiEnableLog MsiEnableLogA #define MsiEnableLog MsiEnableLogA
#endif // !UNICODE #endif // !UNICODE
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to query and configure a product as a whole. // Functions to query and configure a product as a whole.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Return the installed state for a product // Return the installed state for a product
INSTALLSTATE WINAPI MsiQueryProductStateA( INSTALLSTATE WINAPI MsiQueryProductStateA(
__in LPCSTR szProduct); _In_ LPCSTR szProduct);
INSTALLSTATE WINAPI MsiQueryProductStateW( INSTALLSTATE WINAPI MsiQueryProductStateW(
__in LPCWSTR szProduct); _In_ LPCWSTR szProduct);
#ifdef UNICODE #ifdef UNICODE
#define MsiQueryProductState MsiQueryProductStateW #define MsiQueryProductState MsiQueryProductStateW
#else #else
#define MsiQueryProductState MsiQueryProductStateA #define MsiQueryProductState MsiQueryProductStateA
#endif // !UNICODE #endif // !UNICODE
// Return product info // Return product info
UINT WINAPI MsiGetProductInfoA( UINT WINAPI MsiGetProductInfoA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in LPCSTR szAttribute, // attribute name, _In_ LPCSTR szAttribute, // attribute name,
case-sensitive case-sensitive
__out_ecount_opt(*pcchValueBuf) LPSTR lpValueBuf, // returned value, _Out_writes_opt_(*pcchValueBuf) LPSTR lpValueBuf, // returned value,
NULL if not desired NULL if not desired
__inout_opt LPDWORD pcchValueBuf); // in/out buffer _Inout_opt_ LPDWORD pcchValueBuf); // in/out buffer
character count character count
UINT WINAPI MsiGetProductInfoW( UINT WINAPI MsiGetProductInfoW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in LPCWSTR szAttribute, // attribute name, _In_ LPCWSTR szAttribute, // attribute name,
case-sensitive case-sensitive
__out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf, // returned value, _Out_writes_opt_(*pcchValueBuf) LPWSTR lpValueBuf, // returned value,
NULL if not desired NULL if not desired
__inout_opt LPDWORD pcchValueBuf); // in/out buffer _Inout_opt_ LPDWORD pcchValueBuf); // in/out buffer
character count character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetProductInfo MsiGetProductInfoW #define MsiGetProductInfo MsiGetProductInfoW
#else #else
#define MsiGetProductInfo MsiGetProductInfoA #define MsiGetProductInfo MsiGetProductInfoA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 300) #if (_WIN32_MSI >= 300)
// Retrieve product info for a particular product instance // Retrieve product info for a particular product instance
UINT WINAPI MsiGetProductInfoExA( UINT WINAPI MsiGetProductInfoExA(
__in LPCSTR szProductCode, // Information is que _In_ LPCSTR szProductCode, // Information is que
ried on this product ried on this product
__in_opt LPCSTR szUserSid, // Account of this pr _In_opt_ LPCSTR szUserSid, // Account of this pr
oduct instance oduct instance
__in MSIINSTALLCONTEXT dwContext, // Context of this _In_ MSIINSTALLCONTEXT dwContext, // Context of this
product instance product instance
__in LPCSTR szProperty, // Property being que _In_ LPCSTR szProperty, // Property being que
ried ried
__out_ecount_opt(*pcchValue) LPSTR szValue, // Value read _Out_writes_opt_(*pcchValue) LPSTR szValue, // Value read
__inout_opt LPDWORD pcchValue); // size of the szVa _Inout_opt_ LPDWORD pcchValue); // size of the szVa
lue buffer lue buffer
UINT WINAPI MsiGetProductInfoExW( UINT WINAPI MsiGetProductInfoExW(
__in LPCWSTR szProductCode, // Information is qu _In_ LPCWSTR szProductCode, // Information is qu
eried on this product eried on this product
__in_opt LPCWSTR szUserSid, // Account of this p _In_opt_ LPCWSTR szUserSid, // Account of this p
roduct instance roduct instance
__in MSIINSTALLCONTEXT dwContext, // Context of this _In_ MSIINSTALLCONTEXT dwContext, // Context of this
product instance product instance
__in LPCWSTR szProperty, // Property being qu _In_ LPCWSTR szProperty, // Property being qu
eried eried
__out_ecount_opt(*pcchValue) LPWSTR szValue, // Value read _Out_writes_opt_(*pcchValue) LPWSTR szValue, // Value read
__inout_opt LPDWORD pcchValue); // size of the szVa _Inout_opt_ LPDWORD pcchValue); // size of the szVa
lue buffer lue buffer
#ifdef UNICODE #ifdef UNICODE
#define MsiGetProductInfoEx MsiGetProductInfoExW #define MsiGetProductInfoEx MsiGetProductInfoExW
#else #else
#define MsiGetProductInfoEx MsiGetProductInfoExA #define MsiGetProductInfoEx MsiGetProductInfoExA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 300) #endif //(_WIN32_MSI >= 300)
// Install a new product. // Install a new product.
// Either may be NULL, but the DATABASE property must be specfied // Either may be NULL, but the DATABASE property must be specfied
UINT WINAPI MsiInstallProductA( UINT WINAPI MsiInstallProductA(
__in LPCSTR szPackagePath, // location of package to install _In_ LPCSTR szPackagePath, // location of package to install
__in_opt LPCSTR szCommandLine); // command line <property settings _In_opt_ LPCSTR szCommandLine); // command line <property settings
> >
UINT WINAPI MsiInstallProductW( UINT WINAPI MsiInstallProductW(
__in LPCWSTR szPackagePath, // location of package to install _In_ LPCWSTR szPackagePath, // location of package to install
__in_opt LPCWSTR szCommandLine); // command line <property setting _In_opt_ LPCWSTR szCommandLine); // command line <property setting
s> s>
#ifdef UNICODE #ifdef UNICODE
#define MsiInstallProduct MsiInstallProductW #define MsiInstallProduct MsiInstallProductW
#else #else
#define MsiInstallProduct MsiInstallProductA #define MsiInstallProduct MsiInstallProductA
#endif // !UNICODE #endif // !UNICODE
// Install/uninstall an advertised or installed product // Install/uninstall an advertised or installed product
// No action if installed and INSTALLSTATE_DEFAULT specified // No action if installed and INSTALLSTATE_DEFAULT specified
UINT WINAPI MsiConfigureProductA( UINT WINAPI MsiConfigureProductA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in int iInstallLevel, // how much of the product to install _In_ int iInstallLevel, // how much of the product to install
__in INSTALLSTATE eInstallState); // local/source/default/absent/lock/u _In_ INSTALLSTATE eInstallState); // local/source/default/absent/lock/u
ncache ncache
UINT WINAPI MsiConfigureProductW( UINT WINAPI MsiConfigureProductW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in int iInstallLevel, // how much of the product to install _In_ int iInstallLevel, // how much of the product to install
__in INSTALLSTATE eInstallState); // local/source/default/absent/lock/u _In_ INSTALLSTATE eInstallState); // local/source/default/absent/lock/u
ncache ncache
#ifdef UNICODE #ifdef UNICODE
#define MsiConfigureProduct MsiConfigureProductW #define MsiConfigureProduct MsiConfigureProductW
#else #else
#define MsiConfigureProduct MsiConfigureProductA #define MsiConfigureProduct MsiConfigureProductA
#endif // !UNICODE #endif // !UNICODE
// Install/uninstall an advertised or installed product // Install/uninstall an advertised or installed product
// No action if installed and INSTALLSTATE_DEFAULT specified // No action if installed and INSTALLSTATE_DEFAULT specified
UINT WINAPI MsiConfigureProductExA( UINT WINAPI MsiConfigureProductExA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in int iInstallLevel, // how much of the product to in _In_ int iInstallLevel, // how much of the product to in
stall stall
__in INSTALLSTATE eInstallState, // local/source/default/absent/l _In_ INSTALLSTATE eInstallState, // local/source/default/absent/l
ock/uncache ock/uncache
__in_opt LPCSTR szCommandLine); // command line <property settings _In_opt_ LPCSTR szCommandLine); // command line <property settings
> >
UINT WINAPI MsiConfigureProductExW( UINT WINAPI MsiConfigureProductExW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in int iInstallLevel, // how much of the product to in _In_ int iInstallLevel, // how much of the product to in
stall stall
__in INSTALLSTATE eInstallState, // local/source/default/absent/l _In_ INSTALLSTATE eInstallState, // local/source/default/absent/l
ock/uncache ock/uncache
__in_opt LPCWSTR szCommandLine); // command line <property setting _In_opt_ LPCWSTR szCommandLine); // command line <property setting
s> s>
#ifdef UNICODE #ifdef UNICODE
#define MsiConfigureProductEx MsiConfigureProductExW #define MsiConfigureProductEx MsiConfigureProductExW
#else #else
#define MsiConfigureProductEx MsiConfigureProductExA #define MsiConfigureProductEx MsiConfigureProductExA
#endif // !UNICODE #endif // !UNICODE
// Reinstall product, used to validate or correct problems // Reinstall product, used to validate or correct problems
UINT WINAPI MsiReinstallProductA( UINT WINAPI MsiReinstallProductA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in DWORD szReinstallMode); // one or more REINSTALLMODE modes _In_ DWORD szReinstallMode); // one or more REINSTALLMODE modes
UINT WINAPI MsiReinstallProductW( UINT WINAPI MsiReinstallProductW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in DWORD szReinstallMode); // one or more REINSTALLMODE modes _In_ DWORD szReinstallMode); // one or more REINSTALLMODE modes
#ifdef UNICODE #ifdef UNICODE
#define MsiReinstallProduct MsiReinstallProductW #define MsiReinstallProduct MsiReinstallProductW
#else #else
#define MsiReinstallProduct MsiReinstallProductA #define MsiReinstallProduct MsiReinstallProductA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 150) #if (_WIN32_MSI >= 150)
// Output reg and shortcut info to script file for specified architecture for As sign or Publish // Output reg and shortcut info to script file for specified architecture for As sign or Publish
// If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct) // If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
// If dwPlatform specifies a platform, then the script is created as if the curr ent platform is the // If dwPlatform specifies a platform, then the script is created as if the curr ent platform is the
// platform specified in dwPlatform // platform specified in dwPlatform
// If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance i s advertised. Use of // If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance i s advertised. Use of
// this option requires that szTransforms include the instance transform that changes the product code // this option requires that szTransforms include the instance transform that changes the product code
UINT WINAPI MsiAdvertiseProductExA( UINT WINAPI MsiAdvertiseProductExA(
__in LPCSTR szPackagePath, // location of package _In_ LPCSTR szPackagePath, // location of package
__in_opt LPCSTR szScriptfilePath, // if NULL, product is locally adv _In_opt_ LPCSTR szScriptfilePath, // if NULL, product is locally adv
ertised ertised
__in_opt LPCSTR szTransforms, // list of transforms to be applie _In_opt_ LPCSTR szTransforms, // list of transforms to be applie
d d
__in LANGID lgidLanguage, // install language _In_ LANGID lgidLanguage, // install language
__in DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that con _In_ DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that con
trol for which platform trol for which platform
// to create the script, ignored if szS criptfilePath is NULL // to create the script, ignored if szS criptfilePath is NULL
__in DWORD dwOptions); // the MSIADVERTISEOPTIONFLAGS that specify extra advertise parameters _In_ DWORD dwOptions); // the MSIADVERTISEOPTIONFLAGS that specify extra advertise parameters
UINT WINAPI MsiAdvertiseProductExW( UINT WINAPI MsiAdvertiseProductExW(
__in LPCWSTR szPackagePath, // location of package _In_ LPCWSTR szPackagePath, // location of package
__in_opt LPCWSTR szScriptfilePath, // if NULL, product is locally ad _In_opt_ LPCWSTR szScriptfilePath, // if NULL, product is locally ad
vertised vertised
__in_opt LPCWSTR szTransforms, // list of transforms to be appli _In_opt_ LPCWSTR szTransforms, // list of transforms to be appli
ed ed
__in LANGID lgidLanguage, // install language _In_ LANGID lgidLanguage, // install language
__in DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that con _In_ DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that con
trol for which platform trol for which platform
// to create the script, ignored if szS criptfilePath is NULL // to create the script, ignored if szS criptfilePath is NULL
__in DWORD dwOptions); // the MSIADVERTISEOPTIONFLAGS that specify extra advertise parameters _In_ DWORD dwOptions); // the MSIADVERTISEOPTIONFLAGS that specify extra advertise parameters
#ifdef UNICODE #ifdef UNICODE
#define MsiAdvertiseProductEx MsiAdvertiseProductExW #define MsiAdvertiseProductEx MsiAdvertiseProductExW
#else #else
#define MsiAdvertiseProductEx MsiAdvertiseProductExA #define MsiAdvertiseProductEx MsiAdvertiseProductExA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_MSI >= 150) #endif // (_WIN32_MSI >= 150)
// Output reg and shortcut info to script file for Assign or Publish // Output reg and shortcut info to script file for Assign or Publish
UINT WINAPI MsiAdvertiseProductA( UINT WINAPI MsiAdvertiseProductA(
__in LPCSTR szPackagePath, // location of package _In_ LPCSTR szPackagePath, // location of package
__in_opt LPCSTR szScriptfilePath, // if NULL, product is locally ad _In_opt_ LPCSTR szScriptfilePath, // if NULL, product is locally ad
vertised vertised
__in_opt LPCSTR szTransforms, // list of transforms to be appli _In_opt_ LPCSTR szTransforms, // list of transforms to be appli
ed ed
__in LANGID lgidLanguage); // install language _In_ LANGID lgidLanguage); // install language
UINT WINAPI MsiAdvertiseProductW( UINT WINAPI MsiAdvertiseProductW(
__in LPCWSTR szPackagePath, // location of package _In_ LPCWSTR szPackagePath, // location of package
__in_opt LPCWSTR szScriptfilePath, // if NULL, product is locally a _In_opt_ LPCWSTR szScriptfilePath, // if NULL, product is locally a
dvertised dvertised
__in_opt LPCWSTR szTransforms, // list of transforms to be appl _In_opt_ LPCWSTR szTransforms, // list of transforms to be appl
ied ied
__in LANGID lgidLanguage); // install language _In_ LANGID lgidLanguage); // install language
#ifdef UNICODE #ifdef UNICODE
#define MsiAdvertiseProduct MsiAdvertiseProductW #define MsiAdvertiseProduct MsiAdvertiseProductW
#else #else
#define MsiAdvertiseProduct MsiAdvertiseProductA #define MsiAdvertiseProduct MsiAdvertiseProductA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 150) #if (_WIN32_MSI >= 150)
// Process advertise script file into supplied locations // Process advertise script file into supplied locations
// If an icon folder is specified, icon files will be placed there // If an icon folder is specified, icon files will be placed there
// If an registry key is specified, registry data will be mapped under it // If an registry key is specified, registry data will be mapped under it
// If fShortcuts is TRUE, shortcuts will be created. If a special folder is // If fShortcuts is TRUE, shortcuts will be created. If a special folder is
// returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts. // returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
// if fRemoveItems is TRUE, items that are present will be removed // if fRemoveItems is TRUE, items that are present will be removed
UINT WINAPI MsiProcessAdvertiseScriptA( UINT WINAPI MsiProcessAdvertiseScriptA(
__in LPCSTR szScriptFile, // path to script from MsiAdvertiseProduc _In_ LPCSTR szScriptFile, // path to script from MsiAdvertiseProduc
t t
__in_opt LPCSTR szIconFolder, // optional path to folder for icon f _In_opt_ LPCSTR szIconFolder, // optional path to folder for icon f
iles and transforms iles and transforms
__in_opt HKEY hRegData, // optional parent registry key _In_opt_ HKEY hRegData, // optional parent registry key
__in BOOL fShortcuts, // TRUE if shortcuts output to special f _In_ BOOL fShortcuts, // TRUE if shortcuts output to special f
older older
__in BOOL fRemoveItems); // TRUE if specified items are to be rem _In_ BOOL fRemoveItems); // TRUE if specified items are to be rem
oved oved
UINT WINAPI MsiProcessAdvertiseScriptW( UINT WINAPI MsiProcessAdvertiseScriptW(
__in LPCWSTR szScriptFile, // path to script from MsiAdvertiseProdu _In_ LPCWSTR szScriptFile, // path to script from MsiAdvertiseProdu
ct ct
__in_opt LPCWSTR szIconFolder, // optional path to folder for icon _In_opt_ LPCWSTR szIconFolder, // optional path to folder for icon
files and transforms files and transforms
__in_opt HKEY hRegData, // optional parent registry key _In_opt_ HKEY hRegData, // optional parent registry key
__in BOOL fShortcuts, // TRUE if shortcuts output to special f _In_ BOOL fShortcuts, // TRUE if shortcuts output to special f
older older
__in BOOL fRemoveItems); // TRUE if specified items are to be rem _In_ BOOL fRemoveItems); // TRUE if specified items are to be rem
oved oved
#ifdef UNICODE #ifdef UNICODE
#define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptW #define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptW
#else #else
#define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptA #define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_MSI >= 150) #endif // (_WIN32_MSI >= 150)
// Process advertise script file using the supplied dwFlags control flags // Process advertise script file using the supplied dwFlags control flags
// if fRemoveItems is TRUE, items that are present will be removed // if fRemoveItems is TRUE, items that are present will be removed
UINT WINAPI MsiAdvertiseScriptA( UINT WINAPI MsiAdvertiseScriptA(
__in LPCSTR szScriptFile, // path to script from MsiAdvertiseProduc _In_ LPCSTR szScriptFile, // path to script from MsiAdvertiseProduc
t t
__in DWORD dwFlags, // the SCRIPTFLAGS bit flags that contr _In_ DWORD dwFlags, // the SCRIPTFLAGS bit flags that contr
ol the script execution ol the script execution
__in_opt PHKEY phRegData, // optional parent registry key _In_opt_ PHKEY phRegData, // optional parent registry key
__in BOOL fRemoveItems); // TRUE if specified items are to be re _In_ BOOL fRemoveItems); // TRUE if specified items are to be re
moved moved
UINT WINAPI MsiAdvertiseScriptW( UINT WINAPI MsiAdvertiseScriptW(
__in LPCWSTR szScriptFile, // path to script from MsiAdvertiseProdu _In_ LPCWSTR szScriptFile, // path to script from MsiAdvertiseProdu
ct ct
__in DWORD dwFlags, // the SCRIPTFLAGS bit flags that contr _In_ DWORD dwFlags, // the SCRIPTFLAGS bit flags that contr
ol the script execution ol the script execution
__in_opt PHKEY phRegData, // optional parent registry key _In_opt_ PHKEY phRegData, // optional parent registry key
__in BOOL fRemoveItems); // TRUE if specified items are to be re _In_ BOOL fRemoveItems); // TRUE if specified items are to be re
moved moved
#ifdef UNICODE #ifdef UNICODE
#define MsiAdvertiseScript MsiAdvertiseScriptW #define MsiAdvertiseScript MsiAdvertiseScriptW
#else #else
#define MsiAdvertiseScript MsiAdvertiseScriptA #define MsiAdvertiseScript MsiAdvertiseScriptA
#endif // !UNICODE #endif // !UNICODE
// Return product info from an installer script file: // Return product info from an installer script file:
// product code, language, version, readable name, path to package // product code, language, version, readable name, path to package
// Returns TRUE is success, FALSE if szScriptFile is not a valid script file // Returns TRUE is success, FALSE if szScriptFile is not a valid script file
UINT WINAPI MsiGetProductInfoFromScriptA( UINT WINAPI MsiGetProductInfoFromScriptA(
__in LPCSTR szScriptFile, // path to in _In_ LPCSTR szScriptFile, // path to in
staller script file staller script file
__out_ecount_opt(MAX_GUID_CHARS+1) LPSTR lpProductBuf39, // buffer for _Out_writes_opt_(MAX_GUID_CHARS+1) LPSTR lpProductBuf39, // buffer for
product code string GUID, 39 chars product code string GUID, 39 chars
__out_opt LANGID *plgidLanguage, // return la _Out_opt_ LANGID *plgidLanguage, // return la
nguage Id nguage Id
__out_opt LPDWORD pdwVersion, // return ve _Out_opt_ LPDWORD pdwVersion, // return ve
rsion: Maj:Min:Build <8:8:16> rsion: Maj:Min:Build <8:8:16>
__out_ecount_opt(*pcchNameBuf) LPSTR lpNameBuf, // buffer to _Out_writes_opt_(*pcchNameBuf) LPSTR lpNameBuf, // buffer to
return readable product name return readable product name
__inout_opt LPDWORD pcchNameBuf, // in/out na _Inout_opt_ LPDWORD pcchNameBuf, // in/out na
me buffer character count me buffer character count
__out_ecount_opt(*pcchPackageBuf) LPSTR lpPackageBuf, // buffer for _Out_writes_opt_(*pcchPackageBuf) LPSTR lpPackageBuf, // buffer for
path to product package path to product package
__inout_opt LPDWORD pcchPackageBuf);// in/out pa _Inout_opt_ LPDWORD pcchPackageBuf);// in/out pa
th buffer character count th buffer character count
UINT WINAPI MsiGetProductInfoFromScriptW( UINT WINAPI MsiGetProductInfoFromScriptW(
__in LPCWSTR szScriptFile, // path to i _In_ LPCWSTR szScriptFile, // path to i
nstaller script file nstaller script file
__out_ecount_opt(MAX_GUID_CHARS+1) LPWSTR lpProductBuf39, // buffer fo _Out_writes_opt_(MAX_GUID_CHARS+1) LPWSTR lpProductBuf39, // buffer fo
r product code string GUID, 39 chars r product code string GUID, 39 chars
__out_opt LANGID *plgidLanguage, // return la _Out_opt_ LANGID *plgidLanguage, // return la
nguage Id nguage Id
__out_opt LPDWORD pdwVersion, // return ve _Out_opt_ LPDWORD pdwVersion, // return ve
rsion: Maj:Min:Build <8:8:16> rsion: Maj:Min:Build <8:8:16>
__out_ecount_opt(*pcchNameBuf) LPWSTR lpNameBuf, // buffer to _Out_writes_opt_(*pcchNameBuf) LPWSTR lpNameBuf, // buffer to
return readable product name return readable product name
__inout_opt LPDWORD pcchNameBuf, // in/out na _Inout_opt_ LPDWORD pcchNameBuf, // in/out na
me buffer character count me buffer character count
__out_ecount_opt(*pcchPackageBuf) LPWSTR lpPackageBuf, // buffer for _Out_writes_opt_(*pcchPackageBuf) LPWSTR lpPackageBuf, // buffer for
path to product package path to product package
__inout_opt LPDWORD pcchPackageBuf);// in/out pa _Inout_opt_ LPDWORD pcchPackageBuf);// in/out pa
th buffer character count th buffer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptW #define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptW
#else #else
#define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptA #define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptA
#endif // !UNICODE #endif // !UNICODE
// Return the product code for a registered component, called once by apps // Return the product code for a registered component, called once by apps
UINT WINAPI MsiGetProductCodeA( UINT WINAPI MsiGetProductCodeA(
__in LPCSTR szComponent, // component Id registered for this product _In_ LPCSTR szComponent, // component Id registered for this product
__out_ecount(MAX_GUID_CHARS+1) LPSTR lpBuf39); // returned string GUID, _Out_writes_(MAX_GUID_CHARS+1) LPSTR lpBuf39); // returned string GUID,
sized for 39 characters sized for 39 characters
UINT WINAPI MsiGetProductCodeW( UINT WINAPI MsiGetProductCodeW(
__in LPCWSTR szComponent, // component Id registered for this product _In_ LPCWSTR szComponent, // component Id registered for this product
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpBuf39); // returned string GUID _Out_writes_(MAX_GUID_CHARS+1) LPWSTR lpBuf39); // returned string GUID
, sized for 39 characters , sized for 39 characters
#ifdef UNICODE #ifdef UNICODE
#define MsiGetProductCode MsiGetProductCodeW #define MsiGetProductCode MsiGetProductCodeW
#else #else
#define MsiGetProductCode MsiGetProductCodeA #define MsiGetProductCode MsiGetProductCodeA
#endif // !UNICODE #endif // !UNICODE
// Return the registered user information for an installed product // Return the registered user information for an installed product
USERINFOSTATE WINAPI MsiGetUserInfoA( USERINFOSTATE WINAPI MsiGetUserInfoA(
__in LPCSTR szProduct, // product c _In_ LPCSTR szProduct, // product c
ode, string GUID ode, string GUID
__out_ecount_opt(*pcchUserNameBuf) LPSTR lpUserNameBuf, // return us _Out_writes_opt_(*pcchUserNameBuf) LPSTR lpUserNameBuf, // return us
er name er name
__inout_opt LPDWORD pcchUserNameBuf, // in/out b _Inout_opt_ LPDWORD pcchUserNameBuf, // in/out b
uffer character count uffer character count
__out_ecount_opt(*pcchOrgNameBuf) LPSTR lpOrgNameBuf, // return co _Out_writes_opt_(*pcchOrgNameBuf) LPSTR lpOrgNameBuf, // return co
mpany name mpany name
__inout_opt LPDWORD pcchOrgNameBuf, // in/out b _Inout_opt_ LPDWORD pcchOrgNameBuf, // in/out b
uffer character count uffer character count
__out_ecount_opt(*pcchSerialBuf) LPSTR lpSerialBuf, // return pr _Out_writes_opt_(*pcchSerialBuf) LPSTR lpSerialBuf, // return pr
oduct serial number oduct serial number
__inout_opt LPDWORD pcchSerialBuf); // in/out b _Inout_opt_ LPDWORD pcchSerialBuf); // in/out b
uffer character count uffer character count
USERINFOSTATE WINAPI MsiGetUserInfoW( USERINFOSTATE WINAPI MsiGetUserInfoW(
__in LPCWSTR szProduct, // product _In_ LPCWSTR szProduct, // product
code, string GUID code, string GUID
__out_ecount_opt(*pcchUserNameBuf) LPWSTR lpUserNameBuf, // return u _Out_writes_opt_(*pcchUserNameBuf) LPWSTR lpUserNameBuf, // return u
ser name ser name
__inout_opt LPDWORD pcchUserNameBuf, // in/out b _Inout_opt_ LPDWORD pcchUserNameBuf, // in/out b
uffer character count uffer character count
__out_ecount_opt(*pcchOrgNameBuf) LPWSTR lpOrgNameBuf, // return c _Out_writes_opt_(*pcchOrgNameBuf) LPWSTR lpOrgNameBuf, // return c
ompany name ompany name
__inout_opt LPDWORD pcchOrgNameBuf, // in/out b _Inout_opt_ LPDWORD pcchOrgNameBuf, // in/out b
uffer character count uffer character count
__out_ecount_opt(*pcchSerialBuf) LPWSTR lpSerialBuf, // return p _Out_writes_opt_(*pcchSerialBuf) LPWSTR lpSerialBuf, // return p
roduct serial number roduct serial number
__inout_opt LPDWORD pcchSerialBuf); // in/out b _Inout_opt_ LPDWORD pcchSerialBuf); // in/out b
uffer character count uffer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetUserInfo MsiGetUserInfoW #define MsiGetUserInfo MsiGetUserInfoW
#else #else
#define MsiGetUserInfo MsiGetUserInfoA #define MsiGetUserInfo MsiGetUserInfoA
#endif // !UNICODE #endif // !UNICODE
// Obtain and store user info and PID from installation wizard (first run) // Obtain and store user info and PID from installation wizard (first run)
UINT WINAPI MsiCollectUserInfoA( UINT WINAPI MsiCollectUserInfoA(
__in LPCSTR szProduct); // product code, string GUID _In_ LPCSTR szProduct); // product code, string GUID
UINT WINAPI MsiCollectUserInfoW( UINT WINAPI MsiCollectUserInfoW(
__in LPCWSTR szProduct); // product code, string GUID _In_ LPCWSTR szProduct); // product code, string GUID
#ifdef UNICODE #ifdef UNICODE
#define MsiCollectUserInfo MsiCollectUserInfoW #define MsiCollectUserInfo MsiCollectUserInfoW
#else #else
#define MsiCollectUserInfo MsiCollectUserInfoA #define MsiCollectUserInfo MsiCollectUserInfoA
#endif // !UNICODE #endif // !UNICODE
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to query, apply, and remove patches to a product. // Functions to query, apply, and remove patches to a product.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Patch all possible installed products. // Patch all possible installed products.
UINT WINAPI MsiApplyPatchA( UINT WINAPI MsiApplyPatchA(
__in LPCSTR szPatchPackage, // location of patch package _In_ LPCSTR szPatchPackage, // location of patch package
__in_opt LPCSTR szInstallPackage, // location of package for install to p _In_opt_ LPCSTR szInstallPackage, // location of package for install to p
atch <optional> atch <optional>
__in INSTALLTYPE eInstallType, // type of install to patch _In_ INSTALLTYPE eInstallType, // type of install to patch
__in_opt LPCSTR szCommandLine); // command line <property settings> _In_opt_ LPCSTR szCommandLine); // command line <property settings>
UINT WINAPI MsiApplyPatchW( UINT WINAPI MsiApplyPatchW(
__in LPCWSTR szPatchPackage, // location of patch package _In_ LPCWSTR szPatchPackage, // location of patch package
__in_opt LPCWSTR szInstallPackage, // location of package for install to _In_opt_ LPCWSTR szInstallPackage, // location of package for install to
patch <optional> patch <optional>
__in INSTALLTYPE eInstallType, // type of install to patch _In_ INSTALLTYPE eInstallType, // type of install to patch
__in_opt LPCWSTR szCommandLine); // command line <property settings> _In_opt_ LPCWSTR szCommandLine); // command line <property settings>
#ifdef UNICODE #ifdef UNICODE
#define MsiApplyPatch MsiApplyPatchW #define MsiApplyPatch MsiApplyPatchW
#else #else
#define MsiApplyPatch MsiApplyPatchA #define MsiApplyPatch MsiApplyPatchA
#endif // !UNICODE #endif // !UNICODE
// Return patch info for first visible patch // Return patch info for first visible patch
UINT WINAPI MsiGetPatchInfoA( UINT WINAPI MsiGetPatchInfoA(
__in LPCSTR szPatch, // patch code _In_ LPCSTR szPatch, // patch code
__in LPCSTR szAttribute, // attribute name, case _In_ LPCSTR szAttribute, // attribute name, case
-sensitive -sensitive
__out_ecount_opt(*pcchValueBuf) LPSTR lpValueBuf, // returned value, NULL _Out_writes_opt_(*pcchValueBuf) LPSTR lpValueBuf, // returned value, NULL
if not desired if not desired
__inout_opt LPDWORD pcchValueBuf); // in/out buffer char _Inout_opt_ LPDWORD pcchValueBuf); // in/out buffer char
acter count acter count
UINT WINAPI MsiGetPatchInfoW( UINT WINAPI MsiGetPatchInfoW(
__in LPCWSTR szPatch, // patch code _In_ LPCWSTR szPatch, // patch code
__in LPCWSTR szAttribute, // attribute name, cas _In_ LPCWSTR szAttribute, // attribute name, cas
e-sensitive e-sensitive
__out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf, // returned value, NUL _Out_writes_opt_(*pcchValueBuf) LPWSTR lpValueBuf, // returned value, NUL
L if not desired L if not desired
__inout_opt LPDWORD pcchValueBuf); // in/out buffer char _Inout_opt_ LPDWORD pcchValueBuf); // in/out buffer char
acter count acter count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetPatchInfo MsiGetPatchInfoW #define MsiGetPatchInfo MsiGetPatchInfoW
#else #else
#define MsiGetPatchInfo MsiGetPatchInfoA #define MsiGetPatchInfo MsiGetPatchInfoA
#endif // !UNICODE #endif // !UNICODE
// Enumerate all patches for a product in contexts visible to caller // Enumerate all patches for a product in contexts visible to caller
UINT WINAPI MsiEnumPatchesA( UINT WINAPI MsiEnumPatchesA(
__in LPCSTR szProduct, _In_ LPCSTR szProduct,
__in DWORD iPatchIndex, _In_ DWORD iPatchIndex,
__out_ecount(MAX_GUID_CHARS+1) LPSTR lpPatchBuf, _Out_writes_(MAX_GUID_CHARS+1) LPSTR lpPatchBuf,
__out_ecount(*pcchTransformsBuf) LPSTR lpTransformsBuf, _Out_writes_(*pcchTransformsBuf) LPSTR lpTransformsBuf,
__inout LPDWORD pcchTransformsBuf); _Inout_ LPDWORD pcchTransformsBuf);
UINT WINAPI MsiEnumPatchesW( UINT WINAPI MsiEnumPatchesW(
__in LPCWSTR szProduct, _In_ LPCWSTR szProduct,
__in DWORD iPatchIndex, _In_ DWORD iPatchIndex,
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpPatchBuf, _Out_writes_(MAX_GUID_CHARS+1) LPWSTR lpPatchBuf,
__out_ecount(*pcchTransformsBuf) LPWSTR lpTransformsBuf, _Out_writes_(*pcchTransformsBuf) LPWSTR lpTransformsBuf,
__inout LPDWORD pcchTransformsBuf); _Inout_ LPDWORD pcchTransformsBuf);
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumPatches MsiEnumPatchesW #define MsiEnumPatches MsiEnumPatchesW
#else #else
#define MsiEnumPatches MsiEnumPatchesA #define MsiEnumPatches MsiEnumPatchesA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 300) #if (_WIN32_MSI >= 300)
// Remove one or more patches from the specified product. // Remove one or more patches from the specified product.
UINT WINAPI MsiRemovePatchesA( UINT WINAPI MsiRemovePatchesA(
__in LPCSTR szPatchList, // semi-colon delimited list of patches _In_ LPCSTR szPatchList, // semi-colon delimited list of patches
to remove; patch can be referenced by patch package path or Patch GUID to remove; patch can be referenced by patch package path or Patch GUID
__in LPCSTR szProductCode, // ProductCode GUID of product with patc _In_ LPCSTR szProductCode, // ProductCode GUID of product with patc
h to remove h to remove
__in INSTALLTYPE eUninstallType, // type of patch uninstall to perform. _In_ INSTALLTYPE eUninstallType, // type of patch uninstall to perform.
Must be INSTALLTYPE_SINGLE_INSTANCE. Must be INSTALLTYPE_SINGLE_INSTANCE.
__in_opt LPCSTR szPropertyList); // command line property settings using _In_opt_ LPCSTR szPropertyList); // command line property settings using
PROPERTY=VALUE pairs PROPERTY=VALUE pairs
UINT WINAPI MsiRemovePatchesW( UINT WINAPI MsiRemovePatchesW(
__in LPCWSTR szPatchList, // semi-colon delimited list of patches _In_ LPCWSTR szPatchList, // semi-colon delimited list of patches
to remove; patch can be referenced by patch package path or Patch GUID to remove; patch can be referenced by patch package path or Patch GUID
__in LPCWSTR szProductCode, // ProductCode GUID of product with pat _In_ LPCWSTR szProductCode, // ProductCode GUID of product with pat
ch to remove ch to remove
__in INSTALLTYPE eUninstallType, // type of patch uninstall to perform. _In_ INSTALLTYPE eUninstallType, // type of patch uninstall to perform.
Must be INSTALLTYPE_SINGLE_INSTANCE. Must be INSTALLTYPE_SINGLE_INSTANCE.
__in_opt LPCWSTR szPropertyList); // command line property settings using _In_opt_ LPCWSTR szPropertyList); // command line property settings using
PROPERTY=VALUE pairs PROPERTY=VALUE pairs
#ifdef UNICODE #ifdef UNICODE
#define MsiRemovePatches MsiRemovePatchesW #define MsiRemovePatches MsiRemovePatchesW
#else #else
#define MsiRemovePatches MsiRemovePatchesA #define MsiRemovePatches MsiRemovePatchesA
#endif // !UNICODE #endif // !UNICODE
// Extract XML data from the patch // Extract XML data from the patch
UINT WINAPI MsiExtractPatchXMLDataA( UINT WINAPI MsiExtractPatchXMLDataA(
__in LPCSTR szPatchPath, // Patch file to open _In_ LPCSTR szPatchPath, // Patch file to open
__reserved DWORD dwReserved, // Reserved _Reserved_ DWORD dwReserved, // Reserved
__out_ecount_opt(*pcchXMLData) LPSTR szXMLData, // Buffer that gets the _Out_writes_opt_(*pcchXMLData) LPSTR szXMLData, // Buffer that gets the
XML data XML data
__inout_opt LPDWORD pcchXMLData); // in/out XML data buf _Inout_opt_ LPDWORD pcchXMLData); // in/out XML data buf
fer character count fer character count
UINT WINAPI MsiExtractPatchXMLDataW( UINT WINAPI MsiExtractPatchXMLDataW(
__in LPCWSTR szPatchPath, // Patch file to open _In_ LPCWSTR szPatchPath, // Patch file to open
__reserved DWORD dwReserved, // Reserved _Reserved_ DWORD dwReserved, // Reserved
__out_ecount_opt(*pcchXMLData) LPWSTR szXMLData, // Buffer that gets the _Out_writes_opt_(*pcchXMLData) LPWSTR szXMLData, // Buffer that gets the
XML data XML data
__inout_opt LPDWORD pcchXMLData); // in/out XML data buf _Inout_opt_ LPDWORD pcchXMLData); // in/out XML data buf
fer character count fer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiExtractPatchXMLData MsiExtractPatchXMLDataW #define MsiExtractPatchXMLData MsiExtractPatchXMLDataW
#else #else
#define MsiExtractPatchXMLData MsiExtractPatchXMLDataA #define MsiExtractPatchXMLData MsiExtractPatchXMLDataA
#endif // !UNICODE #endif // !UNICODE
// Retrieve extended patch info for a particular patch applied // Retrieve extended patch info for a particular patch applied
// to a particular product instance. // to a particular product instance.
UINT WINAPI MsiGetPatchInfoExA( UINT WINAPI MsiGetPatchInfoExA(
__in LPCSTR szPatchCode, // target patch to query _In_ LPCSTR szPatchCode, // target patch to query
__in LPCSTR szProductCode, // target product of patch a _In_ LPCSTR szProductCode, // target product of patch a
pplication pplication
__in_opt LPCSTR szUserSid, // Account of this product i _In_opt_ LPCSTR szUserSid, // Account of this product i
nstance nstance
__in MSIINSTALLCONTEXT dwContext, // context to query for pr _In_ MSIINSTALLCONTEXT dwContext, // context to query for pr
oduct and patch oduct and patch
__in LPCSTR szProperty, // property of patch to retr _In_ LPCSTR szProperty, // property of patch to retr
ieve ieve
__out_ecount_opt(*pcchValue) LPSTR lpValue, // address buffer for data _Out_writes_opt_(*pcchValue) LPSTR lpValue, // address buffer for data
__inout_opt LPDWORD pcchValue); // in/out value buffer cha _Inout_opt_ LPDWORD pcchValue); // in/out value buffer cha
racter count racter count
UINT WINAPI MsiGetPatchInfoExW( UINT WINAPI MsiGetPatchInfoExW(
__in LPCWSTR szPatchCode, // target patch to query _In_ LPCWSTR szPatchCode, // target patch to query
__in LPCWSTR szProductCode, // target product of patch _In_ LPCWSTR szProductCode, // target product of patch
application application
__in_opt LPCWSTR szUserSid, // Account of this product _In_opt_ LPCWSTR szUserSid, // Account of this product
instance instance
__in MSIINSTALLCONTEXT dwContext, // context to query for pr _In_ MSIINSTALLCONTEXT dwContext, // context to query for pr
oduct and patch oduct and patch
__in LPCWSTR szProperty, // property of patch to ret _In_ LPCWSTR szProperty, // property of patch to ret
rieve rieve
__out_ecount_opt(*pcchValue) LPWSTR lpValue, // address buffer for data _Out_writes_opt_(*pcchValue) LPWSTR lpValue, // address buffer for data
__inout_opt LPDWORD pcchValue); // in/out value buffer cha _Inout_opt_ LPDWORD pcchValue); // in/out value buffer cha
racter count racter count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetPatchInfoEx MsiGetPatchInfoExW #define MsiGetPatchInfoEx MsiGetPatchInfoExW
#else #else
#define MsiGetPatchInfoEx MsiGetPatchInfoExA #define MsiGetPatchInfoEx MsiGetPatchInfoExA
#endif // !UNICODE #endif // !UNICODE
// Apply multiple patches to the specified product or to all eligible products // Apply multiple patches to the specified product or to all eligible products
// on the machine // on the machine
UINT WINAPI MsiApplyMultiplePatchesA( UINT WINAPI MsiApplyMultiplePatchesA(
__in LPCSTR szPatchPackages, // Patches to apply _In_ LPCSTR szPatchPackages, // Patches to apply
__in_opt LPCSTR szProductCode, // target product of patch applicatio _In_opt_ LPCSTR szProductCode, // target product of patch applicatio
n n
__in_opt LPCSTR szPropertiesList); // Properties settings _In_opt_ LPCSTR szPropertiesList); // Properties settings
UINT WINAPI MsiApplyMultiplePatchesW( UINT WINAPI MsiApplyMultiplePatchesW(
__in LPCWSTR szPatchPackages, // Patches to apply _In_ LPCWSTR szPatchPackages, // Patches to apply
__in_opt LPCWSTR szProductCode, // target product of patch applicati _In_opt_ LPCWSTR szProductCode, // target product of patch applicati
on on
__in_opt LPCWSTR szPropertiesList); // Properties settings _In_opt_ LPCWSTR szPropertiesList); // Properties settings
#ifdef UNICODE #ifdef UNICODE
#define MsiApplyMultiplePatches MsiApplyMultiplePatchesW #define MsiApplyMultiplePatches MsiApplyMultiplePatchesW
#else #else
#define MsiApplyMultiplePatches MsiApplyMultiplePatchesA #define MsiApplyMultiplePatches MsiApplyMultiplePatchesA
#endif // !UNICODE #endif // !UNICODE
// Determines which patches apply and in what sequence for the provided set of // Determines which patches apply and in what sequence for the provided set of
// patch files, XML files, and/or XML blobs. Patches already applied to the prod uct // patch files, XML files, and/or XML blobs. Patches already applied to the prod uct
// are taken into account // are taken into account
UINT WINAPI MsiDeterminePatchSequenceA( UINT WINAPI MsiDeterminePatchSequenceA(
__in LPCSTR szProductCode, // Product c _In_ LPCSTR szProductCode, // Product c
ode GUID of an installed product ode GUID of an installed product
__in_opt LPCSTR szUserSid, // User acco _In_opt_ LPCSTR szUserSid, // User acco
unt we're interested in unt we're interested in
__in MSIINSTALLCONTEXT dwContext, // Install _In_ MSIINSTALLCONTEXT dwContext, // Install
ation context we're interested in ation context we're interested in
__in DWORD cPatchInfo, // Number _In_ DWORD cPatchInfo, // Number
of patches in the array of patches in the array
__inout_ecount(cPatchInfo) PMSIPATCHSEQUENCEINFOA pPatchInfo); // Array o _Inout_updates_(cPatchInfo) PMSIPATCHSEQUENCEINFOA pPatchInfo); // Array
f patch sequence information data of patch sequence information data
UINT WINAPI MsiDeterminePatchSequenceW( UINT WINAPI MsiDeterminePatchSequenceW(
__in LPCWSTR szProductCode, // Product _In_ LPCWSTR szProductCode, // Product
code GUID of an installed product code GUID of an installed product
__in_opt LPCWSTR szUserSid, // User acc _In_opt_ LPCWSTR szUserSid, // User acc
ount we're interested in ount we're interested in
__in MSIINSTALLCONTEXT dwContext, // Install _In_ MSIINSTALLCONTEXT dwContext, // Install
ation context we're interested in ation context we're interested in
__in DWORD cPatchInfo, // Number _In_ DWORD cPatchInfo, // Number
of patches in the array of patches in the array
__inout_ecount(cPatchInfo) PMSIPATCHSEQUENCEINFOW pPatchInfo); // Array o _Inout_updates_(cPatchInfo) PMSIPATCHSEQUENCEINFOW pPatchInfo); // Array
f patch sequence information data of patch sequence information data
#ifdef UNICODE #ifdef UNICODE
#define MsiDeterminePatchSequence MsiDeterminePatchSequenceW #define MsiDeterminePatchSequence MsiDeterminePatchSequenceW
#else #else
#define MsiDeterminePatchSequence MsiDeterminePatchSequenceA #define MsiDeterminePatchSequence MsiDeterminePatchSequenceA
#endif // !UNICODE #endif // !UNICODE
// Determines which patches apply and what sequence for the provided set of patc h files, // Determines which patches apply and what sequence for the provided set of patc h files,
// XML files, and/or XML blobs. Does not take into account either products or pa tches // XML files, and/or XML blobs. Does not take into account either products or pa tches
// already installed on the machine. // already installed on the machine.
UINT WINAPI MsiDetermineApplicablePatchesA( UINT WINAPI MsiDetermineApplicablePatchesA(
__in LPCSTR szProductPackagePath, // Fully qua _In_ LPCSTR szProductPackagePath, // Fully qua
lified path to a product MSI database lified path to a product MSI database
__in DWORD cPatchInfo, // Number _In_ DWORD cPatchInfo, // Number
of patches in the array of patches in the array
__inout_ecount(cPatchInfo) PMSIPATCHSEQUENCEINFOA pPatchInfo); // Array o _Inout_updates_(cPatchInfo) PMSIPATCHSEQUENCEINFOA pPatchInfo); // Array
f patch sequence information data of patch sequence information data
UINT WINAPI MsiDetermineApplicablePatchesW( UINT WINAPI MsiDetermineApplicablePatchesW(
__in LPCWSTR szProductPackagePath, // Fully qu _In_ LPCWSTR szProductPackagePath, // Fully qu
alified path to a product MSI database alified path to a product MSI database
__in DWORD cPatchInfo, // Number _In_ DWORD cPatchInfo, // Number
of patches in the array of patches in the array
__inout_ecount(cPatchInfo) PMSIPATCHSEQUENCEINFOW pPatchInfo); // Array o _Inout_updates_(cPatchInfo) PMSIPATCHSEQUENCEINFOW pPatchInfo); // Array
f patch sequence information data of patch sequence information data
#ifdef UNICODE #ifdef UNICODE
#define MsiDetermineApplicablePatches MsiDetermineApplicablePatchesW #define MsiDetermineApplicablePatches MsiDetermineApplicablePatchesW
#else #else
#define MsiDetermineApplicablePatches MsiDetermineApplicablePatchesA #define MsiDetermineApplicablePatches MsiDetermineApplicablePatchesA
#endif // !UNICODE #endif // !UNICODE
// Enumerates all patches applied for a single product or all products based upo n // Enumerates all patches applied for a single product or all products based upo n
// enumeration context and filter. // enumeration context and filter.
UINT WINAPI MsiEnumPatchesExA( UINT WINAPI MsiEnumPatchesExA(
__in_opt LPCSTR szProductCode, // Enume _In_opt_ LPCSTR szProductCode, // Enume
rate patches on instances of this product rate patches on instances of this product
__in_opt LPCSTR szUserSid, // Accou _In_opt_ LPCSTR szUserSid, // Accou
nt for enumeration nt for enumeration
__in DWORD dwContext, // Con _In_ DWORD dwContext, // Con
texts for enumeration texts for enumeration
__in DWORD dwFilter, // Fil _In_ DWORD dwFilter, // Fil
ter for enumeration ter for enumeration
__in DWORD dwIndex, // Ind _In_ DWORD dwIndex, // Ind
ex for enumeration ex for enumeration
__out_ecount_opt(MAX_GUID_CHARS+1) CHAR szPatchCode[39], // Enume _Out_writes_opt_(MAX_GUID_CHARS+1) CHAR szPatchCode[39], // Enume
rated patch code rated patch code
__out_ecount_opt(MAX_GUID_CHARS+1) CHAR szTargetProductCode[39], // Enume _Out_writes_opt_(MAX_GUID_CHARS+1) CHAR szTargetProductCode[39], // Enume
rated patch's product code rated patch's product code
__out_opt MSIINSTALLCONTEXT *pdwTargetProductContext, //Enum _Out_opt_ MSIINSTALLCONTEXT *pdwTargetProductContext, //Enum
erated patch's context erated patch's context
__out_ecount_opt(*pcchTargetUserSid) LPSTR szTargetUserSid, // Enume _Out_writes_opt_(*pcchTargetUserSid) LPSTR szTargetUserSid, // Enume
rated patch's user account rated patch's user account
__inout_opt LPDWORD pcchTargetUserSid); // in/ _Inout_opt_ LPDWORD pcchTargetUserSid); // in/
out character count of szTargetUserSid out character count of szTargetUserSid
UINT WINAPI MsiEnumPatchesExW( UINT WINAPI MsiEnumPatchesExW(
__in_opt LPCWSTR szProductCode, // Enum _In_opt_ LPCWSTR szProductCode, // Enum
erate patches on instances of this product erate patches on instances of this product
__in_opt LPCWSTR szUserSid, // Acco _In_opt_ LPCWSTR szUserSid, // Acco
unt for enumeration unt for enumeration
__in DWORD dwContext, // Con _In_ DWORD dwContext, // Con
texts for enumeration texts for enumeration
__in DWORD dwFilter, // Fil _In_ DWORD dwFilter, // Fil
ter for enumeration ter for enumeration
__in DWORD dwIndex, // Ind _In_ DWORD dwIndex, // Ind
ex for enumeration ex for enumeration
__out_ecount_opt(MAX_GUID_CHARS+1) WCHAR szPatchCode[39], // Enum _Out_writes_opt_(MAX_GUID_CHARS+1) WCHAR szPatchCode[39], // Enum
erated patch code erated patch code
__out_ecount_opt(MAX_GUID_CHARS+1) WCHAR szTargetProductCode[39], // Enum _Out_writes_opt_(MAX_GUID_CHARS+1) WCHAR szTargetProductCode[39], // Enum
erated patch's product code erated patch's product code
__out_opt MSIINSTALLCONTEXT *pdwTargetProductContext, //Enum _Out_opt_ MSIINSTALLCONTEXT *pdwTargetProductContext, //Enum
erated patch's context erated patch's context
__out_ecount_opt(*pcchTargetUserSid) LPWSTR szTargetUserSid, // Enum _Out_writes_opt_(*pcchTargetUserSid) LPWSTR szTargetUserSid, // Enum
erated patch's user account erated patch's user account
__inout_opt LPDWORD pcchTargetUserSid); // in/ _Inout_opt_ LPDWORD pcchTargetUserSid); // in/
out character count of szTargetUserSid out character count of szTargetUserSid
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumPatchesEx MsiEnumPatchesExW #define MsiEnumPatchesEx MsiEnumPatchesExW
#else #else
#define MsiEnumPatchesEx MsiEnumPatchesExA #define MsiEnumPatchesEx MsiEnumPatchesExA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 300) #endif //(_WIN32_MSI >= 300)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to query and configure a feature within a product. // Functions to query and configure a feature within a product.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Return the installed state for a product feature // Return the installed state for a product feature
INSTALLSTATE WINAPI MsiQueryFeatureStateA( INSTALLSTATE WINAPI MsiQueryFeatureStateA(
__in LPCSTR szProduct, _In_ LPCSTR szProduct,
__in LPCSTR szFeature); _In_ LPCSTR szFeature);
INSTALLSTATE WINAPI MsiQueryFeatureStateW( INSTALLSTATE WINAPI MsiQueryFeatureStateW(
__in LPCWSTR szProduct, _In_ LPCWSTR szProduct,
__in LPCWSTR szFeature); _In_ LPCWSTR szFeature);
#ifdef UNICODE #ifdef UNICODE
#define MsiQueryFeatureState MsiQueryFeatureStateW #define MsiQueryFeatureState MsiQueryFeatureStateW
#else #else
#define MsiQueryFeatureState MsiQueryFeatureStateA #define MsiQueryFeatureState MsiQueryFeatureStateA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 300) #if (_WIN32_MSI >= 300)
// Retrieve the installed state for a product feature in a particular product in stance // Retrieve the installed state for a product feature in a particular product in stance
UINT WINAPI MsiQueryFeatureStateExA( UINT WINAPI MsiQueryFeatureStateExA(
__in LPCSTR szProductCode, // Information is queried on th _In_ LPCSTR szProductCode, // Information is queried on th
is product is product
__in_opt LPCSTR szUserSid, // Account of this product inst _In_opt_ LPCSTR szUserSid, // Account of this product inst
ance ance
__in MSIINSTALLCONTEXT dwContext, // Context of this product in _In_ MSIINSTALLCONTEXT dwContext, // Context of this product in
stance stance
__in LPCSTR szFeature, // Name of the feature being qu _In_ LPCSTR szFeature, // Name of the feature being qu
eried eried
__out_opt INSTALLSTATE *pdwState); // State value _Out_opt_ INSTALLSTATE *pdwState); // State value
UINT WINAPI MsiQueryFeatureStateExW( UINT WINAPI MsiQueryFeatureStateExW(
__in LPCWSTR szProductCode, // Information is queried on t _In_ LPCWSTR szProductCode, // Information is queried on t
his product his product
__in_opt LPCWSTR szUserSid, // Account of this product ins _In_opt_ LPCWSTR szUserSid, // Account of this product ins
tance tance
__in MSIINSTALLCONTEXT dwContext, // Context of this product in _In_ MSIINSTALLCONTEXT dwContext, // Context of this product in
stance stance
__in LPCWSTR szFeature, // Name of the feature being q _In_ LPCWSTR szFeature, // Name of the feature being q
ueried ueried
__out_opt INSTALLSTATE *pdwState); // State value _Out_opt_ INSTALLSTATE *pdwState); // State value
#ifdef UNICODE #ifdef UNICODE
#define MsiQueryFeatureStateEx MsiQueryFeatureStateExW #define MsiQueryFeatureStateEx MsiQueryFeatureStateExW
#else #else
#define MsiQueryFeatureStateEx MsiQueryFeatureStateExA #define MsiQueryFeatureStateEx MsiQueryFeatureStateExA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 300) #endif //(_WIN32_MSI >= 300)
// Indicate intent to use a product feature, increments usage count // Indicate intent to use a product feature, increments usage count
// Prompts for CD if not loaded, does not install feature // Prompts for CD if not loaded, does not install feature
INSTALLSTATE WINAPI MsiUseFeatureA( INSTALLSTATE WINAPI MsiUseFeatureA(
__in LPCSTR szProduct, _In_ LPCSTR szProduct,
__in LPCSTR szFeature); _In_ LPCSTR szFeature);
INSTALLSTATE WINAPI MsiUseFeatureW( INSTALLSTATE WINAPI MsiUseFeatureW(
__in LPCWSTR szProduct, _In_ LPCWSTR szProduct,
__in LPCWSTR szFeature); _In_ LPCWSTR szFeature);
#ifdef UNICODE #ifdef UNICODE
#define MsiUseFeature MsiUseFeatureW #define MsiUseFeature MsiUseFeatureW
#else #else
#define MsiUseFeature MsiUseFeatureA #define MsiUseFeature MsiUseFeatureA
#endif // !UNICODE #endif // !UNICODE
// Indicate intent to use a product feature, increments usage count // Indicate intent to use a product feature, increments usage count
// Prompts for CD if not loaded, does not install feature // Prompts for CD if not loaded, does not install feature
// Allows for bypassing component detection where performance is critical // Allows for bypassing component detection where performance is critical
INSTALLSTATE WINAPI MsiUseFeatureExA( INSTALLSTATE WINAPI MsiUseFeatureExA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in LPCSTR szFeature, // feature ID _In_ LPCSTR szFeature, // feature ID
__in DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0 _In_ DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
__reserved DWORD dwReserved); // reserved, must be 0 _Reserved_ DWORD dwReserved); // reserved, must be 0
INSTALLSTATE WINAPI MsiUseFeatureExW( INSTALLSTATE WINAPI MsiUseFeatureExW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in LPCWSTR szFeature, // feature ID _In_ LPCWSTR szFeature, // feature ID
__in DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0 _In_ DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
__reserved DWORD dwReserved); // reserved, must be 0 _Reserved_ DWORD dwReserved); // reserved, must be 0
#ifdef UNICODE #ifdef UNICODE
#define MsiUseFeatureEx MsiUseFeatureExW #define MsiUseFeatureEx MsiUseFeatureExW
#else #else
#define MsiUseFeatureEx MsiUseFeatureExA #define MsiUseFeatureEx MsiUseFeatureExA
#endif // !UNICODE #endif // !UNICODE
// Return the usage metrics for a product feature // Return the usage metrics for a product feature
UINT WINAPI MsiGetFeatureUsageA( UINT WINAPI MsiGetFeatureUsageA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in LPCSTR szFeature, // feature ID _In_ LPCSTR szFeature, // feature ID
__out_opt LPDWORD pdwUseCount, // returned use count _Out_opt_ LPDWORD pdwUseCount, // returned use count
__out_opt LPWORD pwDateUsed); // last date used (DOS date form _Out_opt_ LPWORD pwDateUsed); // last date used (DOS date form
at) at)
UINT WINAPI MsiGetFeatureUsageW( UINT WINAPI MsiGetFeatureUsageW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in LPCWSTR szFeature, // feature ID _In_ LPCWSTR szFeature, // feature ID
__out_opt LPDWORD pdwUseCount, // returned use count _Out_opt_ LPDWORD pdwUseCount, // returned use count
__out_opt LPWORD pwDateUsed); // last date used (DOS date form _Out_opt_ LPWORD pwDateUsed); // last date used (DOS date form
at) at)
#ifdef UNICODE #ifdef UNICODE
#define MsiGetFeatureUsage MsiGetFeatureUsageW #define MsiGetFeatureUsage MsiGetFeatureUsageW
#else #else
#define MsiGetFeatureUsage MsiGetFeatureUsageA #define MsiGetFeatureUsage MsiGetFeatureUsageA
#endif // !UNICODE #endif // !UNICODE
// Force the installed state for a product feature // Force the installed state for a product feature
UINT WINAPI MsiConfigureFeatureA( UINT WINAPI MsiConfigureFeatureA(
__in LPCSTR szProduct, _In_ LPCSTR szProduct,
__in LPCSTR szFeature, _In_ LPCSTR szFeature,
__in INSTALLSTATE eInstallState); // local/source/default/absent/lock/u _In_ INSTALLSTATE eInstallState); // local/source/default/absent/lock/u
ncache ncache
UINT WINAPI MsiConfigureFeatureW( UINT WINAPI MsiConfigureFeatureW(
__in LPCWSTR szProduct, _In_ LPCWSTR szProduct,
__in LPCWSTR szFeature, _In_ LPCWSTR szFeature,
__in INSTALLSTATE eInstallState); // local/source/default/absent/lock/u _In_ INSTALLSTATE eInstallState); // local/source/default/absent/lock/u
ncache ncache
#ifdef UNICODE #ifdef UNICODE
#define MsiConfigureFeature MsiConfigureFeatureW #define MsiConfigureFeature MsiConfigureFeatureW
#else #else
#define MsiConfigureFeature MsiConfigureFeatureA #define MsiConfigureFeature MsiConfigureFeatureA
#endif // !UNICODE #endif // !UNICODE
// Reinstall feature, used to validate or correct problems // Reinstall feature, used to validate or correct problems
UINT WINAPI MsiReinstallFeatureA( UINT WINAPI MsiReinstallFeatureA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in LPCSTR szFeature, // feature ID, NULL for entire product _In_ LPCSTR szFeature, // feature ID, NULL for entire product
__in DWORD dwReinstallMode); // one or more REINSTALLMODE modes _In_ DWORD dwReinstallMode); // one or more REINSTALLMODE modes
UINT WINAPI MsiReinstallFeatureW( UINT WINAPI MsiReinstallFeatureW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in LPCWSTR szFeature, // feature ID, NULL for entire produc _In_ LPCWSTR szFeature, // feature ID, NULL for entire produc
t t
__in DWORD dwReinstallMode); // one or more REINSTALLMODE modes _In_ DWORD dwReinstallMode); // one or more REINSTALLMODE modes
#ifdef UNICODE #ifdef UNICODE
#define MsiReinstallFeature MsiReinstallFeatureW #define MsiReinstallFeature MsiReinstallFeatureW
#else #else
#define MsiReinstallFeature MsiReinstallFeatureA #define MsiReinstallFeature MsiReinstallFeatureA
#endif // !UNICODE #endif // !UNICODE
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to query a component. For functions that return a path to // Functions to query a component. For functions that return a path to
// a particular component, the state of the feature being used should // a particular component, the state of the feature being used should
// have been checked previously. // have been checked previously.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Return full component path, performing any necessary installation // Return full component path, performing any necessary installation
// calls MsiQueryFeatureState to detect that all components are installed // calls MsiQueryFeatureState to detect that all components are installed
// then calls MsiConfigureFeature if any of its components are uninstalled // then calls MsiConfigureFeature if any of its components are uninstalled
// then calls MsiLocateComponent to obtain the path the its key file // then calls MsiLocateComponent to obtain the path the its key file
UINT WINAPI MsiProvideComponentA( UINT WINAPI MsiProvideComponentA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
in case install required in case install required
__in LPCSTR szFeature, // feature ID in _In_ LPCSTR szFeature, // feature ID in
case install required case install required
__in LPCSTR szComponent, // component ID _In_ LPCSTR szComponent, // component ID
__in DWORD dwInstallMode, // either of t _In_ DWORD dwInstallMode, // either of t
ype INSTALLMODE or a combination of the REINSTALLMODE flags ype INSTALLMODE or a combination of the REINSTALLMODE flags
__out_ecount_opt(*pcchPathBuf) LPSTR lpPathBuf, // returned path _Out_writes_opt_(*pcchPathBuf) LPSTR lpPathBuf, // returned path
, NULL if not desired , NULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buff _Inout_opt_ LPDWORD pcchPathBuf); // in/out buff
er character count er character count
UINT WINAPI MsiProvideComponentW( UINT WINAPI MsiProvideComponentW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
in case install required in case install required
__in LPCWSTR szFeature, // feature ID i _In_ LPCWSTR szFeature, // feature ID i
n case install required n case install required
__in LPCWSTR szComponent, // component ID _In_ LPCWSTR szComponent, // component ID
__in DWORD dwInstallMode, // either of t _In_ DWORD dwInstallMode, // either of t
ype INSTALLMODE or a combination of the REINSTALLMODE flags ype INSTALLMODE or a combination of the REINSTALLMODE flags
__out_ecount_opt(*pcchPathBuf) LPWSTR lpPathBuf, // returned pat _Out_writes_opt_(*pcchPathBuf) LPWSTR lpPathBuf, // returned pat
h, NULL if not desired h, NULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buff _Inout_opt_ LPDWORD pcchPathBuf); // in/out buff
er character count er character count
#ifdef UNICODE #ifdef UNICODE
#define MsiProvideComponent MsiProvideComponentW #define MsiProvideComponent MsiProvideComponentW
#else #else
#define MsiProvideComponent MsiProvideComponentA #define MsiProvideComponent MsiProvideComponentA
#endif // !UNICODE #endif // !UNICODE
// Return full component path for a qualified component, performing any necessar y installation. // Return full component path for a qualified component, performing any necessar y installation.
// Prompts for source if necessary and increments the usage count for the featur e. // Prompts for source if necessary and increments the usage count for the featur e.
UINT WINAPI MsiProvideQualifiedComponentA( UINT WINAPI MsiProvideQualifiedComponentA(
__in LPCSTR szCategory, // component catego _In_ LPCSTR szCategory, // component catego
ry ID ry ID
__in LPCSTR szQualifier, // specifies which _In_ LPCSTR szQualifier, // specifies which
component to access component to access
__in DWORD dwInstallMode, // either of type _In_ DWORD dwInstallMode, // either of type
INSTALLMODE or a combination of the REINSTALLMODE flags INSTALLMODE or a combination of the REINSTALLMODE flags
__out_ecount_opt(*pcchPathBuf) LPSTR lpPathBuf, // returned path, N _Out_writes_opt_(*pcchPathBuf) LPSTR lpPathBuf, // returned path, N
ULL if not desired ULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buffer _Inout_opt_ LPDWORD pcchPathBuf); // in/out buffer
character count character count
UINT WINAPI MsiProvideQualifiedComponentW( UINT WINAPI MsiProvideQualifiedComponentW(
__in LPCWSTR szCategory, // component categ _In_ LPCWSTR szCategory, // component categ
ory ID ory ID
__in LPCWSTR szQualifier, // specifies which _In_ LPCWSTR szQualifier, // specifies which
component to access component to access
__in DWORD dwInstallMode, // either of type _In_ DWORD dwInstallMode, // either of type
INSTALLMODE or a combination of the REINSTALLMODE flags INSTALLMODE or a combination of the REINSTALLMODE flags
__out_ecount_opt(*pcchPathBuf) LPWSTR lpPathBuf, // returned path, _Out_writes_opt_(*pcchPathBuf) LPWSTR lpPathBuf, // returned path,
NULL if not desired NULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buffer _Inout_opt_ LPDWORD pcchPathBuf); // in/out buffer
character count character count
#ifdef UNICODE #ifdef UNICODE
#define MsiProvideQualifiedComponent MsiProvideQualifiedComponentW #define MsiProvideQualifiedComponent MsiProvideQualifiedComponentW
#else #else
#define MsiProvideQualifiedComponent MsiProvideQualifiedComponentA #define MsiProvideQualifiedComponent MsiProvideQualifiedComponentA
#endif // !UNICODE #endif // !UNICODE
// Return full component path for a qualified component, performing any necessar y installation. // Return full component path for a qualified component, performing any necessar y installation.
// Prompts for source if necessary and increments the usage count for the featur e. // Prompts for source if necessary and increments the usage count for the featur e.
// The szProduct parameter specifies the product to match that has published the qualified // The szProduct parameter specifies the product to match that has published the qualified
// component. If null, this API works the same as MsiProvideQualifiedComponent. // component. If null, this API works the same as MsiProvideQualifiedComponent.
UINT WINAPI MsiProvideQualifiedComponentExA( UINT WINAPI MsiProvideQualifiedComponentExA(
__in LPCSTR szCategory, // component catego _In_ LPCSTR szCategory, // component catego
ry ID ry ID
__in LPCSTR szQualifier, // specifies which _In_ LPCSTR szQualifier, // specifies which
component to access component to access
__in DWORD dwInstallMode, // either of type _In_ DWORD dwInstallMode, // either of type
INSTALLMODE or a combination of the REINSTALLMODE flags INSTALLMODE or a combination of the REINSTALLMODE flags
__in_opt LPCSTR szProduct, // the product code _In_opt_ LPCSTR szProduct, // the product code
__reserved DWORD dwUnused1, // not used, must _Reserved_ DWORD dwUnused1, // not used, must
be zero be zero
__reserved DWORD dwUnused2, // not used, must _Reserved_ DWORD dwUnused2, // not used, must
be zero be zero
__out_ecount_opt(*pcchPathBuf) LPSTR lpPathBuf, // returned path, N _Out_writes_opt_(*pcchPathBuf) LPSTR lpPathBuf, // returned path, N
ULL if not desired ULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buffer _Inout_opt_ LPDWORD pcchPathBuf); // in/out buffer
character count character count
UINT WINAPI MsiProvideQualifiedComponentExW( UINT WINAPI MsiProvideQualifiedComponentExW(
__in LPCWSTR szCategory, // component categ _In_ LPCWSTR szCategory, // component categ
ory ID ory ID
__in LPCWSTR szQualifier, // specifies which _In_ LPCWSTR szQualifier, // specifies which
component to access component to access
__in DWORD dwInstallMode, // either of type _In_ DWORD dwInstallMode, // either of type
INSTALLMODE or a combination of the REINSTALLMODE flags INSTALLMODE or a combination of the REINSTALLMODE flags
__in_opt LPCWSTR szProduct, // the product cod _In_opt_ LPCWSTR szProduct, // the product cod
e e
__reserved DWORD dwUnused1, // not used, must _Reserved_ DWORD dwUnused1, // not used, must
be zero be zero
__reserved DWORD dwUnused2, // not used, must _Reserved_ DWORD dwUnused2, // not used, must
be zero be zero
__out_ecount_opt(*pcchPathBuf) LPWSTR lpPathBuf, // returned path, _Out_writes_opt_(*pcchPathBuf) LPWSTR lpPathBuf, // returned path,
NULL if not desired NULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buffer _Inout_opt_ LPDWORD pcchPathBuf); // in/out buffer
character count character count
#ifdef UNICODE #ifdef UNICODE
#define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExW #define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExW
#else #else
#define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExA #define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExA
#endif // !UNICODE #endif // !UNICODE
// Return full path to an installed component // Return full path to an installed component
INSTALLSTATE WINAPI MsiGetComponentPathA( INSTALLSTATE WINAPI MsiGetComponentPathA(
__in LPCSTR szProduct, // product code for clien _In_ LPCSTR szProduct, // product code for clien
t product t product
__in LPCSTR szComponent, // component Id, string G _In_ LPCSTR szComponent, // component Id, string G
UID UID
__out_ecount_opt(*pcchBuf) LPSTR lpPathBuf, // returned path _Out_writes_opt_(*pcchBuf) LPSTR lpPathBuf, // returned path
__inout_opt LPDWORD pcchBuf); // in/out buffer charac _Inout_opt_ LPDWORD pcchBuf); // in/out buffer charac
ter count ter count
INSTALLSTATE WINAPI MsiGetComponentPathW( INSTALLSTATE WINAPI MsiGetComponentPathW(
__in LPCWSTR szProduct, // product code for clie _In_ LPCWSTR szProduct, // product code for clie
nt product nt product
__in LPCWSTR szComponent, // component Id, string _In_ LPCWSTR szComponent, // component Id, string
GUID GUID
__out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf, // returned path _Out_writes_opt_(*pcchBuf) LPWSTR lpPathBuf, // returned path
__inout_opt LPDWORD pcchBuf); // in/out buffer charac _Inout_opt_ LPDWORD pcchBuf); // in/out buffer charac
ter count ter count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetComponentPath MsiGetComponentPathW #define MsiGetComponentPath MsiGetComponentPathW
#else #else
#define MsiGetComponentPath MsiGetComponentPathA #define MsiGetComponentPath MsiGetComponentPathA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 500) #if (_WIN32_MSI >= 500)
// Return full path to an installed component for a given user // Return full path to an installed component for a given user
// and context // and context
INSTALLSTATE WINAPI MsiGetComponentPathExA( INSTALLSTATE WINAPI MsiGetComponentPathExA(
__in LPCSTR szProductCode, _In_ LPCSTR szProductCode,
// ProductCode // ProductCode
__in LPCSTR szComponentCode, _In_ LPCSTR szComponentCode,
// ComponentCode // ComponentCode
__in_opt LPCSTR szUserSid, _In_opt_ LPCSTR szUserSid,
// User account // User account
__in_opt MSIINSTALLCONTEXT dwContext _In_opt_ MSIINSTALLCONTEXT dwContext
, // Install context , // Install context
__out_ecount_opt(*pcchOutPathBuffer) LPSTR lpOutPath _Out_writes_opt_(*pcchOutPathBuffer) LPSTR lpOutPath
Buffer, // returned path Buffer, // returned path
__inout_opt LPDWORD pcchOutPa _Inout_opt_ LPDWORD pcchOutPa
thBuffer); // in/out buffer character count thBuffer); // in/out buffer character count
INSTALLSTATE WINAPI MsiGetComponentPathExW( INSTALLSTATE WINAPI MsiGetComponentPathExW(
__in LPCWSTR szProductCode, _In_ LPCWSTR szProductCode,
// ProductCode // ProductCode
__in LPCWSTR szComponentCode, _In_ LPCWSTR szComponentCode,
// ComponentCode // ComponentCode
__in_opt LPCWSTR szUserSid, _In_opt_ LPCWSTR szUserSid,
// User account // User account
__in_opt MSIINSTALLCONTEXT dwContext _In_opt_ MSIINSTALLCONTEXT dwContext
, // Install context , // Install context
__out_ecount_opt(*pcchOutPathBuffer) LPWSTR lpOutPath _Out_writes_opt_(*pcchOutPathBuffer) LPWSTR lpOutPath
Buffer, // returned path Buffer, // returned path
__inout_opt LPDWORD pcchOutPa _Inout_opt_ LPDWORD pcchOutPa
thBuffer); // in/out buffer character count thBuffer); // in/out buffer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetComponentPathEx MsiGetComponentPathExW #define MsiGetComponentPathEx MsiGetComponentPathExW
#else #else
#define MsiGetComponentPathEx MsiGetComponentPathExA #define MsiGetComponentPathEx MsiGetComponentPathExA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_MSI >= 500) #endif // (_WIN32_MSI >= 500)
#if (_WIN32_MSI >= 150) #if (_WIN32_MSI >= 150)
#define MSIASSEMBLYINFO_NETASSEMBLY 0 // Net assemblies #define MSIASSEMBLYINFO_NETASSEMBLY 0 // Net assemblies
#define MSIASSEMBLYINFO_WIN32ASSEMBLY 1 // Win32 assemblies #define MSIASSEMBLYINFO_WIN32ASSEMBLY 1 // Win32 assemblies
// Return full component path for an assembly installed via the WI, performing a ny necessary installation. // Return full component path for an assembly installed via the WI, performing a ny necessary installation.
// Prompts for source if necessary and increments the usage count for the featur e. // Prompts for source if necessary and increments the usage count for the featur e.
// The szAssemblyName parameter specifies the stringized assembly name. // The szAssemblyName parameter specifies the stringized assembly name.
// The szAppContext is the full path to the .cfg file or the app exe to which th e assembly being requested // The szAppContext is the full path to the .cfg file or the app exe to which th e assembly being requested
// has been privatised to, which is null for global assemblies // has been privatised to, which is null for global assemblies
UINT WINAPI MsiProvideAssemblyA( UINT WINAPI MsiProvideAssemblyA(
__in LPCSTR szAssemblyName, // stringized assemb _In_ LPCSTR szAssemblyName, // stringized assemb
ly name ly name
__in_opt LPCSTR szAppContext, // specifies the ful _In_opt_ LPCSTR szAppContext, // specifies the ful
l path to the parent asm's .cfg file, null for global assemblies l path to the parent asm's .cfg file, null for global assemblies
__in DWORD dwInstallMode, // either of type _In_ DWORD dwInstallMode, // either of type
INSTALLMODE or a combination of the REINSTALLMODE flags INSTALLMODE or a combination of the REINSTALLMODE flags
__in DWORD dwAssemblyInfo, // assembly info, _In_ DWORD dwAssemblyInfo, // assembly info,
including assembly type including assembly type
__out_ecount_opt(*pcchPathBuf) LPSTR lpPathBuf, // returned path, NU _Out_writes_opt_(*pcchPathBuf) LPSTR lpPathBuf, // returned path, NU
LL if not desired LL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buffer c _Inout_opt_ LPDWORD pcchPathBuf); // in/out buffer c
haracter count haracter count
UINT WINAPI MsiProvideAssemblyW( UINT WINAPI MsiProvideAssemblyW(
__in LPCWSTR szAssemblyName, // stringized assem _In_ LPCWSTR szAssemblyName, // stringized assem
bly name bly name
__in_opt LPCWSTR szAppContext, // specifies the fu _In_opt_ LPCWSTR szAppContext, // specifies the fu
ll path to the parent asm's .cfg file, null for global assemblies ll path to the parent asm's .cfg file, null for global assemblies
__in DWORD dwInstallMode, // either of type _In_ DWORD dwInstallMode, // either of type
INSTALLMODE or a combination of the REINSTALLMODE flags INSTALLMODE or a combination of the REINSTALLMODE flags
__in DWORD dwAssemblyInfo, // assembly info, _In_ DWORD dwAssemblyInfo, // assembly info,
including assembly type including assembly type
__out_ecount_opt(*pcchPathBuf) LPWSTR lpPathBuf, // returned path, N _Out_writes_opt_(*pcchPathBuf) LPWSTR lpPathBuf, // returned path, N
ULL if not desired ULL if not desired
__inout_opt LPDWORD pcchPathBuf); // in/out buffer c _Inout_opt_ LPDWORD pcchPathBuf); // in/out buffer c
haracter count haracter count
#ifdef UNICODE #ifdef UNICODE
#define MsiProvideAssembly MsiProvideAssemblyW #define MsiProvideAssembly MsiProvideAssemblyW
#else #else
#define MsiProvideAssembly MsiProvideAssemblyA #define MsiProvideAssembly MsiProvideAssemblyA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 150) #endif //(_WIN32_MSI >= 150)
#if (_WIN32_MSI >= 300) #if (_WIN32_MSI >= 300)
// Query the installed state of a component in the specified product instance // Query the installed state of a component in the specified product instance
UINT WINAPI MsiQueryComponentStateA( UINT WINAPI MsiQueryComponentStateA(
__in LPCSTR szProductCode, // Information is queried on thi _In_ LPCSTR szProductCode, // Information is queried on thi
s product s product
__in_opt LPCSTR szUserSid, // Account of this product insta _In_opt_ LPCSTR szUserSid, // Account of this product insta
nce nce
__in MSIINSTALLCONTEXT dwContext, // Context of this product ins _In_ MSIINSTALLCONTEXT dwContext, // Context of this product ins
tance tance
__in LPCSTR szComponentCode, // Name of the component being q _In_ LPCSTR szComponentCode, // Name of the component being q
ueried ueried
__out_opt INSTALLSTATE *pdwState); // State value _Out_opt_ INSTALLSTATE *pdwState); // State value
UINT WINAPI MsiQueryComponentStateW( UINT WINAPI MsiQueryComponentStateW(
__in LPCWSTR szProductCode, // Information is queried on th _In_ LPCWSTR szProductCode, // Information is queried on th
is product is product
__in_opt LPCWSTR szUserSid, // Account of this product inst _In_opt_ LPCWSTR szUserSid, // Account of this product inst
ance ance
__in MSIINSTALLCONTEXT dwContext, // Context of this product ins _In_ MSIINSTALLCONTEXT dwContext, // Context of this product ins
tance tance
__in LPCWSTR szComponentCode, // Name of the component being _In_ LPCWSTR szComponentCode, // Name of the component being
queried queried
__out_opt INSTALLSTATE *pdwState); // State value _Out_opt_ INSTALLSTATE *pdwState); // State value
#ifdef UNICODE #ifdef UNICODE
#define MsiQueryComponentState MsiQueryComponentStateW #define MsiQueryComponentState MsiQueryComponentStateW
#else #else
#define MsiQueryComponentState MsiQueryComponentStateA #define MsiQueryComponentState MsiQueryComponentStateA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 300) #endif //(_WIN32_MSI >= 300)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to iterate registered products, features, and components. // Functions to iterate registered products, features, and components.
// As with reg keys, they accept a 0-based index into the enumeration. // As with reg keys, they accept a 0-based index into the enumeration.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Enumerate the registered products, either installed or advertised // Enumerate the registered products, either installed or advertised
UINT WINAPI MsiEnumProductsA( UINT WINAPI MsiEnumProductsA(
__in DWORD iProductIndex, // 0-based in _In_ DWORD iProductIndex, // 0-based in
dex into registered products dex into registered products
__out_ecount(MAX_GUID_CHARS+1) LPSTR lpProductBuf); // buffer of ch _Out_writes_(MAX_GUID_CHARS+1) LPSTR lpProductBuf); // buffer of ch
ar count: 39 (size of string GUID) ar count: 39 (size of string GUID)
UINT WINAPI MsiEnumProductsW( UINT WINAPI MsiEnumProductsW(
__in DWORD iProductIndex, // 0-based in _In_ DWORD iProductIndex, // 0-based in
dex into registered products dex into registered products
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpProductBuf); // buffer of c _Out_writes_(MAX_GUID_CHARS+1) LPWSTR lpProductBuf); // buffer of c
har count: 39 (size of string GUID) har count: 39 (size of string GUID)
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumProducts MsiEnumProductsW #define MsiEnumProducts MsiEnumProductsW
#else #else
#define MsiEnumProducts MsiEnumProductsA #define MsiEnumProducts MsiEnumProductsA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 300) #if (_WIN32_MSI >= 300)
// Enumerate the registered products, either installed or advertised in // Enumerate the registered products, either installed or advertised in
// the specified context // the specified context
UINT WINAPI MsiEnumProductsExA( UINT WINAPI MsiEnumProductsExA(
__in_opt LPCSTR szProductCode, _In_opt_ LPCSTR szProductCode,
// Enumerate instances of this product // Enumerate instances of this product
__in_opt LPCSTR szUserSid, _In_opt_ LPCSTR szUserSid,
// Account for enumeration // Account for enumeration
__in DWORD dwContext, _In_ DWORD dwContext,
// Contexts for enumeration // Contexts for enumeration
__in DWORD dwIndex, _In_ DWORD dwIndex,
// Index for enumeration // Index for enumeration
__out_ecount_opt(MAX_GUID_CHARS+1) CHAR szInstalledProductCode[39 _Out_writes_opt_(MAX_GUID_CHARS+1) CHAR szInstalledProductCode[39
], // Enumerated product's ProductCode ], // Enumerated product's ProductCode
__out_opt MSIINSTALLCONTEXT *pdwInstalledContext, _Out_opt_ MSIINSTALLCONTEXT *pdwInstalledContext,
// Enumerated product's context // Enumerated product's context
__out_ecount_opt(*pcchSid) LPSTR szSid, _Out_writes_opt_(*pcchSid) LPSTR szSid,
// Enumerated product's user account // Enumerated product's user account
__inout_opt LPDWORD pcchSid); _Inout_opt_ LPDWORD pcchSid);
// in/out character count of szSid // in/out character count of szSid
// Enumerate the registered products, either installed or advertised in // Enumerate the registered products, either installed or advertised in
// the specified context // the specified context
UINT WINAPI MsiEnumProductsExW( UINT WINAPI MsiEnumProductsExW(
__in_opt LPCWSTR szProductCode, _In_opt_ LPCWSTR szProductCode,
// Enumerate instances of this product // Enumerate instances of this product
__in_opt LPCWSTR szUserSid, _In_opt_ LPCWSTR szUserSid,
// Account for enumeration // Account for enumeration
__in DWORD dwContext, _In_ DWORD dwContext,
// Contexts for enumeration // Contexts for enumeration
__in DWORD dwIndex, _In_ DWORD dwIndex,
// Index for enumeration // Index for enumeration
__out_ecount_opt(MAX_GUID_CHARS+1) WCHAR szInstalledProductCode[3 _Out_writes_opt_(MAX_GUID_CHARS+1) WCHAR szInstalledProductCode[3
9], // Enumerated product's ProductCode 9], // Enumerated product's ProductCode
__out_opt MSIINSTALLCONTEXT *pdwInstalledContext, _Out_opt_ MSIINSTALLCONTEXT *pdwInstalledContext,
// Enumerated product's context // Enumerated product's context
__out_ecount_opt(*pcchSid) LPWSTR szSid, _Out_writes_opt_(*pcchSid) LPWSTR szSid,
// Enumerated product's user account // Enumerated product's user account
__inout_opt LPDWORD pcchSid); _Inout_opt_ LPDWORD pcchSid);
// in/out character count of szSid // in/out character count of szSid
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumProductsEx MsiEnumProductsExW #define MsiEnumProductsEx MsiEnumProductsExW
#else #else
#define MsiEnumProductsEx MsiEnumProductsExA #define MsiEnumProductsEx MsiEnumProductsExA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 300) #endif //(_WIN32_MSI >= 300)
#if (_WIN32_MSI >= 110) #if (_WIN32_MSI >= 110)
// Enumerate products with given upgrade code // Enumerate products with given upgrade code
UINT WINAPI MsiEnumRelatedProductsA( UINT WINAPI MsiEnumRelatedProductsA(
__in LPCSTR lpUpgradeCode, // upgrade code _In_ LPCSTR lpUpgradeCode, // upgrade code
of products to enumerate of products to enumerate
__reserved DWORD dwReserved, // reserved, _Reserved_ DWORD dwReserved, // reserved,
must be 0 must be 0
__in DWORD iProductIndex, // 0-based in _In_ DWORD iProductIndex, // 0-based in
dex into registered products dex into registered products
__out_ecount(MAX_GUID_CHARS+1) LPSTR lpProductBuf); // buffer of ch _Out_writes_(MAX_GUID_CHARS+1) LPSTR lpProductBuf); // buffer of ch
ar count: 39 (size of string GUID) ar count: 39 (size of string GUID)
UINT WINAPI MsiEnumRelatedProductsW( UINT WINAPI MsiEnumRelatedProductsW(
__in LPCWSTR lpUpgradeCode, // upgrade cod _In_ LPCWSTR lpUpgradeCode, // upgrade cod
e of products to enumerate e of products to enumerate
__reserved DWORD dwReserved, // reserved, _Reserved_ DWORD dwReserved, // reserved,
must be 0 must be 0
__in DWORD iProductIndex, // 0-based in _In_ DWORD iProductIndex, // 0-based in
dex into registered products dex into registered products
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpProductBuf); // buffer of c _Out_writes_(MAX_GUID_CHARS+1) LPWSTR lpProductBuf); // buffer of c
har count: 39 (size of string GUID) har count: 39 (size of string GUID)
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumRelatedProducts MsiEnumRelatedProductsW #define MsiEnumRelatedProducts MsiEnumRelatedProductsW
#else #else
#define MsiEnumRelatedProducts MsiEnumRelatedProductsA #define MsiEnumRelatedProducts MsiEnumRelatedProductsA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 110) #endif //(_WIN32_MSI >= 110)
// Enumerate the advertised features for a given product. // Enumerate the advertised features for a given product.
// If parent is not required, supplying NULL will improve performance. // If parent is not required, supplying NULL will improve performance.
UINT WINAPI MsiEnumFeaturesA( UINT WINAPI MsiEnumFeaturesA(
__in LPCSTR szProduct, _In_ LPCSTR szProduct,
__in DWORD iFeatureIndex, // 0-bas _In_ DWORD iFeatureIndex, // 0-bas
ed index into published features ed index into published features
__out_ecount(MAX_FEATURE_CHARS+1) LPSTR lpFeatureBuf, // feature _Out_writes_(MAX_FEATURE_CHARS+1) LPSTR lpFeatureBuf, // feature
name buffer, size=MAX_FEATURE_CHARS+1 name buffer, size=MAX_FEATURE_CHARS+1
__out_ecount_opt(MAX_FEATURE_CHARS+1) LPSTR lpParentBuf); // parent _Out_writes_opt_(MAX_FEATURE_CHARS+1) LPSTR lpParentBuf); // parent
feature buffer, size=MAX_FEATURE_CHARS+1 feature buffer, size=MAX_FEATURE_CHARS+1
UINT WINAPI MsiEnumFeaturesW( UINT WINAPI MsiEnumFeaturesW(
__in LPCWSTR szProduct, _In_ LPCWSTR szProduct,
__in DWORD iFeatureIndex, // 0-bas _In_ DWORD iFeatureIndex, // 0-bas
ed index into published features ed index into published features
__out_ecount(MAX_FEATURE_CHARS+1) LPWSTR lpFeatureBuf, // featur _Out_writes_(MAX_FEATURE_CHARS+1) LPWSTR lpFeatureBuf, // featur
e name buffer, size=MAX_FEATURE_CHARS+1 e name buffer, size=MAX_FEATURE_CHARS+1
__out_ecount_opt(MAX_FEATURE_CHARS+1) LPWSTR lpParentBuf); // parent _Out_writes_opt_(MAX_FEATURE_CHARS+1) LPWSTR lpParentBuf); // parent
feature buffer, size=MAX_FEATURE_CHARS+1 feature buffer, size=MAX_FEATURE_CHARS+1
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumFeatures MsiEnumFeaturesW #define MsiEnumFeatures MsiEnumFeaturesW
#else #else
#define MsiEnumFeatures MsiEnumFeaturesA #define MsiEnumFeatures MsiEnumFeaturesA
#endif // !UNICODE #endif // !UNICODE
// Enumerate the installed components for all products // Enumerate the installed components for all products
UINT WINAPI MsiEnumComponentsA( UINT WINAPI MsiEnumComponentsA(
__in DWORD iComponentIndex, // 0-based in _In_ DWORD iComponentIndex, // 0-based in
dex into installed components dex into installed components
__out_ecount(MAX_GUID_CHARS+1) LPSTR lpComponentBuf); // buffer of ch _Out_writes_(MAX_GUID_CHARS+1) LPSTR lpComponentBuf); // buffer of ch
ar count: 39 (size of string GUID) ar count: 39 (size of string GUID)
UINT WINAPI MsiEnumComponentsW( UINT WINAPI MsiEnumComponentsW(
__in DWORD iComponentIndex, // 0-based in _In_ DWORD iComponentIndex, // 0-based in
dex into installed components dex into installed components
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpComponentBuf); // buffer of c _Out_writes_(MAX_GUID_CHARS+1) LPWSTR lpComponentBuf); // buffer of c
har count: 39 (size of string GUID) har count: 39 (size of string GUID)
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumComponents MsiEnumComponentsW #define MsiEnumComponents MsiEnumComponentsW
#else #else
#define MsiEnumComponents MsiEnumComponentsA #define MsiEnumComponents MsiEnumComponentsA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 500) #if (_WIN32_MSI >= 500)
// Enumerate installed components for all products for a given users // Enumerate installed components for all products for a given users
// and context // and context
UINT WINAPI MsiEnumComponentsExA( UINT WINAPI MsiEnumComponentsExA(
__in_opt LPCSTR szUserSid, _In_opt_ LPCSTR szUserSid,
// Account for enumeration // Account for enumeration
__in DWORD dwContext _In_ DWORD dwContext
, // Contexts for enumeration , // Contexts for enumeration
__in DWORD dwIndex, _In_ DWORD dwIndex,
// 0-based index into installed components // 0-based index into installed components
__out_ecount_opt(MAX_GUID_CHARS+1) CHAR szInstall _Out_writes_opt_(MAX_GUID_CHARS+1) CHAR szInstall
edComponentCode[39], // Enumerated component's ComponentCode edComponentCode[39], // Enumerated component's ComponentCode
__out_opt MSIINSTALLCONTEXT* pdwInstal _Out_opt_ MSIINSTALLCONTEXT* pdwInstal
ledContext, // Enumerated component's context ledContext, // Enumerated component's context
__out_ecount_opt(*pcchSid) LPSTR szSid, _Out_writes_opt_(*pcchSid) LPSTR szSid,
// Enumerated component's user account // Enumerated component's user account
__inout_opt LPDWORD pcchSid); _Inout_opt_ LPDWORD pcchSid);
// in/out character count of szSid // in/out character count of szSid
UINT WINAPI MsiEnumComponentsExW( UINT WINAPI MsiEnumComponentsExW(
__in_opt LPCWSTR szUserSid, _In_opt_ LPCWSTR szUserSid,
// Account for enumeration // Account for enumeration
__in DWORD dwContext _In_ DWORD dwContext
, // Contexts for enumeration , // Contexts for enumeration
__in DWORD dwIndex, _In_ DWORD dwIndex,
// 0-based index into installed components // 0-based index into installed components
__out_ecount_opt(MAX_GUID_CHARS+1) WCHAR szInstall _Out_writes_opt_(MAX_GUID_CHARS+1) WCHAR szInstall
edComponentCode[39], // Enumerated component's ComponentCode edComponentCode[39], // Enumerated component's ComponentCode
__out_opt MSIINSTALLCONTEXT* pdwInstal _Out_opt_ MSIINSTALLCONTEXT* pdwInstal
ledContext, // Enumerated component's context ledContext, // Enumerated component's context
__out_ecount_opt(*pcchSid) LPWSTR szSid, _Out_writes_opt_(*pcchSid) LPWSTR szSid,
// Enumerated component's user account // Enumerated component's user account
__inout_opt LPDWORD pcchSid); _Inout_opt_ LPDWORD pcchSid);
// in/out character count of szSid // in/out character count of szSid
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumComponentsEx MsiEnumComponentsExW #define MsiEnumComponentsEx MsiEnumComponentsExW
#else #else
#define MsiEnumComponentsEx MsiEnumComponentsExA #define MsiEnumComponentsEx MsiEnumComponentsExA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_MSI >= 500) #endif // (_WIN32_MSI >= 500)
// Enumerate the client products for a component // Enumerate the client products for a component
UINT WINAPI MsiEnumClientsA( UINT WINAPI MsiEnumClientsA(
__in LPCSTR szComponent, _In_ LPCSTR szComponent,
__in DWORD iProductIndex, // 0-based in _In_ DWORD iProductIndex, // 0-based in
dex into client products dex into client products
__out_ecount(MAX_GUID_CHARS+1) LPSTR lpProductBuf); // buffer of ch _Out_writes_(MAX_GUID_CHARS+1) LPSTR lpProductBuf); // buffer of ch
ar count: 39 (size of string GUID) ar count: 39 (size of string GUID)
UINT WINAPI MsiEnumClientsW( UINT WINAPI MsiEnumClientsW(
__in LPCWSTR szComponent, _In_ LPCWSTR szComponent,
__in DWORD iProductIndex, // 0-based in _In_ DWORD iProductIndex, // 0-based in
dex into client products dex into client products
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpProductBuf); // buffer of c _Out_writes_(MAX_GUID_CHARS+1) LPWSTR lpProductBuf); // buffer of c
har count: 39 (size of string GUID) har count: 39 (size of string GUID)
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumClients MsiEnumClientsW #define MsiEnumClients MsiEnumClientsW
#else #else
#define MsiEnumClients MsiEnumClientsA #define MsiEnumClients MsiEnumClientsA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 500) #if (_WIN32_MSI >= 500)
// Enumerate the client products for a component for a given users // Enumerate the client products for a component for a given users
// and context // and context
UINT WINAPI MsiEnumClientsExA ( UINT WINAPI MsiEnumClientsExA (
__in LPCSTR szComponent, _In_ LPCSTR szComponent,
// ComponentCode for enumeration // ComponentCode for enumeration
__in_opt LPCSTR szUserSid, _In_opt_ LPCSTR szUserSid,
// Account for enumeration // Account for enumeration
__in DWORD dwContext _In_ DWORD dwContext
, // Contexts for enumeration , // Contexts for enumeration
__in DWORD dwProduct _In_ DWORD dwProduct
Index, // 0-based index into component clients Index, // 0-based index into component clients
__out_ecount_opt(MAX_GUID_CHARS+1) CHAR szProduct _Out_writes_opt_(MAX_GUID_CHARS+1) CHAR szProduct
Buf[39], // Enumerated component's client ProductCode Buf[39], // Enumerated component's client ProductCode
__out_opt MSIINSTALLCONTEXT *pdwInsta _Out_opt_ MSIINSTALLCONTEXT *pdwInsta
lledContext, // Enumerated component's client product's context lledContext, // Enumerated component's client product's context
__out_ecount_opt(*pcchSid) LPSTR szSid, _Out_writes_opt_(*pcchSid) LPSTR szSid,
// Enumerated user account // Enumerated user account
__inout_opt LPDWORD pcchSid); _Inout_opt_ LPDWORD pcchSid);
// in/out character count of szSid // in/out character count of szSid
UINT WINAPI MsiEnumClientsExW ( UINT WINAPI MsiEnumClientsExW (
__in LPCWSTR szComponent, _In_ LPCWSTR szComponent,
// ComponentCode for enumeration // ComponentCode for enumeration
__in_opt LPCWSTR szUserSid, _In_opt_ LPCWSTR szUserSid,
// Account for enumeration // Account for enumeration
__in DWORD dwContext _In_ DWORD dwContext
, // Contexts for enumeration , // Contexts for enumeration
__in DWORD dwProduct _In_ DWORD dwProduct
Index, // 0-based index into component clients Index, // 0-based index into component clients
__out_ecount_opt(MAX_GUID_CHARS+1) WCHAR szProduct _Out_writes_opt_(MAX_GUID_CHARS+1) WCHAR szProduct
Buf[39], // Enumerated component's client ProductCode Buf[39], // Enumerated component's client ProductCode
__out_opt MSIINSTALLCONTEXT *pdwInsta _Out_opt_ MSIINSTALLCONTEXT *pdwInsta
lledContext, // Enumerated component's client product's context lledContext, // Enumerated component's client product's context
__out_ecount_opt(*pcchSid) LPWSTR szSid, _Out_writes_opt_(*pcchSid) LPWSTR szSid,
// Enumerated user account // Enumerated user account
__inout_opt LPDWORD pcchSid); _Inout_opt_ LPDWORD pcchSid);
// in/out character count of szSid // in/out character count of szSid
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumClientsEx MsiEnumClientsExW #define MsiEnumClientsEx MsiEnumClientsExW
#else #else
#define MsiEnumClientsEx MsiEnumClientsExA #define MsiEnumClientsEx MsiEnumClientsExA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_MSI >= 500) #endif // (_WIN32_MSI >= 500)
// Enumerate the qualifiers for an advertised component. // Enumerate the qualifiers for an advertised component.
UINT WINAPI MsiEnumComponentQualifiersA( UINT WINAPI MsiEnumComponentQualifiersA(
__in LPCSTR szComponent, _In_ LPCSTR szComponent,
// generic component ID that is qualified // generic component ID that is qualified
__in DWORD iIndex, _In_ DWORD iIndex,
// 0-based index into qualifiers // 0-based index into qualifiers
__out_ecount(*pcchQualifierBuf) LPSTR lpQualifierBuf, _Out_writes_(*pcchQualifierBuf) LPSTR lpQualifierBuf,
// qualifier buffer // qualifier buffer
__inout LPDWORD pcchQualifierBuf, _Inout_ LPDWORD pcchQualifierBuf,
// in/out qualifier buffer character count // in/out qualifier buffer character count
__out_ecount_opt(*pcchApplicationDataBuf) LPSTR lpApplicationDataBuf, _Out_writes_opt_(*pcchApplicationDataBuf) LPSTR lpApplicationDataBuf,
// description buffer // description buffer
__inout_opt LPDWORD pcchApplicationData _Inout_opt_ LPDWORD pcchApplicationData
Buf); // in/out description buffer character count Buf); // in/out description buffer character count
UINT WINAPI MsiEnumComponentQualifiersW( UINT WINAPI MsiEnumComponentQualifiersW(
__in LPCWSTR szComponent, _In_ LPCWSTR szComponent,
// generic component ID that is qualified // generic component ID that is qualified
__in DWORD iIndex, _In_ DWORD iIndex,
// 0-based index into qualifiers // 0-based index into qualifiers
__out_ecount(*pcchQualifierBuf) LPWSTR lpQualifierBuf, _Out_writes_(*pcchQualifierBuf) LPWSTR lpQualifierBuf,
// qualifier buffer // qualifier buffer
__inout LPDWORD pcchQualifierBuf, _Inout_ LPDWORD pcchQualifierBuf,
// in/out qualifier buffer character count // in/out qualifier buffer character count
__out_ecount_opt(*pcchApplicationDataBuf) LPWSTR lpApplicationDataBuf _Out_writes_opt_(*pcchApplicationDataBuf) LPWSTR lpApplicationDataBuf
, // description buffer , // description buffer
__inout_opt LPDWORD pcchApplicationData _Inout_opt_ LPDWORD pcchApplicationData
Buf); // in/out description buffer character count Buf); // in/out description buffer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumComponentQualifiers MsiEnumComponentQualifiersW #define MsiEnumComponentQualifiers MsiEnumComponentQualifiersW
#else #else
#define MsiEnumComponentQualifiers MsiEnumComponentQualifiersA #define MsiEnumComponentQualifiers MsiEnumComponentQualifiersA
#endif // !UNICODE #endif // !UNICODE
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to obtain product or package information. // Functions to obtain product or package information.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Open the installation for a product to obtain detailed information // Open the installation for a product to obtain detailed information
UINT WINAPI MsiOpenProductA( UINT WINAPI MsiOpenProductA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__out MSIHANDLE *hProduct); // returned product handle, must be closed _Out_ MSIHANDLE *hProduct); // returned product handle, must be closed
UINT WINAPI MsiOpenProductW( UINT WINAPI MsiOpenProductW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__out MSIHANDLE *hProduct); // returned product handle, must be closed _Out_ MSIHANDLE *hProduct); // returned product handle, must be closed
#ifdef UNICODE #ifdef UNICODE
#define MsiOpenProduct MsiOpenProductW #define MsiOpenProduct MsiOpenProductW
#else #else
#define MsiOpenProduct MsiOpenProductA #define MsiOpenProduct MsiOpenProductA
#endif // !UNICODE #endif // !UNICODE
// Open a product package in order to access product properties // Open a product package in order to access product properties
UINT WINAPI MsiOpenPackageA( UINT WINAPI MsiOpenPackageA(
__in LPCSTR szPackagePath, // path to package, or database handle _In_ LPCSTR szPackagePath, // path to package, or database handle
: #nnnn : #nnnn
__out MSIHANDLE *hProduct); // returned product handle, must be _Out_ MSIHANDLE *hProduct); // returned product handle, must be
closed closed
UINT WINAPI MsiOpenPackageW( UINT WINAPI MsiOpenPackageW(
__in LPCWSTR szPackagePath, // path to package, or database handl _In_ LPCWSTR szPackagePath, // path to package, or database handl
e: #nnnn e: #nnnn
__out MSIHANDLE *hProduct); // returned product handle, must be _Out_ MSIHANDLE *hProduct); // returned product handle, must be
closed closed
#ifdef UNICODE #ifdef UNICODE
#define MsiOpenPackage MsiOpenPackageW #define MsiOpenPackage MsiOpenPackageW
#else #else
#define MsiOpenPackage MsiOpenPackageA #define MsiOpenPackage MsiOpenPackageA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 150) #if (_WIN32_MSI >= 150)
// Open a product package in order to access product properties // Open a product package in order to access product properties
// Option to create a "safe" engine that does not look at machine state // Option to create a "safe" engine that does not look at machine state
// and does not allow for modification of machine state // and does not allow for modification of machine state
UINT WINAPI MsiOpenPackageExA( UINT WINAPI MsiOpenPackageExA(
__in LPCSTR szPackagePath, // path to package, or database handle: #nn _In_ LPCSTR szPackagePath, // path to package, or database handle: #nn
nn nn
__in DWORD dwOptions, // options flags to indicate whether or n _In_ DWORD dwOptions, // options flags to indicate whether or n
ot to ignore machine state ot to ignore machine state
__out MSIHANDLE *hProduct); // returned product handle, must be close _Out_ MSIHANDLE *hProduct); // returned product handle, must be close
d d
UINT WINAPI MsiOpenPackageExW( UINT WINAPI MsiOpenPackageExW(
__in LPCWSTR szPackagePath, // path to package, or database handle: #n _In_ LPCWSTR szPackagePath, // path to package, or database handle: #n
nnn nnn
__in DWORD dwOptions, // options flags to indicate whether or n _In_ DWORD dwOptions, // options flags to indicate whether or n
ot to ignore machine state ot to ignore machine state
__out MSIHANDLE *hProduct); // returned product handle, must be close _Out_ MSIHANDLE *hProduct); // returned product handle, must be close
d d
#ifdef UNICODE #ifdef UNICODE
#define MsiOpenPackageEx MsiOpenPackageExW #define MsiOpenPackageEx MsiOpenPackageExW
#else #else
#define MsiOpenPackageEx MsiOpenPackageExA #define MsiOpenPackageEx MsiOpenPackageExA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 150) #endif //(_WIN32_MSI >= 150)
#if (_WIN32_MSI >= 400) #if (_WIN32_MSI >= 400)
UINT WINAPI MsiGetPatchFileListA( UINT WINAPI MsiGetPatchFileListA(
__in LPCSTR szProductCode, _In_ LPCSTR szProductCode,
__in LPCSTR szPatchPackages, _In_ LPCSTR szPatchPackages,
__out LPDWORD pcFiles, _Out_ LPDWORD pcFiles,
__deref_out MSIHANDLE** pphFileRecords); _Outptr_result_buffer_maybenull_(*pcFiles)MSIHANDLE** pphFileRecords);
UINT WINAPI MsiGetPatchFileListW( UINT WINAPI MsiGetPatchFileListW(
__in LPCWSTR szProductCode, _In_ LPCWSTR szProductCode,
__in LPCWSTR szPatchPackages, _In_ LPCWSTR szPatchPackages,
__out LPDWORD pcFiles, _Out_ LPDWORD pcFiles,
__deref_out MSIHANDLE** pphFileRecords); _Outptr_result_buffer_maybenull_(*pcFiles)MSIHANDLE** pphFileRecords);
#ifdef UNICODE #ifdef UNICODE
#define MsiGetPatchFileList MsiGetPatchFileListW #define MsiGetPatchFileList MsiGetPatchFileListW
#else #else
#define MsiGetPatchFileList MsiGetPatchFileListA #define MsiGetPatchFileList MsiGetPatchFileListA
#endif // !UNICODE #endif // !UNICODE
#endif // #if (_WIN32_MSI >= 400) #endif // #if (_WIN32_MSI >= 400)
// Provide the value for an installation property. // Provide the value for an installation property.
UINT WINAPI MsiGetProductPropertyA( UINT WINAPI MsiGetProductPropertyA(
__in MSIHANDLE hProduct, // product h _In_ MSIHANDLE hProduct, // product h
andle obtained from MsiOpenProduct andle obtained from MsiOpenProduct
__in LPCSTR szProperty, // property na _In_ LPCSTR szProperty, // property na
me, case-sensitive me, case-sensitive
__out_ecount_opt(*pcchValueBuf) LPSTR lpValueBuf, // returned va _Out_writes_opt_(*pcchValueBuf) LPSTR lpValueBuf, // returned va
lue, NULL if not desired lue, NULL if not desired
__inout_opt LPDWORD pcchValueBuf); // in/out bu _Inout_opt_ LPDWORD pcchValueBuf); // in/out bu
ffer character count ffer character count
UINT WINAPI MsiGetProductPropertyW( UINT WINAPI MsiGetProductPropertyW(
__in MSIHANDLE hProduct, // product h _In_ MSIHANDLE hProduct, // product h
andle obtained from MsiOpenProduct andle obtained from MsiOpenProduct
__in LPCWSTR szProperty, // property n _In_ LPCWSTR szProperty, // property n
ame, case-sensitive ame, case-sensitive
__out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf, // returned v _Out_writes_opt_(*pcchValueBuf) LPWSTR lpValueBuf, // returned v
alue, NULL if not desired alue, NULL if not desired
__inout_opt LPDWORD pcchValueBuf); // in/out bu _Inout_opt_ LPDWORD pcchValueBuf); // in/out bu
ffer character count ffer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetProductProperty MsiGetProductPropertyW #define MsiGetProductProperty MsiGetProductPropertyW
#else #else
#define MsiGetProductProperty MsiGetProductPropertyA #define MsiGetProductProperty MsiGetProductPropertyA
#endif // !UNICODE #endif // !UNICODE
// Determine whether a file is a package // Determine whether a file is a package
// Returns ERROR_SUCCESS if file is a package. // Returns ERROR_SUCCESS if file is a package.
UINT WINAPI MsiVerifyPackageA( UINT WINAPI MsiVerifyPackageA(
__in LPCSTR szPackagePath); // location of package _In_ LPCSTR szPackagePath); // location of package
UINT WINAPI MsiVerifyPackageW( UINT WINAPI MsiVerifyPackageW(
__in LPCWSTR szPackagePath); // location of package _In_ LPCWSTR szPackagePath); // location of package
#ifdef UNICODE #ifdef UNICODE
#define MsiVerifyPackage MsiVerifyPackageW #define MsiVerifyPackage MsiVerifyPackageW
#else #else
#define MsiVerifyPackage MsiVerifyPackageA #define MsiVerifyPackage MsiVerifyPackageA
#endif // !UNICODE #endif // !UNICODE
// Provide descriptive information for product feature: title and description. // Provide descriptive information for product feature: title and description.
// Returns the install level for the feature, or -1 if feature is unknown. // Returns the install level for the feature, or -1 if feature is unknown.
// 0 = feature is not available on this machine // 0 = feature is not available on this machine
// 1 = highest priority, feature installed if parent is installed // 1 = highest priority, feature installed if parent is installed
// >1 = decreasing priority, feature installation based on InstallLevel propert y // >1 = decreasing priority, feature installation based on InstallLevel propert y
UINT WINAPI MsiGetFeatureInfoA( UINT WINAPI MsiGetFeatureInfoA(
__in MSIHANDLE hProduct, // product ha _In_ MSIHANDLE hProduct, // product ha
ndle obtained from MsiOpenProduct ndle obtained from MsiOpenProduct
__in LPCSTR szFeature, // feature name _In_ LPCSTR szFeature, // feature name
__out_opt LPDWORD lpAttributes, // attribute _Out_opt_ LPDWORD lpAttributes, // attribute
flags for the feature, using INSTALLFEATUREATTRIBUTE flags for the feature, using INSTALLFEATUREATTRIBUTE
__out_ecount_opt(*pcchTitleBuf) LPSTR lpTitleBuf, // returned loc _Out_writes_opt_(*pcchTitleBuf) LPSTR lpTitleBuf, // returned loc
alized name, NULL if not desired alized name, NULL if not desired
__inout_opt LPDWORD pcchTitleBuf, // in/out buf _Inout_opt_ LPDWORD pcchTitleBuf, // in/out buf
fer character count fer character count
__out_ecount_opt(*pcchHelpBuf) LPSTR lpHelpBuf, // returned des _Out_writes_opt_(*pcchHelpBuf) LPSTR lpHelpBuf, // returned des
cription, NULL if not desired cription, NULL if not desired
__inout_opt LPDWORD pcchHelpBuf); // in/out buf _Inout_opt_ LPDWORD pcchHelpBuf); // in/out buf
fer character count fer character count
UINT WINAPI MsiGetFeatureInfoW( UINT WINAPI MsiGetFeatureInfoW(
__in MSIHANDLE hProduct, // product ha _In_ MSIHANDLE hProduct, // product ha
ndle obtained from MsiOpenProduct ndle obtained from MsiOpenProduct
__in LPCWSTR szFeature, // feature nam _In_ LPCWSTR szFeature, // feature nam
e e
__out_opt LPDWORD lpAttributes, // attribute _Out_opt_ LPDWORD lpAttributes, // attribute
flags for the feature, using INSTALLFEATUREATTRIBUTE flags for the feature, using INSTALLFEATUREATTRIBUTE
__out_ecount_opt(*pcchTitleBuf) LPWSTR lpTitleBuf, // returned lo _Out_writes_opt_(*pcchTitleBuf) LPWSTR lpTitleBuf, // returned lo
calized name, NULL if not desired calized name, NULL if not desired
__inout_opt LPDWORD pcchTitleBuf, // in/out buf _Inout_opt_ LPDWORD pcchTitleBuf, // in/out buf
fer character count fer character count
__out_ecount_opt(*pcchHelpBuf) LPWSTR lpHelpBuf, // returned de _Out_writes_opt_(*pcchHelpBuf) LPWSTR lpHelpBuf, // returned de
scription, NULL if not desired scription, NULL if not desired
__inout_opt LPDWORD pcchHelpBuf); // in/out buf _Inout_opt_ LPDWORD pcchHelpBuf); // in/out buf
fer character count fer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetFeatureInfo MsiGetFeatureInfoW #define MsiGetFeatureInfo MsiGetFeatureInfoW
#else #else
#define MsiGetFeatureInfo MsiGetFeatureInfoA #define MsiGetFeatureInfo MsiGetFeatureInfoA
#endif // !UNICODE #endif // !UNICODE
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to access or install missing components and files. // Functions to access or install missing components and files.
// These should be used as a last resort. // These should be used as a last resort.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Install a component unexpectedly missing, provided only for error recovery // Install a component unexpectedly missing, provided only for error recovery
// This would typically occur due to failue to establish feature availability // This would typically occur due to failue to establish feature availability
// The product feature having the smallest incremental cost is installed // The product feature having the smallest incremental cost is installed
UINT WINAPI MsiInstallMissingComponentA( UINT WINAPI MsiInstallMissingComponentA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in LPCSTR szComponent, // component Id, string GUID _In_ LPCSTR szComponent, // component Id, string GUID
__in INSTALLSTATE eInstallState); // local/source/default, absent inva _In_ INSTALLSTATE eInstallState); // local/source/default, absent inva
lid lid
UINT WINAPI MsiInstallMissingComponentW( UINT WINAPI MsiInstallMissingComponentW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in LPCWSTR szComponent, // component Id, string GUID _In_ LPCWSTR szComponent, // component Id, string GUID
__in INSTALLSTATE eInstallState); // local/source/default, absent inva _In_ INSTALLSTATE eInstallState); // local/source/default, absent inva
lid lid
#ifdef UNICODE #ifdef UNICODE
#define MsiInstallMissingComponent MsiInstallMissingComponentW #define MsiInstallMissingComponent MsiInstallMissingComponentW
#else #else
#define MsiInstallMissingComponent MsiInstallMissingComponentA #define MsiInstallMissingComponent MsiInstallMissingComponentA
#endif // !UNICODE #endif // !UNICODE
// Install a file unexpectedly missing, provided only for error recovery // Install a file unexpectedly missing, provided only for error recovery
// This would typically occur due to failue to establish feature availability // This would typically occur due to failue to establish feature availability
// The missing component is determined from the product's File table, then // The missing component is determined from the product's File table, then
// the product feature having the smallest incremental cost is installed // the product feature having the smallest incremental cost is installed
UINT WINAPI MsiInstallMissingFileA( UINT WINAPI MsiInstallMissingFileA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in LPCSTR szFile); // file name, without path _In_ LPCSTR szFile); // file name, without path
UINT WINAPI MsiInstallMissingFileW( UINT WINAPI MsiInstallMissingFileW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in LPCWSTR szFile); // file name, without path _In_ LPCWSTR szFile); // file name, without path
#ifdef UNICODE #ifdef UNICODE
#define MsiInstallMissingFile MsiInstallMissingFileW #define MsiInstallMissingFile MsiInstallMissingFileW
#else #else
#define MsiInstallMissingFile MsiInstallMissingFileA #define MsiInstallMissingFile MsiInstallMissingFileA
#endif // !UNICODE #endif // !UNICODE
// Return full path to an installed component without a product code // Return full path to an installed component without a product code
// This function attempts to determine the product using MsiGetProductCode // This function attempts to determine the product using MsiGetProductCode
// but is not guaranteed to find the correct product for the caller. // but is not guaranteed to find the correct product for the caller.
// MsiGetComponentPath should always be called when possible. // MsiGetComponentPath should always be called when possible.
INSTALLSTATE WINAPI MsiLocateComponentA( INSTALLSTATE WINAPI MsiLocateComponentA(
__in LPCSTR szComponent, // component Id, string _In_ LPCSTR szComponent, // component Id, string
GUID GUID
__out_ecount_opt(*pcchBuf) LPSTR lpPathBuf, // returned path _Out_writes_opt_(*pcchBuf) LPSTR lpPathBuf, // returned path
__inout_opt LPDWORD pcchBuf); // in/out buffer chara _Inout_opt_ LPDWORD pcchBuf); // in/out buffer chara
cter count cter count
INSTALLSTATE WINAPI MsiLocateComponentW( INSTALLSTATE WINAPI MsiLocateComponentW(
__in LPCWSTR szComponent, // component Id, string _In_ LPCWSTR szComponent, // component Id, string
GUID GUID
__out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf, // returned path _Out_writes_opt_(*pcchBuf) LPWSTR lpPathBuf, // returned path
__inout_opt LPDWORD pcchBuf); // in/out buffer chara _Inout_opt_ LPDWORD pcchBuf); // in/out buffer chara
cter count cter count
#ifdef UNICODE #ifdef UNICODE
#define MsiLocateComponent MsiLocateComponentW #define MsiLocateComponent MsiLocateComponentW
#else #else
#define MsiLocateComponent MsiLocateComponentA #define MsiLocateComponent MsiLocateComponentA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 110) #if (_WIN32_MSI >= 110)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions used to manage the list of valid sources. // Functions used to manage the list of valid sources.
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Opens the list of sources for the specified user's install of the product // Opens the list of sources for the specified user's install of the product
// and removes all network sources from the list. A NULL or empty value for // and removes all network sources from the list. A NULL or empty value for
// the user name indicates the per-machine install. // the user name indicates the per-machine install.
UINT WINAPI MsiSourceListClearAllA( UINT WINAPI MsiSourceListClearAllA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in_opt LPCSTR szUserName, // user name or NULL/empty for per-machin _In_opt_ LPCSTR szUserName, // user name or NULL/empty for per-machin
e e
__reserved DWORD dwReserved); // reserved - must be 0 _Reserved_ DWORD dwReserved); // reserved - must be 0
UINT WINAPI MsiSourceListClearAllW( UINT WINAPI MsiSourceListClearAllW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in_opt LPCWSTR szUserName, // user name or NULL/empty for per-machi _In_opt_ LPCWSTR szUserName, // user name or NULL/empty for per-machi
ne ne
__reserved DWORD dwReserved); // reserved - must be 0 _Reserved_ DWORD dwReserved); // reserved - must be 0
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListClearAll MsiSourceListClearAllW #define MsiSourceListClearAll MsiSourceListClearAllW
#else #else
#define MsiSourceListClearAll MsiSourceListClearAllA #define MsiSourceListClearAll MsiSourceListClearAllA
#endif // !UNICODE #endif // !UNICODE
// Opens the list of sources for the specified user's install of the product // Opens the list of sources for the specified user's install of the product
// and adds the provided source as a new network source. A NULL or empty // and adds the provided source as a new network source. A NULL or empty
// value for the user name indicates the per-machine install. // value for the user name indicates the per-machine install.
UINT WINAPI MsiSourceListAddSourceA( UINT WINAPI MsiSourceListAddSourceA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in_opt LPCSTR szUserName, // user name or NULL/empty for per-machin _In_opt_ LPCSTR szUserName, // user name or NULL/empty for per-machin
e e
__reserved DWORD dwReserved, // reserved - must be 0 _Reserved_ DWORD dwReserved, // reserved - must be 0
__in LPCSTR szSource); // new source _In_ LPCSTR szSource); // new source
UINT WINAPI MsiSourceListAddSourceW( UINT WINAPI MsiSourceListAddSourceW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in_opt LPCWSTR szUserName, // user name or NULL/empty for per-machi _In_opt_ LPCWSTR szUserName, // user name or NULL/empty for per-machi
ne ne
__reserved DWORD dwReserved, // reserved - must be 0 _Reserved_ DWORD dwReserved, // reserved - must be 0
__in LPCWSTR szSource); // new source _In_ LPCWSTR szSource); // new source
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListAddSource MsiSourceListAddSourceW #define MsiSourceListAddSource MsiSourceListAddSourceW
#else #else
#define MsiSourceListAddSource MsiSourceListAddSourceA #define MsiSourceListAddSource MsiSourceListAddSourceA
#endif // !UNICODE #endif // !UNICODE
// Forces the installer to reevaluate the list of sources the next time that // Forces the installer to reevaluate the list of sources the next time that
// the specified product needs a source. // the specified product needs a source.
UINT WINAPI MsiSourceListForceResolutionA( UINT WINAPI MsiSourceListForceResolutionA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__in_opt LPCSTR szUserName, // user name or NULL/empty for per-machin _In_opt_ LPCSTR szUserName, // user name or NULL/empty for per-machin
e e
__reserved DWORD dwReserved); // reserved - must be 0 _Reserved_ DWORD dwReserved); // reserved - must be 0
UINT WINAPI MsiSourceListForceResolutionW( UINT WINAPI MsiSourceListForceResolutionW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__in_opt LPCWSTR szUserName, // user name or NULL/empty for per-machi _In_opt_ LPCWSTR szUserName, // user name or NULL/empty for per-machi
ne ne
__reserved DWORD dwReserved); // reserved - must be 0 _Reserved_ DWORD dwReserved); // reserved - must be 0
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListForceResolution MsiSourceListForceResolutionW #define MsiSourceListForceResolution MsiSourceListForceResolutionW
#else #else
#define MsiSourceListForceResolution MsiSourceListForceResolutionA #define MsiSourceListForceResolution MsiSourceListForceResolutionA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 110) #endif //(_WIN32_MSI >= 110)
#if (_WIN32_MSI >= 300) #if (_WIN32_MSI >= 300)
// Adds a source or moves a source within the list of sources for the // Adds a source or moves a source within the list of sources for the
// specified product or patch instance. The source can be network/url type. // specified product or patch instance. The source can be network/url type.
UINT WINAPI MsiSourceListAddSourceExA( UINT WINAPI MsiSourceListAddSourceExA(
__in LPCSTR szProductCodeOrPatchCode,// Source will be added to this prod _In_ LPCSTR szProductCodeOrPatchCode,// Source will be added to this prod
uct or patch uct or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch ins _In_opt_ LPCSTR szUserSid, // Account of this product/patch ins
tance tance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch i _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch i
nstance nstance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCSTR szSource, // source to be added/re-ordered _In_ LPCSTR szSource, // source to be added/re-ordered
__in DWORD dwIndex); // new index for the source _In_ DWORD dwIndex); // new index for the source
UINT WINAPI MsiSourceListAddSourceExW( UINT WINAPI MsiSourceListAddSourceExW(
__in LPCWSTR szProductCodeOrPatchCode,// Source will be added to this pro _In_ LPCWSTR szProductCodeOrPatchCode,// Source will be added to this pro
duct or patch duct or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch in _In_opt_ LPCWSTR szUserSid, // Account of this product/patch in
stance stance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch i _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch i
nstance nstance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCWSTR szSource, // source to be added/re-ordered _In_ LPCWSTR szSource, // source to be added/re-ordered
__in DWORD dwIndex); // new index for the source _In_ DWORD dwIndex); // new index for the source
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListAddSourceEx MsiSourceListAddSourceExW #define MsiSourceListAddSourceEx MsiSourceListAddSourceExW
#else #else
#define MsiSourceListAddSourceEx MsiSourceListAddSourceExA #define MsiSourceListAddSourceEx MsiSourceListAddSourceExA
#endif // !UNICODE #endif // !UNICODE
// Add or update a media source for the specified product or patch instance // Add or update a media source for the specified product or patch instance
UINT WINAPI MsiSourceListAddMediaDiskA( UINT WINAPI MsiSourceListAddMediaDiskA(
__in LPCSTR szProductCodeOrPatchCode,// Disk will be added to this produc _In_ LPCSTR szProductCodeOrPatchCode,// Disk will be added to this produc
t or patch t or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch ins _In_opt_ LPCSTR szUserSid, // Account of this product/patch ins
tance tance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch i _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch i
nstance nstance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in DWORD dwDiskId, // ID of the disk to be added/upda _In_ DWORD dwDiskId, // ID of the disk to be added/upda
ted ted
__in_opt LPCSTR szVolumeLabel, // Volume Label of the disk _In_opt_ LPCSTR szVolumeLabel, // Volume Label of the disk
__in_opt LPCSTR szDiskPrompt); // Disk Prompt of the disk _In_opt_ LPCSTR szDiskPrompt); // Disk Prompt of the disk
UINT WINAPI MsiSourceListAddMediaDiskW( UINT WINAPI MsiSourceListAddMediaDiskW(
__in LPCWSTR szProductCodeOrPatchCode,// Disk will be added to this produ _In_ LPCWSTR szProductCodeOrPatchCode,// Disk will be added to this produ
ct or patch ct or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch in _In_opt_ LPCWSTR szUserSid, // Account of this product/patch in
stance stance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch i _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch i
nstance nstance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in DWORD dwDiskId, // ID of the disk to be added/upda _In_ DWORD dwDiskId, // ID of the disk to be added/upda
ted ted
__in_opt LPCWSTR szVolumeLabel, // Volume Label of the disk _In_opt_ LPCWSTR szVolumeLabel, // Volume Label of the disk
__in_opt LPCWSTR szDiskPrompt); // Disk Prompt of the disk _In_opt_ LPCWSTR szDiskPrompt); // Disk Prompt of the disk
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListAddMediaDisk MsiSourceListAddMediaDiskW #define MsiSourceListAddMediaDisk MsiSourceListAddMediaDiskW
#else #else
#define MsiSourceListAddMediaDisk MsiSourceListAddMediaDiskA #define MsiSourceListAddMediaDisk MsiSourceListAddMediaDiskA
#endif // !UNICODE #endif // !UNICODE
// Remove an existing source for the specified product or patch instance // Remove an existing source for the specified product or patch instance
UINT WINAPI MsiSourceListClearSourceA( UINT WINAPI MsiSourceListClearSourceA(
__in LPCSTR szProductCodeOrPatchCode, // Source will be cleared for this _In_ LPCSTR szProductCodeOrPatchCode, // Source will be cleared for this
product or patch product or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch in _In_opt_ LPCSTR szUserSid, // Account of this product/patch in
stance stance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCSTR szSource); // source to be removed _In_ LPCSTR szSource); // source to be removed
UINT WINAPI MsiSourceListClearSourceW( UINT WINAPI MsiSourceListClearSourceW(
__in LPCWSTR szProductCodeOrPatchCode, // Source will be cleared for this _In_ LPCWSTR szProductCodeOrPatchCode, // Source will be cleared for this
product or patch product or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch i _In_opt_ LPCWSTR szUserSid, // Account of this product/patch i
nstance nstance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCWSTR szSource); // source to be removed _In_ LPCWSTR szSource); // source to be removed
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListClearSource MsiSourceListClearSourceW #define MsiSourceListClearSource MsiSourceListClearSourceW
#else #else
#define MsiSourceListClearSource MsiSourceListClearSourceA #define MsiSourceListClearSource MsiSourceListClearSourceA
#endif // !UNICODE #endif // !UNICODE
// Remove an existing registered disk under the media source for the specified p roduct or // Remove an existing registered disk under the media source for the specified p roduct or
// patch instance // patch instance
UINT WINAPI MsiSourceListClearMediaDiskA( UINT WINAPI MsiSourceListClearMediaDiskA(
__in LPCSTR szProductCodeOrPatchCode, // Disk will be cleared for this pr _In_ LPCSTR szProductCodeOrPatchCode, // Disk will be cleared for this pr
oduct or patch oduct or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch in _In_opt_ LPCSTR szUserSid, // Account of this product/patch in
stance stance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in DWORD dwDiskId); // DiskID to be removed _In_ DWORD dwDiskId); // DiskID to be removed
UINT WINAPI MsiSourceListClearMediaDiskW( UINT WINAPI MsiSourceListClearMediaDiskW(
__in LPCWSTR szProductCodeOrPatchCode, // Disk will be cleared for this p _In_ LPCWSTR szProductCodeOrPatchCode, // Disk will be cleared for this p
roduct or patch roduct or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch i _In_opt_ LPCWSTR szUserSid, // Account of this product/patch i
nstance nstance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in DWORD dwDiskId); // DiskID to be removed _In_ DWORD dwDiskId); // DiskID to be removed
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListClearMediaDisk MsiSourceListClearMediaDiskW #define MsiSourceListClearMediaDisk MsiSourceListClearMediaDiskW
#else #else
#define MsiSourceListClearMediaDisk MsiSourceListClearMediaDiskA #define MsiSourceListClearMediaDisk MsiSourceListClearMediaDiskA
#endif // !UNICODE #endif // !UNICODE
// Remove all existing sources of the given source type for the specified produc t or patch // Remove all existing sources of the given source type for the specified produc t or patch
// instance // instance
UINT WINAPI MsiSourceListClearAllExA( UINT WINAPI MsiSourceListClearAllExA(
__in LPCSTR szProductCodeOrPatchCode, // All sources will be cleared for _In_ LPCSTR szProductCodeOrPatchCode, // All sources will be cleared for
this product or patch this product or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch in _In_opt_ LPCSTR szUserSid, // Account of this product/patch in
stance stance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions); // Additional qualifiers _In_ DWORD dwOptions); // Additional qualifiers
UINT WINAPI MsiSourceListClearAllExW( UINT WINAPI MsiSourceListClearAllExW(
__in LPCWSTR szProductCodeOrPatchCode, // All sources will be cleared for _In_ LPCWSTR szProductCodeOrPatchCode, // All sources will be cleared for
this product or patch this product or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch i _In_opt_ LPCWSTR szUserSid, // Account of this product/patch i
nstance nstance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions); // Additional qualifiers _In_ DWORD dwOptions); // Additional qualifiers
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListClearAllEx MsiSourceListClearAllExW #define MsiSourceListClearAllEx MsiSourceListClearAllExW
#else #else
#define MsiSourceListClearAllEx MsiSourceListClearAllExA #define MsiSourceListClearAllEx MsiSourceListClearAllExA
#endif // !UNICODE #endif // !UNICODE
// Forces the installer to reevaluate the list of sources the next time that // Forces the installer to reevaluate the list of sources the next time that
// the specified product or patch instance needs a source. // the specified product or patch instance needs a source.
UINT WINAPI MsiSourceListForceResolutionExA( UINT WINAPI MsiSourceListForceResolutionExA(
__in LPCSTR szProductCodeOrPatchCode, // Source Resolution will be force _In_ LPCSTR szProductCodeOrPatchCode, // Source Resolution will be force
d for this product or patch d for this product or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch i _In_opt_ LPCSTR szUserSid, // Account of this product/patch i
nstance nstance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions); // Additional qualifiers _In_ DWORD dwOptions); // Additional qualifiers
UINT WINAPI MsiSourceListForceResolutionExW( UINT WINAPI MsiSourceListForceResolutionExW(
__in LPCWSTR szProductCodeOrPatchCode, // Source Resolution will be forc _In_ LPCWSTR szProductCodeOrPatchCode, // Source Resolution will be forc
ed for this product or patch ed for this product or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch _In_opt_ LPCWSTR szUserSid, // Account of this product/patch
instance instance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions); // Additional qualifiers _In_ DWORD dwOptions); // Additional qualifiers
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListForceResolutionEx MsiSourceListForceResolutionExW #define MsiSourceListForceResolutionEx MsiSourceListForceResolutionExW
#else #else
#define MsiSourceListForceResolutionEx MsiSourceListForceResolutionExA #define MsiSourceListForceResolutionEx MsiSourceListForceResolutionExA
#endif // !UNICODE #endif // !UNICODE
// Set the source list property to the provided value for the specified product or patch instance // Set the source list property to the provided value for the specified product or patch instance
UINT WINAPI MsiSourceListSetInfoA( UINT WINAPI MsiSourceListSetInfoA(
__in LPCSTR szProductCodeOrPatchCode, // Source Info will be set for this _In_ LPCSTR szProductCodeOrPatchCode, // Source Info will be set for this
product or patch product or patch
__in_opt LPCSTR szUserSid, // Account of this product/patch in _In_opt_ LPCSTR szUserSid, // Account of this product/patch in
stance stance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCSTR szProperty, // Property being set/modified _In_ LPCSTR szProperty, // Property being set/modified
__in LPCSTR szValue); // Value to be set _In_ LPCSTR szValue); // Value to be set
UINT WINAPI MsiSourceListSetInfoW( UINT WINAPI MsiSourceListSetInfoW(
__in LPCWSTR szProductCodeOrPatchCode, // Source Info will be set for thi _In_ LPCWSTR szProductCodeOrPatchCode, // Source Info will be set for thi
s product or patch s product or patch
__in_opt LPCWSTR szUserSid, // Account of this product/patch i _In_opt_ LPCWSTR szUserSid, // Account of this product/patch i
nstance nstance
__in MSIINSTALLCONTEXT dwContext, // Context of this product/patch _In_ MSIINSTALLCONTEXT dwContext, // Context of this product/patch
instance instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCWSTR szProperty, // Property being set/modified _In_ LPCWSTR szProperty, // Property being set/modified
__in LPCWSTR szValue); // Value to be set _In_ LPCWSTR szValue); // Value to be set
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListSetInfo MsiSourceListSetInfoW #define MsiSourceListSetInfo MsiSourceListSetInfoW
#else #else
#define MsiSourceListSetInfo MsiSourceListSetInfoA #define MsiSourceListSetInfo MsiSourceListSetInfoA
#endif // !UNICODE #endif // !UNICODE
// Query the given source list property for the specified product or patch insta nce // Query the given source list property for the specified product or patch insta nce
UINT WINAPI MsiSourceListGetInfoA( UINT WINAPI MsiSourceListGetInfoA(
__in LPCSTR szProductCodeOrPatchCode, // Source Info will be queri _In_ LPCSTR szProductCodeOrPatchCode, // Source Info will be queri
ed for this produt or patch ed for this produt or patch
__in_opt LPCSTR szUserSid, // Account of this product/p _In_opt_ LPCSTR szUserSid, // Account of this product/p
atch instance atch instance
__in MSIINSTALLCONTEXT dwContext, // Context of this product _In_ MSIINSTALLCONTEXT dwContext, // Context of this product
/patch instance /patch instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCSTR szProperty, // Property being queried _In_ LPCSTR szProperty, // Property being queried
__out_ecount_opt(*pcchValue) LPSTR szValue, // Buffer to get the value _Out_writes_opt_(*pcchValue) LPSTR szValue, // Buffer to get the value
__inout_opt LPDWORD pcchValue); // in/out character count _Inout_opt_ LPDWORD pcchValue); // in/out character count
of szValue of szValue
UINT WINAPI MsiSourceListGetInfoW( UINT WINAPI MsiSourceListGetInfoW(
__in LPCWSTR szProductCodeOrPatchCode, // Source Info will be quer _In_ LPCWSTR szProductCodeOrPatchCode, // Source Info will be quer
ied for this produt or patch ied for this produt or patch
__in_opt LPCWSTR szUserSid, // Account of this product/ _In_opt_ LPCWSTR szUserSid, // Account of this product/
patch instance patch instance
__in MSIINSTALLCONTEXT dwContext, // Context of this product _In_ MSIINSTALLCONTEXT dwContext, // Context of this product
/patch instance /patch instance
__in DWORD dwOptions, // Additional qualifiers _In_ DWORD dwOptions, // Additional qualifiers
__in LPCWSTR szProperty, // Property being queried _In_ LPCWSTR szProperty, // Property being queried
__out_ecount_opt(*pcchValue) LPWSTR szValue, // Buffer to get the value _Out_writes_opt_(*pcchValue) LPWSTR szValue, // Buffer to get the value
__inout_opt LPDWORD pcchValue); // in/out character count _Inout_opt_ LPDWORD pcchValue); // in/out character count
of szValue of szValue
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListGetInfo MsiSourceListGetInfoW #define MsiSourceListGetInfo MsiSourceListGetInfoW
#else #else
#define MsiSourceListGetInfo MsiSourceListGetInfoA #define MsiSourceListGetInfo MsiSourceListGetInfoA
#endif // !UNICODE #endif // !UNICODE
// Enumerate all sources for the specified product or patch instance // Enumerate all sources for the specified product or patch instance
UINT WINAPI MsiSourceListEnumSourcesA( UINT WINAPI MsiSourceListEnumSourcesA(
__in LPCSTR szProductCodeOrPatchCode, // Sources will be enum _In_ LPCSTR szProductCodeOrPatchCode, // Sources will be enum
erated for this product or patch erated for this product or patch
__in_opt LPCSTR szUserSid, // Account of this prod _In_opt_ LPCSTR szUserSid, // Account of this prod
uct/patch instance uct/patch instance
__in MSIINSTALLCONTEXT dwContext, // Context of this pr _In_ MSIINSTALLCONTEXT dwContext, // Context of this pr
oduct/patch instance oduct/patch instance
__in DWORD dwOptions, // Additional qualifi _In_ DWORD dwOptions, // Additional qualifi
ers ers
__in DWORD dwIndex, // Index value for en _In_ DWORD dwIndex, // Index value for en
umeration umeration
__out_ecount_opt(*pcchSource) LPSTR szSource, // Buffer to receive th _Out_writes_opt_(*pcchSource) LPSTR szSource, // Buffer to receive th
e enumerated source e enumerated source
__inout_opt LPDWORD pcchSource); // in/out character c _Inout_opt_ LPDWORD pcchSource); // in/out character c
ount of szSource ount of szSource
UINT WINAPI MsiSourceListEnumSourcesW( UINT WINAPI MsiSourceListEnumSourcesW(
__in LPCWSTR szProductCodeOrPatchCode, // Sources will be enu _In_ LPCWSTR szProductCodeOrPatchCode, // Sources will be enu
merated for this product or patch merated for this product or patch
__in_opt LPCWSTR szUserSid, // Account of this pro _In_opt_ LPCWSTR szUserSid, // Account of this pro
duct/patch instance duct/patch instance
__in MSIINSTALLCONTEXT dwContext, // Context of this pr _In_ MSIINSTALLCONTEXT dwContext, // Context of this pr
oduct/patch instance oduct/patch instance
__in DWORD dwOptions, // Additional qualifi _In_ DWORD dwOptions, // Additional qualifi
ers ers
__in DWORD dwIndex, // Index value for en _In_ DWORD dwIndex, // Index value for en
umeration umeration
__out_ecount_opt(*pcchSource) LPWSTR szSource, // Buffer to receive t _Out_writes_opt_(*pcchSource) LPWSTR szSource, // Buffer to receive t
he enumerated source he enumerated source
__inout_opt LPDWORD pcchSource); // in/out character c _Inout_opt_ LPDWORD pcchSource); // in/out character c
ount of szSource ount of szSource
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListEnumSources MsiSourceListEnumSourcesW #define MsiSourceListEnumSources MsiSourceListEnumSourcesW
#else #else
#define MsiSourceListEnumSources MsiSourceListEnumSourcesA #define MsiSourceListEnumSources MsiSourceListEnumSourcesA
#endif // !UNICODE #endif // !UNICODE
// Enumerate all registered media disks for the specified product or patch insta nce // Enumerate all registered media disks for the specified product or patch insta nce
UINT WINAPI MsiSourceListEnumMediaDisksA( UINT WINAPI MsiSourceListEnumMediaDisksA(
__in LPCSTR szProductCodeOrPatchCode, // Disks will _In_ LPCSTR szProductCodeOrPatchCode, // Disks will
be enumerated for this product or patch be enumerated for this product or patch
__in_opt LPCSTR szUserSid, // Account of _In_opt_ LPCSTR szUserSid, // Account of
this product/patch instance this product/patch instance
__in MSIINSTALLCONTEXT dwContext, // Context o _In_ MSIINSTALLCONTEXT dwContext, // Context o
f this product/patch instance f this product/patch instance
__in DWORD dwOptions, // Additiona _In_ DWORD dwOptions, // Additiona
l qualifiers l qualifiers
__in DWORD dwIndex, // Index val _In_ DWORD dwIndex, // Index val
ue for enumeration ue for enumeration
__out_opt LPDWORD pdwDiskId, // ID of the _Out_opt_ LPDWORD pdwDiskId, // ID of the
disk being enumerated disk being enumerated
__out_ecount_opt(*pcchVolumeLabel) LPSTR szVolumeLabel, // Volume labe _Out_writes_opt_(*pcchVolumeLabel) LPSTR szVolumeLabel, // Volume labe
l of the disk being enumerated l of the disk being enumerated
__inout_opt LPDWORD pcchVolumeLabel, // in/out ch _Inout_opt_ LPDWORD pcchVolumeLabel, // in/out ch
aracter count of szVolumeLabel aracter count of szVolumeLabel
__out_ecount_opt(*pcchDiskPrompt) LPSTR szDiskPrompt, // DiskPrompt _Out_writes_opt_(*pcchDiskPrompt) LPSTR szDiskPrompt, // DiskPrompt
of the disk being enumerated of the disk being enumerated
__inout_opt LPDWORD pcchDiskPrompt); // in/out ch _Inout_opt_ LPDWORD pcchDiskPrompt); // in/out ch
aracter count of szDiskPrompt aracter count of szDiskPrompt
UINT WINAPI MsiSourceListEnumMediaDisksW( UINT WINAPI MsiSourceListEnumMediaDisksW(
__in LPCWSTR szProductCodeOrPatchCode, // Disks will _In_ LPCWSTR szProductCodeOrPatchCode, // Disks will
be enumerated for this product or patch be enumerated for this product or patch
__in_opt LPCWSTR szUserSid, // Account of _In_opt_ LPCWSTR szUserSid, // Account of
this product/patch instance this product/patch instance
__in MSIINSTALLCONTEXT dwContext, // Context o _In_ MSIINSTALLCONTEXT dwContext, // Context o
f this product/patch instance f this product/patch instance
__in DWORD dwOptions, // Additiona _In_ DWORD dwOptions, // Additiona
l qualifiers l qualifiers
__in DWORD dwIndex, // Index val _In_ DWORD dwIndex, // Index val
ue for enumeration ue for enumeration
__out_opt LPDWORD pdwDiskId, // ID of the _Out_opt_ LPDWORD pdwDiskId, // ID of the
disk being enumerated disk being enumerated
__out_ecount_opt(*pcchVolumeLabel) LPWSTR szVolumeLabel, // Volume lab _Out_writes_opt_(*pcchVolumeLabel) LPWSTR szVolumeLabel, // Volume lab
el of the disk being enumerated el of the disk being enumerated
__inout_opt LPDWORD pcchVolumeLabel, // in/out ch _Inout_opt_ LPDWORD pcchVolumeLabel, // in/out ch
aracter count of szVolumeLabel aracter count of szVolumeLabel
__out_ecount_opt(*pcchDiskPrompt) LPWSTR szDiskPrompt, // DiskPrompt _Out_writes_opt_(*pcchDiskPrompt) LPWSTR szDiskPrompt, // DiskPrompt
of the disk being enumerated of the disk being enumerated
__inout_opt LPDWORD pcchDiskPrompt); // in/out ch _Inout_opt_ LPDWORD pcchDiskPrompt); // in/out ch
aracter count of szDiskPrompt aracter count of szDiskPrompt
#ifdef UNICODE #ifdef UNICODE
#define MsiSourceListEnumMediaDisks MsiSourceListEnumMediaDisksW #define MsiSourceListEnumMediaDisks MsiSourceListEnumMediaDisksW
#else #else
#define MsiSourceListEnumMediaDisks MsiSourceListEnumMediaDisksA #define MsiSourceListEnumMediaDisks MsiSourceListEnumMediaDisksA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 300) #endif //(_WIN32_MSI >= 300)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Utility functions // Utility functions
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Give the version string and language for a specified file // Give the version string and language for a specified file
UINT WINAPI MsiGetFileVersionA( UINT WINAPI MsiGetFileVersionA(
__in LPCSTR szFilePath, // path to _In_ LPCSTR szFilePath, // path to
the file the file
__out_ecount_opt(*pcchVersionBuf) LPSTR lpVersionBuf, // returne _Out_writes_opt_(*pcchVersionBuf) LPSTR lpVersionBuf, // returne
d version string d version string
__inout_opt LPDWORD pcchVersionBuf, // in/ou _Inout_opt_ LPDWORD pcchVersionBuf, // in/ou
t buffer byte count t buffer byte count
__out_ecount_opt(*pcchLangBuf) LPSTR lpLangBuf, // returne _Out_writes_opt_(*pcchLangBuf) LPSTR lpLangBuf, // returne
d language string d language string
__inout_opt LPDWORD pcchLangBuf); // in/ou _Inout_opt_ LPDWORD pcchLangBuf); // in/ou
t buffer byte count t buffer byte count
UINT WINAPI MsiGetFileVersionW( UINT WINAPI MsiGetFileVersionW(
__in LPCWSTR szFilePath, // path t _In_ LPCWSTR szFilePath, // path t
o the file o the file
__out_ecount_opt(*pcchVersionBuf) LPWSTR lpVersionBuf, // return _Out_writes_opt_(*pcchVersionBuf) LPWSTR lpVersionBuf, // return
ed version string ed version string
__inout_opt LPDWORD pcchVersionBuf, // in/ou _Inout_opt_ LPDWORD pcchVersionBuf, // in/ou
t buffer byte count t buffer byte count
__out_ecount_opt(*pcchLangBuf) LPWSTR lpLangBuf, // return _Out_writes_opt_(*pcchLangBuf) LPWSTR lpLangBuf, // return
ed language string ed language string
__inout_opt LPDWORD pcchLangBuf); // in/ou _Inout_opt_ LPDWORD pcchLangBuf); // in/ou
t buffer byte count t buffer byte count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetFileVersion MsiGetFileVersionW #define MsiGetFileVersion MsiGetFileVersionW
#else #else
#define MsiGetFileVersion MsiGetFileVersionA #define MsiGetFileVersion MsiGetFileVersionA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_MSI >= 150) #if (_WIN32_MSI >= 150)
UINT WINAPI MsiGetFileHashA( UINT WINAPI MsiGetFileHashA(
__in LPCSTR szFilePath, // path to the file _In_ LPCSTR szFilePath, // path to the file
__in DWORD dwOptions, // options _In_ DWORD dwOptions, // options
__inout PMSIFILEHASHINFO pHash); // returned file hash info _Inout_ PMSIFILEHASHINFO pHash); // returned file hash info
UINT WINAPI MsiGetFileHashW( UINT WINAPI MsiGetFileHashW(
__in LPCWSTR szFilePath, // path to the file _In_ LPCWSTR szFilePath, // path to the file
__in DWORD dwOptions, // options _In_ DWORD dwOptions, // options
__inout PMSIFILEHASHINFO pHash); // returned file hash info _Inout_ PMSIFILEHASHINFO pHash); // returned file hash info
#ifdef UNICODE #ifdef UNICODE
#define MsiGetFileHash MsiGetFileHashW #define MsiGetFileHash MsiGetFileHashW
#else #else
#define MsiGetFileHash MsiGetFileHashA #define MsiGetFileHash MsiGetFileHashA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 150) #endif //(_WIN32_MSI >= 150)
#if (_WIN32_MSI >= 150) #if (_WIN32_MSI >= 150)
#ifndef _MSI_NO_CRYPTO #ifndef _MSI_NO_CRYPTO
HRESULT WINAPI MsiGetFileSignatureInformationA( HRESULT WINAPI MsiGetFileSignatureInformationA(
__in LPCSTR szSignedObjectPath, // path to the signed _In_ LPCSTR szSignedObjectPath, // path to the signed
object object
__in DWORD dwFlags, // special extra er _In_ DWORD dwFlags, // special extra er
ror case flags ror case flags
__deref_out PCCERT_CONTEXT *ppcCertContext, // returned signer _Outptr_ PCCERT_CONTEXT *ppcCertContext, // returned signer cer
cert context t context
__out_bcount_opt(*pcbHashData) LPBYTE pbHashData, // returned hash bu _Out_writes_bytes_opt_(*pcbHashData) LPBYTE pbHashData, // returned h
ffer, NULL if not desired ash buffer, NULL if not desired
__inout_opt LPDWORD pcbHashData); // in/out buffer by _Inout_opt_ LPDWORD pcbHashData); // in/out buffer by
te count te count
HRESULT WINAPI MsiGetFileSignatureInformationW( HRESULT WINAPI MsiGetFileSignatureInformationW(
__in LPCWSTR szSignedObjectPath, // path to the signe _In_ LPCWSTR szSignedObjectPath, // path to the signe
d object d object
__in DWORD dwFlags, // special extra er _In_ DWORD dwFlags, // special extra er
ror case flags ror case flags
__deref_out PCCERT_CONTEXT *ppcCertContext, // returned signer _Outptr_ PCCERT_CONTEXT *ppcCertContext, // returned signer cer
cert context t context
__out_bcount_opt(*pcbHashData) LPBYTE pbHashData, // returned hash bu _Out_writes_bytes_opt_(*pcbHashData) LPBYTE pbHashData, // returned h
ffer, NULL if not desired ash buffer, NULL if not desired
__inout_opt LPDWORD pcbHashData); // in/out buffer by _Inout_opt_ LPDWORD pcbHashData); // in/out buffer by
te count te count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetFileSignatureInformation MsiGetFileSignatureInformationW #define MsiGetFileSignatureInformation MsiGetFileSignatureInformationW
#else #else
#define MsiGetFileSignatureInformation MsiGetFileSignatureInformationA #define MsiGetFileSignatureInformation MsiGetFileSignatureInformationA
#endif // !UNICODE #endif // !UNICODE
// By default, when only requesting the certificate context, an invalid hash // By default, when only requesting the certificate context, an invalid hash
// in the digital signature is not a fatal error. Set this flag in the dwFlags // in the digital signature is not a fatal error. Set this flag in the dwFlags
// parameter to make the TRUST_E_BAD_DIGEST error fatal. // parameter to make the TRUST_E_BAD_DIGEST error fatal.
#define MSI_INVALID_HASH_IS_FATAL 0x1 #define MSI_INVALID_HASH_IS_FATAL 0x1
#endif// _MSI_NO_CRYPTO #endif// _MSI_NO_CRYPTO
#endif //(_WIN32_MSI >= 150) #endif //(_WIN32_MSI >= 150)
#if (_WIN32_MSI >= 110) #if (_WIN32_MSI >= 110)
// examine a shortcut, and retrieve its descriptor information // examine a shortcut, and retrieve its descriptor information
// if available. // if available.
UINT WINAPI MsiGetShortcutTargetA( UINT WINAPI MsiGetShortcutTargetA(
__in LPCSTR szShortcutPath, // fu _In_ LPCSTR szShortcutPath, // fu
ll file path for the shortcut ll file path for the shortcut
__out_ecount_opt(MAX_GUID_CHARS+1) LPSTR szProductCode, // re _Out_writes_opt_(MAX_GUID_CHARS+1) LPSTR szProductCode, // re
turned product code - GUID turned product code - GUID
__out_ecount_opt(MAX_FEATURE_CHARS+1) LPSTR szFeatureId, // re _Out_writes_opt_(MAX_FEATURE_CHARS+1) LPSTR szFeatureId, // re
turned Feature Id. turned Feature Id.
__out_ecount_opt(MAX_GUID_CHARS+1) LPSTR szComponentCode); // re _Out_writes_opt_(MAX_GUID_CHARS+1) LPSTR szComponentCode); // re
turned component code - GUID turned component code - GUID
UINT WINAPI MsiGetShortcutTargetW( UINT WINAPI MsiGetShortcutTargetW(
__in LPCWSTR szShortcutPath, // f _In_ LPCWSTR szShortcutPath, // f
ull file path for the shortcut ull file path for the shortcut
__out_ecount_opt(MAX_GUID_CHARS+1) LPWSTR szProductCode, // r _Out_writes_opt_(MAX_GUID_CHARS+1) LPWSTR szProductCode, // r
eturned product code - GUID eturned product code - GUID
__out_ecount_opt(MAX_FEATURE_CHARS+1) LPWSTR szFeatureId, // r _Out_writes_opt_(MAX_FEATURE_CHARS+1) LPWSTR szFeatureId, // r
eturned Feature Id. eturned Feature Id.
__out_ecount_opt(MAX_GUID_CHARS+1) LPWSTR szComponentCode); // r _Out_writes_opt_(MAX_GUID_CHARS+1) LPWSTR szComponentCode); // r
eturned component code - GUID eturned component code - GUID
#ifdef UNICODE #ifdef UNICODE
#define MsiGetShortcutTarget MsiGetShortcutTargetW #define MsiGetShortcutTarget MsiGetShortcutTargetW
#else #else
#define MsiGetShortcutTarget MsiGetShortcutTargetA #define MsiGetShortcutTarget MsiGetShortcutTargetA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 110) #endif //(_WIN32_MSI >= 110)
#if (_WIN32_MSI >= 110) #if (_WIN32_MSI >= 110)
// checks to see if a product is managed // checks to see if a product is managed
// checks per-machine if called from system context, per-user if from // checks per-machine if called from system context, per-user if from
// user context // user context
UINT WINAPI MsiIsProductElevatedA( UINT WINAPI MsiIsProductElevatedA(
__in LPCSTR szProduct, // product code _In_ LPCSTR szProduct, // product code
__out BOOL *pfElevated); // result _Out_ BOOL *pfElevated); // result
// checks to see if a product is managed // checks to see if a product is managed
// checks per-machine if called from system context, per-user if from // checks per-machine if called from system context, per-user if from
// user context // user context
UINT WINAPI MsiIsProductElevatedW( UINT WINAPI MsiIsProductElevatedW(
__in LPCWSTR szProduct, // product code _In_ LPCWSTR szProduct, // product code
__out BOOL *pfElevated); // result _Out_ BOOL *pfElevated); // result
#ifdef UNICODE #ifdef UNICODE
#define MsiIsProductElevated MsiIsProductElevatedW #define MsiIsProductElevated MsiIsProductElevatedW
#else #else
#define MsiIsProductElevated MsiIsProductElevatedA #define MsiIsProductElevated MsiIsProductElevatedA
#endif // !UNICODE #endif // !UNICODE
#endif //(_WIN32_MSI >= 110) #endif //(_WIN32_MSI >= 110)
#if (_WIN32_MSI >= 310) #if (_WIN32_MSI >= 310)
// Caller notifies us of a user who's been moved and results in a sid change. // Caller notifies us of a user who's been moved and results in a sid change.
UINT WINAPI MsiNotifySidChangeA(__in LPCSTR pOldSid, UINT WINAPI MsiNotifySidChangeA(_In_ LPCSTR pOldSid,
__in LPCSTR pNewSid); _In_ LPCSTR pNewSid);
UINT WINAPI MsiNotifySidChangeW(__in LPCWSTR pOldSid, UINT WINAPI MsiNotifySidChangeW(_In_ LPCWSTR pOldSid,
__in LPCWSTR pNewSid); _In_ LPCWSTR pNewSid);
#ifdef UNICODE #ifdef UNICODE
#define MsiNotifySidChange MsiNotifySidChangeW #define MsiNotifySidChange MsiNotifySidChangeW
#else #else
#define MsiNotifySidChange MsiNotifySidChangeA #define MsiNotifySidChange MsiNotifySidChangeA
#endif // !UNICODE #endif // !UNICODE
#else // _WIN32_MSI < 310 #else // _WIN32_MSI < 310
#endif // (_WIN32_MSI >= 310) #endif // (_WIN32_MSI >= 310)
#if (_WIN32_MSI >= 450) #if (_WIN32_MSI >= 450)
// Start a multi package transaction // Start a multi package transaction
UINT WINAPI MsiBeginTransactionA( UINT WINAPI MsiBeginTransactionA(
__in LPCSTR szName, // A name to identify the tra _In_ LPCSTR szName, // A name to identify the tra
nsaction nsaction
__in DWORD dwTransactionAttributes, // Attributes to control th _In_ DWORD dwTransactionAttributes, // Attributes to control th
e nature of the transaction e nature of the transaction
__out MSIHANDLE* phTransactionHandle, // Transaction handle _Out_ MSIHANDLE* phTransactionHandle, // Transaction handle
__out HANDLE* phChangeOfOwnerEvent); // Change Of Owner Event ha _Out_ HANDLE* phChangeOfOwnerEvent); // Change Of Owner Event ha
ndle ndle
// Start a multi package transaction // Start a multi package transaction
UINT WINAPI MsiBeginTransactionW( UINT WINAPI MsiBeginTransactionW(
__in LPCWSTR szName, // A name to identify the tr _In_ LPCWSTR szName, // A name to identify the tr
ansaction ansaction
__in DWORD dwTransactionAttributes, // Attributes to control th _In_ DWORD dwTransactionAttributes, // Attributes to control th
e nature of the transaction e nature of the transaction
__out MSIHANDLE* phTransactionHandle, // Transaction handle _Out_ MSIHANDLE* phTransactionHandle, // Transaction handle
__out HANDLE* phChangeOfOwnerEvent); // Change Of Owner Event ha _Out_ HANDLE* phChangeOfOwnerEvent); // Change Of Owner Event ha
ndle ndle
#ifdef UNICODE #ifdef UNICODE
#define MsiBeginTransaction MsiBeginTransactionW #define MsiBeginTransaction MsiBeginTransactionW
#else #else
#define MsiBeginTransaction MsiBeginTransactionA #define MsiBeginTransaction MsiBeginTransactionA
#endif // !UNICODE #endif // !UNICODE
// End a multi package transaction // End a multi package transaction
UINT WINAPI MsiEndTransaction( UINT WINAPI MsiEndTransaction(
__in DWORD dwTransactionState); // Flags to indicate how to end a tr ansaction _In_ DWORD dwTransactionState); // Flags to indicate how to end a tr ansaction
// Join an already created multi package transaction // Join an already created multi package transaction
UINT WINAPI MsiJoinTransaction( UINT WINAPI MsiJoinTransaction(
__in MSIHANDLE hTransactionHandle, //Transaction handle returned by Msi _In_ MSIHANDLE hTransactionHandle, //Transaction handle returned by Msi
BeginTransaction BeginTransaction
__in DWORD dwTransactionAttributes, //Transaction attributes _In_ DWORD dwTransactionAttributes, //Transaction attributes
__out HANDLE* phChangeOfOwnerEvent); //Change Of Owner Event handle _Out_ HANDLE* phChangeOfOwnerEvent); //Change Of Owner Event handle
#endif // #if (_WIN32_MSI >= 450) #endif // #if (_WIN32_MSI >= 450)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Error codes for installer access functions // Error codes for installer access functions
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
skipping to change at line 2398 skipping to change at line 2410
// LOCALIZE END // LOCALIZE END
// The following error codes are returned from MSI 4.5 and later // The following error codes are returned from MSI 4.5 and later
// LOCALIZE BEGIN: // LOCALIZE BEGIN:
#ifndef ERROR_ROLLBACK_DISABLED #ifndef ERROR_ROLLBACK_DISABLED
#define ERROR_ROLLBACK_DISABLED 1653L // Multi-package transaction cannot be run when rollback is disabled. #define ERROR_ROLLBACK_DISABLED 1653L // Multi-package transaction cannot be run when rollback is disabled.
#endif #endif
// LOCALIZE END // LOCALIZE END
// The following error codes are returned from MSI 5.0 and later
// LOCALIZE BEGIN:
#ifndef ERROR_INSTALL_REJECTED
#define ERROR_INSTALL_REJECTED 1654L // The app that you are trying to run
is not supported on this version of Windows
#endif
// LOCALIZE END
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // _MSI_H_ #endif // _MSI_H_
 End of changes. 169 change blocks. 
1203 lines changed or deleted 1227 lines changed or added


 msiquery.h (5.0.7601.18896-Windows_7.0)   msiquery.h (5.0.9600.17415-Windows_8.1) 
skipping to change at line 22 skipping to change at line 22
* which is then accessible with MsiGetLastErrorRecord. However, * * which is then accessible with MsiGetLastErrorRecord. However, *
* the following argument errors do not register an error record: * * the following argument errors do not register an error record: *
* ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, ERROR_MORE_DATA. * * ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, ERROR_MORE_DATA. *
* * * *
* Copyright (c) Microsoft Corporation. All rights reserved. * * Copyright (c) Microsoft Corporation. All rights reserved. *
* * * *
\*****************************************************************************/ \*****************************************************************************/
#ifndef _MSIQUERY_H_ #ifndef _MSIQUERY_H_
#define _MSIQUERY_H_ #define _MSIQUERY_H_
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#include "msi.h" // INSTALLSTATE #include "msi.h" // INSTALLSTATE
#define MSI_NULL_INTEGER 0x80000000 // integer value reserved for null #define MSI_NULL_INTEGER 0x80000000 // integer value reserved for null
// MsiOpenDatabase persist predefine values, otherwise output database path is u sed // MsiOpenDatabase persist predefine values, otherwise output database path is u sed
#define MSIDBOPEN_READONLY (LPCTSTR)0 // database open read-only, no persis tent changes #define MSIDBOPEN_READONLY (LPCTSTR)0 // database open read-only, no persis tent changes
#define MSIDBOPEN_TRANSACT (LPCTSTR)1 // database read/write in transaction mode #define MSIDBOPEN_TRANSACT (LPCTSTR)1 // database read/write in transaction mode
#define MSIDBOPEN_DIRECT (LPCTSTR)2 // database direct read/write without transaction #define MSIDBOPEN_DIRECT (LPCTSTR)2 // database direct read/write without transaction
#define MSIDBOPEN_CREATE (LPCTSTR)3 // create new database, transact mode read/write #define MSIDBOPEN_CREATE (LPCTSTR)3 // create new database, transact mode read/write
#define MSIDBOPEN_CREATEDIRECT (LPCTSTR)4 // create new database, direct mode r ead/write #define MSIDBOPEN_CREATEDIRECT (LPCTSTR)4 // create new database, direct mode r ead/write
skipping to change at line 208 skipping to change at line 213
#define MsiDatabaseOpenView MsiDatabaseOpenViewW #define MsiDatabaseOpenView MsiDatabaseOpenViewW
#else #else
#define MsiDatabaseOpenView MsiDatabaseOpenViewA #define MsiDatabaseOpenView MsiDatabaseOpenViewA
#endif // !UNICODE #endif // !UNICODE
// Returns the MSIDBERROR enum and name of the column corresponding to the error // Returns the MSIDBERROR enum and name of the column corresponding to the error
// Similar to a GetLastError function, but for the view. NOT the same as MsiGetL astErrorRecord // Similar to a GetLastError function, but for the view. NOT the same as MsiGetL astErrorRecord
// Returns errors of MsiViewModify. // Returns errors of MsiViewModify.
MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE hView, MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE hView,
__out_ecount_opt(*pcchBuf) LPSTR szColumnNameBuffer, // buffer to hold _Out_writes_opt_(*pcchBuf) LPSTR szColumnNameBuffer, // buffer to hold
column name column name
__inout_opt LPDWORD pcchBuf); // size of buff _Inout_opt_ LPDWORD pcchBuf); // size of buff
er er
MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE hView, MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE hView,
__out_ecount_opt(*pcchBuf) LPWSTR szColumnNameBuffer, // buffer to hol _Out_writes_opt_(*pcchBuf) LPWSTR szColumnNameBuffer, // buffer to hol
d column name d column name
__inout_opt LPDWORD pcchBuf); // size of buff _Inout_opt_ LPDWORD pcchBuf); // size of buff
er er
#ifdef UNICODE #ifdef UNICODE
#define MsiViewGetError MsiViewGetErrorW #define MsiViewGetError MsiViewGetErrorW
#else #else
#define MsiViewGetError MsiViewGetErrorA #define MsiViewGetError MsiViewGetErrorA
#endif // !UNICODE #endif // !UNICODE
// Exectute the view query, supplying parameters as required // Exectute the view query, supplying parameters as required
// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERRO R_GEN_FAILURE // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERRO R_GEN_FAILURE
// Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord // Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord
skipping to change at line 343 skipping to change at line 348
#define MsiSummaryInfoSetProperty MsiSummaryInfoSetPropertyW #define MsiSummaryInfoSetProperty MsiSummaryInfoSetPropertyW
#else #else
#define MsiSummaryInfoSetProperty MsiSummaryInfoSetPropertyA #define MsiSummaryInfoSetProperty MsiSummaryInfoSetPropertyA
#endif // !UNICODE #endif // !UNICODE
// Get a single property from the summary information // Get a single property from the summary information
// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY // Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE hSummaryInfo, UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE hSummaryInfo,
UINT uiProperty, // property ID, one of allowed values for summar y information UINT uiProperty, // property ID, one of allowed values for summar y information
__out PUINT puiDataType, // returned type: VT_I4, VT_LPSTR, VT_FILE _Out_ PUINT puiDataType, // returned type: VT_I4, VT_LPSTR, VT_FILE
TIME, VT_EMPTY TIME, VT_EMPTY
__out LPINT piValue, // returned integer property data _Out_ LPINT piValue, // returned integer property data
__out_opt FILETIME *pftValue, // returned da _Out_opt_ FILETIME *pftValue, // returned da
tetime property data tetime property data
__out_ecount_opt(*pcchValueBuf) LPSTR szValueBuf, // buffer to ret _Out_writes_opt_(*pcchValueBuf) LPSTR szValueBuf, // buffer to ret
urn string property data urn string property data
__inout_opt LPDWORD pcchValueBuf); // in/out buff _Inout_opt_ LPDWORD pcchValueBuf); // in/out buff
er character count er character count
UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE hSummaryInfo, UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE hSummaryInfo,
UINT uiProperty, // property ID, one of allowed values for summar y information UINT uiProperty, // property ID, one of allowed values for summar y information
__out PUINT puiDataType, // returned type: VT_I4, VT_LPSTR, VT_FILE _Out_ PUINT puiDataType, // returned type: VT_I4, VT_LPSTR, VT_FILE
TIME, VT_EMPTY TIME, VT_EMPTY
__out LPINT piValue, // returned integer property data _Out_ LPINT piValue, // returned integer property data
__out_opt FILETIME *pftValue, // returned da _Out_opt_ FILETIME *pftValue, // returned da
tetime property data tetime property data
__out_ecount_opt(*pcchValueBuf) LPWSTR szValueBuf, // buffer to re _Out_writes_opt_(*pcchValueBuf) LPWSTR szValueBuf, // buffer to re
turn string property data turn string property data
__inout_opt LPDWORD pcchValueBuf); // in/out buff _Inout_opt_ LPDWORD pcchValueBuf); // in/out buff
er character count er character count
#ifdef UNICODE #ifdef UNICODE
#define MsiSummaryInfoGetProperty MsiSummaryInfoGetPropertyW #define MsiSummaryInfoGetProperty MsiSummaryInfoGetPropertyW
#else #else
#define MsiSummaryInfoGetProperty MsiSummaryInfoGetPropertyA #define MsiSummaryInfoGetProperty MsiSummaryInfoGetPropertyA
#endif // !UNICODE #endif // !UNICODE
// Write back changed information to summary information stream // Write back changed information to summary information stream
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE hSummaryInfo); UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE hSummaryInfo);
skipping to change at line 563 skipping to change at line 568
// Return the string value of a record field // Return the string value of a record field
// Integer fields will be converted to a string // Integer fields will be converted to a string
// Null and non-existent fields will report a value of 0 // Null and non-existent fields will report a value of 0
// Fields containing stream data will return ERROR_INVALID_DATATYPE // Fields containing stream data will return ERROR_INVALID_DATATYPE
// Returns ERROR_SUCCESS, ERROR_MORE_DATA, // Returns ERROR_SUCCESS, ERROR_MORE_DATA,
// ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD, ERROR_BAD_ARGUMENTS // ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD, ERROR_BAD_ARGUMENTS
UINT WINAPI MsiRecordGetStringA(MSIHANDLE hRecord, UINT WINAPI MsiRecordGetStringA(MSIHANDLE hRecord,
UINT iField, UINT iField,
__out_ecount_opt(*pcchValueBuf) LPSTR szValueBuf, // buffer for ret _Out_writes_opt_(*pcchValueBuf) LPSTR szValueBuf, // buffer for ret
urned value urned value
__inout_opt LPDWORD pcchValueBuf); // in/out buffe _Inout_opt_ LPDWORD pcchValueBuf); // in/out buffe
r character count r character count
UINT WINAPI MsiRecordGetStringW(MSIHANDLE hRecord, UINT WINAPI MsiRecordGetStringW(MSIHANDLE hRecord,
UINT iField, UINT iField,
__out_ecount_opt(*pcchValueBuf) LPWSTR szValueBuf, // buffer for re _Out_writes_opt_(*pcchValueBuf) LPWSTR szValueBuf, // buffer for re
turned value turned value
__inout_opt LPDWORD pcchValueBuf); // in/out buffe _Inout_opt_ LPDWORD pcchValueBuf); // in/out buffe
r character count r character count
#ifdef UNICODE #ifdef UNICODE
#define MsiRecordGetString MsiRecordGetStringW #define MsiRecordGetString MsiRecordGetStringW
#else #else
#define MsiRecordGetString MsiRecordGetStringA #define MsiRecordGetString MsiRecordGetStringA
#endif // !UNICODE #endif // !UNICODE
// Returns the number of fields allocated in the record // Returns the number of fields allocated in the record
// Does not count field 0, used for formatting and op codes // Does not count field 0, used for formatting and op codes
UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE hRecord); UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE hRecord);
skipping to change at line 604 skipping to change at line 609
#define MsiRecordSetStream MsiRecordSetStreamA #define MsiRecordSetStream MsiRecordSetStreamA
#endif // !UNICODE #endif // !UNICODE
// Read bytes from a record stream field into a buffer // Read bytes from a record stream field into a buffer
// Must set the in/out argument to the requested byte count to read // Must set the in/out argument to the requested byte count to read
// The number of bytes transferred is returned through the argument // The number of bytes transferred is returned through the argument
// If no more bytes are available, ERROR_SUCCESS is still returned // If no more bytes are available, ERROR_SUCCESS is still returned
UINT WINAPI MsiRecordReadStream(MSIHANDLE hRecord, UINT WINAPI MsiRecordReadStream(MSIHANDLE hRecord,
UINT iField, UINT iField,
__out_bcount_opt(*pcbDataBuf) char *szDataBuf, // buffer to receive _Out_writes_bytes_opt_(*pcbDataBuf) char *szDataBuf, // buffer to r
bytes from stream eceive bytes from stream
__inout LPDWORD pcbDataBuf); // in/out buffer byt _Inout_ LPDWORD pcbDataBuf); // in/out buffer byt
e count e count
// Clears all data fields in a record to NULL // Clears all data fields in a record to NULL
UINT WINAPI MsiRecordClearData(MSIHANDLE hRecord); UINT WINAPI MsiRecordClearData(MSIHANDLE hRecord);
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Functions to access a running installation, called from custom actions // Functions to access a running installation, called from custom actions
// The install handle is the single argument passed to custom actions // The install handle is the single argument passed to custom actions
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
skipping to change at line 643 skipping to change at line 648
#else #else
#define MsiSetProperty MsiSetPropertyA #define MsiSetProperty MsiSetPropertyA
#endif // !UNICODE #endif // !UNICODE
// Get the value for an installer property // Get the value for an installer property
// If the property is not defined, it is equivalent to a 0-length value, not err or // If the property is not defined, it is equivalent to a 0-length value, not err or
// Returns ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUM ENTS // Returns ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUM ENTS
UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall, UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall,
LPCSTR szName, // property ide ntifier, case-sensitive LPCSTR szName, // property ide ntifier, case-sensitive
__out_ecount_opt(*pcchValueBuf) LPSTR szValueBuf, // buffer for r _Out_writes_opt_(*pcchValueBuf) LPSTR szValueBuf, // buffer for r
eturned property value eturned property value
__inout_opt LPDWORD pcchValueBuf); // in/out buf _Inout_opt_ LPDWORD pcchValueBuf); // in/out buf
fer character count fer character count
UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall, UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall,
LPCWSTR szName, // property id entifier, case-sensitive LPCWSTR szName, // property id entifier, case-sensitive
__out_ecount_opt(*pcchValueBuf) LPWSTR szValueBuf, // buffer for _Out_writes_opt_(*pcchValueBuf) LPWSTR szValueBuf, // buffer for
returned property value returned property value
__inout_opt LPDWORD pcchValueBuf); // in/out buf _Inout_opt_ LPDWORD pcchValueBuf); // in/out buf
fer character count fer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetProperty MsiGetPropertyW #define MsiGetProperty MsiGetPropertyW
#else #else
#define MsiGetProperty MsiGetPropertyA #define MsiGetProperty MsiGetPropertyA
#endif // !UNICODE #endif // !UNICODE
// Return the numeric language for the currently running install // Return the numeric language for the currently running install
// Returns 0 if an install not running // Returns 0 if an install not running
LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall); LANGID WINAPI MsiGetLanguage(MSIHANDLE hInstall);
skipping to change at line 681 skipping to change at line 686
UINT WINAPI MsiSetMode(MSIHANDLE hInstall, UINT WINAPI MsiSetMode(MSIHANDLE hInstall,
MSIRUNMODE eRunMode, // particular mode for which state is to be set MSIRUNMODE eRunMode, // particular mode for which state is to be set
BOOL fState); // new state for bit flag BOOL fState); // new state for bit flag
// Format record data using a format string containing field markers and/or prop erties // Format record data using a format string containing field markers and/or prop erties
// Record field 0 must contain the format string // Record field 0 must contain the format string
// Other fields must contain data that may be referenced by the format string. // Other fields must contain data that may be referenced by the format string.
UINT WINAPI MsiFormatRecordA(MSIHANDLE hInstall, // non-zero for property expans ion UINT WINAPI MsiFormatRecordA(MSIHANDLE hInstall, // non-zero for property expans ion
MSIHANDLE hRecord, // handle to record, field 0 contains format string MSIHANDLE hRecord, // handle to record, field 0 contains format string
__out_ecount_opt(*pcchResultBuf) LPSTR szResultBuf, // buffer to r _Out_writes_opt_(*pcchResultBuf) LPSTR szResultBuf, // buffer to r
eturn formatted string eturn formatted string
__inout_opt LPDWORD pcchResultBuf); // in/out bu _Inout_opt_ LPDWORD pcchResultBuf); // in/out bu
ffer character count ffer character count
UINT WINAPI MsiFormatRecordW(MSIHANDLE hInstall, // non-zero for property expans ion UINT WINAPI MsiFormatRecordW(MSIHANDLE hInstall, // non-zero for property expans ion
MSIHANDLE hRecord, // handle to record, field 0 contains format string MSIHANDLE hRecord, // handle to record, field 0 contains format string
__out_ecount_opt(*pcchResultBuf) LPWSTR szResultBuf, // buffer to _Out_writes_opt_(*pcchResultBuf) LPWSTR szResultBuf, // buffer to
return formatted string return formatted string
__inout_opt LPDWORD pcchResultBuf); // in/out bu _Inout_opt_ LPDWORD pcchResultBuf); // in/out bu
ffer character count ffer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiFormatRecord MsiFormatRecordW #define MsiFormatRecord MsiFormatRecordW
#else #else
#define MsiFormatRecord MsiFormatRecordA #define MsiFormatRecord MsiFormatRecordA
#endif // !UNICODE #endif // !UNICODE
// Execute another action, either built-in, custom, or UI wizard // Execute another action, either built-in, custom, or UI wizard
// Returns ERROR_FUNCTION_NOT_CALLED if action not found // Returns ERROR_FUNCTION_NOT_CALLED if action not found
// Returns ERROR_SUCCESS if action completed succesfully // Returns ERROR_SUCCESS if action completed succesfully
// Returns ERROR_INSTALL_USEREXIT if user cancelled during action // Returns ERROR_INSTALL_USEREXIT if user cancelled during action
skipping to change at line 877 skipping to change at line 882
// //
// Can specify either current feature state or proposed state. // Can specify either current feature state or proposed state.
// //
// Execution of this function sets the error record, accessible // Execution of this function sets the error record, accessible
// via MsiGetLastErrorRecord. // via MsiGetLastErrorRecord.
UINT WINAPI MsiEnumComponentCostsA(MSIHANDLE hInstall, UINT WINAPI MsiEnumComponentCostsA(MSIHANDLE hInstall,
LPCSTR szComponent, // name of component LPCSTR szComponent, // name of component
DWORD dwIndex, // 0-based index into the list of drives DWORD dwIndex, // 0-based index into the list of drives
INSTALLSTATE iState, // requested state, or INSTALLSTATE_UNKNOWN INSTALLSTATE iState, // requested state, or INSTALLSTATE_UNKNOWN
__out_ecount(*pcchDriveBuf) LPSTR szDriveBuf, // buffer for re _Out_writes_(*pcchDriveBuf) LPSTR szDriveBuf, // buffer for re
turned value turned value
__inout LPDWORD pcchDriveBuf, // in/out buff _Inout_ LPDWORD pcchDriveBuf, // in/out buff
er character count er character count
__out LPINT piCost, // returned co _Out_ LPINT piCost, // returned co
st, in units of 512 bytes st, in units of 512 bytes
__out LPINT piTempCost); // returned te _Out_ LPINT piTempCost); // returned te
mporary cost, in units of 512 bytes mporary cost, in units of 512 bytes
UINT WINAPI MsiEnumComponentCostsW(MSIHANDLE hInstall, UINT WINAPI MsiEnumComponentCostsW(MSIHANDLE hInstall,
LPCWSTR szComponent, // name of component LPCWSTR szComponent, // name of component
DWORD dwIndex, // 0-based index into the list of drives DWORD dwIndex, // 0-based index into the list of drives
INSTALLSTATE iState, // requested state, or INSTALLSTATE_UNKNOWN INSTALLSTATE iState, // requested state, or INSTALLSTATE_UNKNOWN
__out_ecount(*pcchDriveBuf) LPWSTR szDriveBuf, // buffer for r _Out_writes_(*pcchDriveBuf) LPWSTR szDriveBuf, // buffer for r
eturned value eturned value
__inout LPDWORD pcchDriveBuf, // in/out buff _Inout_ LPDWORD pcchDriveBuf, // in/out buff
er character count er character count
__out LPINT piCost, // returned co _Out_ LPINT piCost, // returned co
st, in units of 512 bytes st, in units of 512 bytes
__out LPINT piTempCost); // returned te _Out_ LPINT piTempCost); // returned te
mporary cost, in units of 512 bytes mporary cost, in units of 512 bytes
#ifdef UNICODE #ifdef UNICODE
#define MsiEnumComponentCosts MsiEnumComponentCostsW #define MsiEnumComponentCosts MsiEnumComponentCostsW
#else #else
#define MsiEnumComponentCosts MsiEnumComponentCostsA #define MsiEnumComponentCosts MsiEnumComponentCostsA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_MSI >= 150) #endif // (_WIN32_MSI >= 150)
// Set the install level for a full product installation (not a feature request) // Set the install level for a full product installation (not a feature request)
// Setting the value to 0 initialized components and features to the default lev el // Setting the value to 0 initialized components and features to the default lev el
skipping to change at line 925 skipping to change at line 930
#define MsiGetFeatureValidStates MsiGetFeatureValidStatesW #define MsiGetFeatureValidStates MsiGetFeatureValidStatesW
#else #else
#define MsiGetFeatureValidStates MsiGetFeatureValidStatesA #define MsiGetFeatureValidStates MsiGetFeatureValidStatesA
#endif // !UNICODE #endif // !UNICODE
// Return the full source path for a folder in the Directory table // Return the full source path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord // Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord
UINT WINAPI MsiGetSourcePathA(MSIHANDLE hInstall, UINT WINAPI MsiGetSourcePathA(MSIHANDLE hInstall,
LPCSTR szFolder, // folder ident ifier, primary key into Directory table LPCSTR szFolder, // folder ident ifier, primary key into Directory table
__out_ecount_opt(*pcchPathBuf) LPSTR szPathBuf, // buffer to re _Out_writes_opt_(*pcchPathBuf) LPSTR szPathBuf, // buffer to re
turn full path turn full path
__inout_opt LPDWORD pcchPathBuf); // in/out buf _Inout_opt_ LPDWORD pcchPathBuf); // in/out buf
fer character count fer character count
UINT WINAPI MsiGetSourcePathW(MSIHANDLE hInstall, UINT WINAPI MsiGetSourcePathW(MSIHANDLE hInstall,
LPCWSTR szFolder, // folder iden tifier, primary key into Directory table LPCWSTR szFolder, // folder iden tifier, primary key into Directory table
__out_ecount_opt(*pcchPathBuf) LPWSTR szPathBuf, // buffer to r _Out_writes_opt_(*pcchPathBuf) LPWSTR szPathBuf, // buffer to r
eturn full path eturn full path
__inout_opt LPDWORD pcchPathBuf); // in/out buf _Inout_opt_ LPDWORD pcchPathBuf); // in/out buf
fer character count fer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetSourcePath MsiGetSourcePathW #define MsiGetSourcePath MsiGetSourcePathW
#else #else
#define MsiGetSourcePath MsiGetSourcePathA #define MsiGetSourcePath MsiGetSourcePathA
#endif // !UNICODE #endif // !UNICODE
// Return the full target path for a folder in the Directory table // Return the full target path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord // Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord
UINT WINAPI MsiGetTargetPathA(MSIHANDLE hInstall, UINT WINAPI MsiGetTargetPathA(MSIHANDLE hInstall,
LPCSTR szFolder, // folder ident ifier, primary key into Directory table LPCSTR szFolder, // folder ident ifier, primary key into Directory table
__out_ecount_opt(*pcchPathBuf) LPSTR szPathBuf, // buffer to re _Out_writes_opt_(*pcchPathBuf) LPSTR szPathBuf, // buffer to re
turn full path turn full path
__inout_opt LPDWORD pcchPathBuf); // in/out buf _Inout_opt_ LPDWORD pcchPathBuf); // in/out buf
fer character count fer character count
UINT WINAPI MsiGetTargetPathW(MSIHANDLE hInstall, UINT WINAPI MsiGetTargetPathW(MSIHANDLE hInstall,
LPCWSTR szFolder, // folder iden tifier, primary key into Directory table LPCWSTR szFolder, // folder iden tifier, primary key into Directory table
__out_ecount_opt(*pcchPathBuf) LPWSTR szPathBuf, // buffer to r _Out_writes_opt_(*pcchPathBuf) LPWSTR szPathBuf, // buffer to r
eturn full path eturn full path
__inout_opt LPDWORD pcchPathBuf); // in/out buf _Inout_opt_ LPDWORD pcchPathBuf); // in/out buf
fer character count fer character count
#ifdef UNICODE #ifdef UNICODE
#define MsiGetTargetPath MsiGetTargetPathW #define MsiGetTargetPath MsiGetTargetPathW
#else #else
#define MsiGetTargetPath MsiGetTargetPathA #define MsiGetTargetPath MsiGetTargetPathA
#endif // !UNICODE #endif // !UNICODE
// Set the full target path for a folder in the Directory table // Set the full target path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord // Execution of this function sets the error record, accessible via MsiGetLastEr rorRecord
UINT WINAPI MsiSetTargetPathA(MSIHANDLE hInstall, UINT WINAPI MsiSetTargetPathA(MSIHANDLE hInstall,
skipping to change at line 1029 skipping to change at line 1034
// Field 1 of the record will contain the internal MSI error code // Field 1 of the record will contain the internal MSI error code
// Other fields will contain data specific to the particular error // Other fields will contain data specific to the particular error
// The error record is released internally after this function is executed // The error record is released internally after this function is executed
MSIHANDLE WINAPI MsiGetLastErrorRecord(); // returns 0 if no cached record MSIHANDLE WINAPI MsiGetLastErrorRecord(); // returns 0 if no cached record
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // _MSIQUERY_H_ #endif // _MSIQUERY_H_
 End of changes. 19 change blocks. 
86 lines changed or deleted 94 lines changed or added

This html diff was produced by rfcdiff 1.41.