ReactOS 0.4.15-dev-7131-ge4d03f4
msipriv.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "fdi.h"
#include "msi.h"
#include "msiquery.h"
#include "msidefs.h"
#include "objbase.h"
#include "objidl.h"
#include "fusion.h"
#include "winnls.h"
#include "winver.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "msiserver.h"
#include "winemsi_s.h"
Include dependency graph for msipriv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagMSIOBJECTHDR
 
struct  tagMSISTREAM
 
struct  tagMSITRANSFORM
 
struct  tagMSIDATABASE
 
struct  tagMSIQUERY
 
struct  tagMSIFIELD
 
struct  tagMSIRECORD
 
struct  tagMSISOURCELISTINFO
 
struct  tagMSIMEDIADISK
 
struct  tagMSIMEDIAINFO
 
struct  tagMSICABINETSTREAM
 
struct  tagMSIPATCHINFO
 
struct  tagMSIBINARY
 
struct  _column_info
 
struct  tagMSIVIEWOPS
 
struct  tagMSIVIEW
 
struct  tagMSIPACKAGE
 
struct  tagMSIPREVIEW
 
struct  tagMSISUMMARYINFO
 
struct  tagMSIFEATURE
 
struct  tagMSIASSEMBLY
 
struct  tagMSICOMPONENT
 
struct  tagComponentList
 
struct  tagFeatureList
 
struct  tagMSIFOLDER
 
struct  tagFolderList
 
struct  tagMSIFILE
 
struct  tagMSIFILEPATCH
 
struct  tagMSIAPPID
 
struct  tagMSICLASS
 
struct  tagMSIEXTENSION
 
struct  tagMSIPROGID
 
struct  tagMSIVERB
 
struct  tagMSIMIME
 
struct  awstring
 
struct  awcstring
 
struct  MSICABDATA
 

Macros

#define MSI_DATASIZEMASK   0x00ff
 
#define MSITYPE_VALID   0x0100
 
#define MSITYPE_LOCALIZABLE   0x200
 
#define MSITYPE_STRING   0x0800
 
#define MSITYPE_NULLABLE   0x1000
 
#define MSITYPE_KEY   0x2000
 
#define MSITYPE_TEMPORARY   0x4000
 
#define MSITYPE_UNKNOWN   0x8000
 
#define MAX_STREAM_NAME_LEN   62
 
#define LONG_STR_BYTES   3
 
#define INSTALLUILEVEL_MASK   0x0007
 
#define MSITYPE_IS_BINARY(type)   (((type) & ~MSITYPE_NULLABLE) == (MSITYPE_STRING|MSITYPE_VALID))
 
#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET   10000
 
#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID   32000
 
#define MSI_OPEN_READONLY   0
 
#define MSI_OPEN_TRANSACT   1
 
#define MSI_OPEN_DIRECT   2
 
#define MSI_OPEN_CREATE   3
 
#define MSI_OPEN_CREATEDIRECT   4
 
#define MSI_OPEN_PATCHFILE   32
 
#define MSI_MAX_PROPS   20
 
#define SEQUENCE_UI   0x1
 
#define SEQUENCE_EXEC   0x2
 
#define MSIHANDLETYPE_ANY   0
 
#define MSIHANDLETYPE_DATABASE   1
 
#define MSIHANDLETYPE_SUMMARYINFO   2
 
#define MSIHANDLETYPE_VIEW   3
 
#define MSIHANDLETYPE_RECORD   4
 
#define MSIHANDLETYPE_PACKAGE   5
 
#define MSIHANDLETYPE_PREVIEW   6
 
#define MSI_MAJORVERSION   4
 
#define MSI_MINORVERSION   5
 
#define MSI_BUILDNUMBER   6001
 
#define GUID_SIZE   39
 
#define SQUASHED_GUID_SIZE   33
 
#define MSIHANDLE_MAGIC   0x4d434923
 
#define WINE_OPENPACKAGEFLAGS_RECACHE   0x80000000
 
#define MSICABEXTRACT_BEGINEXTRACT   0x01
 
#define MSICABEXTRACT_FILEEXTRACTED   0x02
 

Typedefs

typedef struct tagMSITABLE MSITABLE
 
typedef struct string_table string_table
 
typedef struct tagMSIOBJECTHDR MSIOBJECTHDR
 
typedef VOID(* msihandledestructor) (MSIOBJECTHDR *)
 
typedef struct tagMSISTREAM MSISTREAM
 
typedef struct tagMSITRANSFORM MSITRANSFORM
 
typedef struct tagMSIDATABASE MSIDATABASE
 
typedef struct tagMSIVIEW MSIVIEW
 
typedef struct tagMSIQUERY MSIQUERY
 
typedef struct tagMSIFIELD MSIFIELD
 
typedef struct tagMSIRECORD MSIRECORD
 
typedef struct tagMSISOURCELISTINFO MSISOURCELISTINFO
 
typedef struct tagMSIMEDIADISK MSIMEDIADISK
 
typedef struct tagMSIMEDIAINFO MSIMEDIAINFO
 
typedef struct tagMSICABINETSTREAM MSICABINETSTREAM
 
typedef struct tagMSIPATCHINFO MSIPATCHINFO
 
typedef struct tagMSIBINARY MSIBINARY
 
typedef struct _column_info column_info
 
typedef const struct tagMSICOLUMNHASHENTRYMSIITERHANDLE
 
typedef struct tagMSIVIEWOPS MSIVIEWOPS
 
typedef struct msi_dialog_tag msi_dialog
 
typedef struct tagMSIPACKAGE MSIPACKAGE
 
typedef struct tagMSIPREVIEW MSIPREVIEW
 
typedef struct tagMSISUMMARYINFO MSISUMMARYINFO
 
typedef struct tagMSIFEATURE MSIFEATURE
 
typedef struct tagMSIASSEMBLY MSIASSEMBLY
 
typedef struct tagMSICOMPONENT MSICOMPONENT
 
typedef struct tagComponentList ComponentList
 
typedef struct tagFeatureList FeatureList
 
typedef struct tagMSIFOLDER MSIFOLDER
 
typedef struct tagFolderList FolderList
 
typedef enum _msi_file_state msi_file_state
 
typedef struct tagMSIFILE MSIFILE
 
typedef struct tagMSIFILEPATCH MSIFILEPATCH
 
typedef struct tagMSIAPPID MSIAPPID
 
typedef struct tagMSIPROGID MSIPROGID
 
typedef struct tagMSICLASS MSICLASS
 
typedef struct tagMSIMIME MSIMIME
 
typedef struct tagMSIEXTENSION MSIEXTENSION
 
typedef struct tagMSIVERB MSIVERB
 
typedef UINT(* record_func) (MSIRECORD *, LPVOID)
 
typedef BOOL(* PMSICABEXTRACTCB) (MSIPACKAGE *, LPCWSTR, DWORD, LPWSTR *, DWORD *, PVOID)
 
typedef enum tid_t tid_t
 

Enumerations

enum  platform {
  PLATFORM_UNRECOGNIZED , PLATFORM_INTEL , PLATFORM_INTEL64 , PLATFORM_X64 ,
  PLATFORM_ARM , PLATFORM_ARM64
}
 
enum  clr_version {
  CLR_VERSION_V10 , CLR_VERSION_V11 , CLR_VERSION_V20 , CLR_VERSION_V40 ,
  CLR_VERSION_MAX
}
 
enum  script {
  SCRIPT_NONE = -1 , SCRIPT_INSTALL = 0 , SCRIPT_COMMIT = 1 , SCRIPT_ROLLBACK = 2 ,
  SCRIPT_MAX = 3
}
 
enum  folder_state {
  FOLDER_STATE_UNINITIALIZED , FOLDER_STATE_EXISTS , FOLDER_STATE_CREATED , FOLDER_STATE_CREATED_PERSISTENT ,
  FOLDER_STATE_REMOVED
}
 
enum  _msi_file_state {
  msifs_invalid , msifs_missing , msifs_overwrite , msifs_present ,
  msifs_installed , msifs_skipped , msifs_hashmatch
}
 
enum  tid_t {
  LAST_tid , LAST_tid , Database_tid , Installer_tid ,
  Record_tid , Session_tid , StringList_tid , SummaryInfo_tid ,
  View_tid , LAST_tid , NULL_tid , IXMLDOMAttribute_tid ,
  IXMLDOMCDATASection_tid , IXMLDOMComment_tid , IXMLDOMDocument_tid , IXMLDOMDocument2_tid ,
  IXMLDOMDocument3_tid , IXMLDOMDocumentFragment_tid , IXMLDOMDocumentType_tid , IXMLDOMElement_tid ,
  IXMLDOMEntityReference_tid , IXMLDOMImplementation_tid , IXMLDOMNamedNodeMap_tid , IXMLDOMNode_tid ,
  IXMLDOMNodeList_tid , IXMLDOMParseError2_tid , IXMLDOMProcessingInstruction_tid , IXMLDOMSchemaCollection_tid ,
  IXMLDOMSchemaCollection2_tid , IXMLDOMSelection_tid , IXMLDOMText_tid , IXMLElement_tid ,
  IXMLDocument_tid , IXMLHTTPRequest_tid , IXSLProcessor_tid , IXSLTemplate_tid ,
  IVBSAXAttributes_tid , IVBSAXContentHandler_tid , IVBSAXDeclHandler_tid , IVBSAXDTDHandler_tid ,
  IVBSAXEntityResolver_tid , IVBSAXErrorHandler_tid , IVBSAXLexicalHandler_tid , IVBSAXLocator_tid ,
  IVBSAXXMLFilter_tid , IVBSAXXMLReader_tid , IMXAttributes_tid , IMXReaderControl_tid ,
  IMXWriter_tid , IVBMXNamespaceManager_tid , IServerXMLHTTPRequest_tid , LAST_tid ,
  NULL_tid , ITextDocument_tid , ITextRange_tid , ITextSelection_tid ,
  ITextFont_tid , ITextPara_tid , LAST_tid , NULL_tid ,
  IDictionary_tid , IDrive_tid , IDriveCollection_tid , IFile_tid ,
  IFileCollection_tid , IFileSystem3_tid , IFolder_tid , IFolderCollection_tid ,
  ITextStream_tid , LAST_tid , NULL_tid , IWshCollection_tid ,
  IWshEnvironment_tid , IWshExec_tid , IWshShell3_tid , IWshShortcut_tid ,
  LAST_tid
}
 

Functions

UINT msi_strcpy_to_awstring (const WCHAR *, int, awstring *, DWORD *) DECLSPEC_HIDDEN
 
MSIHANDLE msi_get_remote (MSIHANDLE handle) DECLSPEC_HIDDEN
 
LONG WINAPI rpc_filter (EXCEPTION_POINTERS *eptr) DECLSPEC_HIDDEN
 
voidmsihandle2msiinfo (MSIHANDLE handle, UINT type) DECLSPEC_HIDDEN
 
MSIHANDLE alloc_msihandle (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
MSIHANDLE alloc_msi_remote_handle (MSIHANDLE remote) DECLSPEC_HIDDEN
 
voidalloc_msiobject (UINT type, UINT size, msihandledestructor destroy) DECLSPEC_HIDDEN
 
void msiobj_addref (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
int msiobj_release (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
void msiobj_lock (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
void msiobj_unlock (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
void msi_free_handle_table (void) DECLSPEC_HIDDEN
 
void free_cached_tables (MSIDATABASE *db) DECLSPEC_HIDDEN
 
UINT MSI_CommitTables (MSIDATABASE *db) DECLSPEC_HIDDEN
 
UINT msi_commit_streams (MSIDATABASE *db) DECLSPEC_HIDDEN
 
BOOL msi_add_string (string_table *st, const WCHAR *data, int len, BOOL persistent) DECLSPEC_HIDDEN
 
UINT msi_string2id (const string_table *st, const WCHAR *data, int len, UINT *id) DECLSPEC_HIDDEN
 
VOID msi_destroy_stringtable (string_table *st) DECLSPEC_HIDDEN
 
const WCHARmsi_string_lookup (const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
 
HRESULT msi_init_string_table (IStorage *stg) DECLSPEC_HIDDEN
 
string_tablemsi_load_string_table (IStorage *stg, UINT *bytes_per_strref) DECLSPEC_HIDDEN
 
UINT msi_save_string_table (const string_table *st, IStorage *storage, UINT *bytes_per_strref) DECLSPEC_HIDDEN
 
UINT msi_get_string_table_codepage (const string_table *st) DECLSPEC_HIDDEN
 
UINT msi_set_string_table_codepage (string_table *st, UINT codepage) DECLSPEC_HIDDEN
 
WCHARmsi_strdupW (const WCHAR *value, int len) DECLSPEC_HIDDEN
 
BOOL TABLE_Exists (MSIDATABASE *db, LPCWSTR name) DECLSPEC_HIDDEN
 
MSICONDITION MSI_DatabaseIsTablePersistent (MSIDATABASE *db, LPCWSTR table) DECLSPEC_HIDDEN
 
UINT read_stream_data (IStorage *stg, LPCWSTR stname, BOOL table, BYTE **pdata, UINT *psz) DECLSPEC_HIDDEN
 
UINT write_stream_data (IStorage *stg, LPCWSTR stname, LPCVOID data, UINT sz, BOOL bTable) DECLSPEC_HIDDEN
 
UINT msi_table_apply_transform (MSIDATABASE *db, IStorage *stg, int err_cond) DECLSPEC_HIDDEN
 
UINT MSI_DatabaseApplyTransformW (MSIDATABASE *db, LPCWSTR szTransformFile, int iErrorCond) DECLSPEC_HIDDEN
 
void append_storage_to_db (MSIDATABASE *db, IStorage *stg) DECLSPEC_HIDDEN
 
UINT msi_apply_transforms (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_check_patch_applicable (MSIPACKAGE *package, MSISUMMARYINFO *si) DECLSPEC_HIDDEN
 
UINT msi_apply_patches (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_apply_registered_patch (MSIPACKAGE *package, LPCWSTR patch_code) DECLSPEC_HIDDEN
 
void msi_free_patchinfo (MSIPATCHINFO *patch) DECLSPEC_HIDDEN
 
UINT MSI_InstallPackage (MSIPACKAGE *, LPCWSTR, LPCWSTR) DECLSPEC_HIDDEN
 
INT ACTION_ShowDialog (MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
 
INT ACTION_DialogBox (MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
 
UINT ACTION_ForceReboot (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT MSI_Sequence (MSIPACKAGE *package, LPCWSTR szTable) DECLSPEC_HIDDEN
 
UINT MSI_SetFeatureStates (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_parse_command_line (MSIPACKAGE *package, LPCWSTR szCommandLine, BOOL preserve_case) DECLSPEC_HIDDEN
 
const WCHARmsi_get_command_line_option (const WCHAR *cmd, const WCHAR *option, UINT *len) DECLSPEC_HIDDEN
 
UINT msi_schedule_action (MSIPACKAGE *package, UINT script, const WCHAR *action) DECLSPEC_HIDDEN
 
INSTALLSTATE msi_get_component_action (MSIPACKAGE *package, MSICOMPONENT *comp) DECLSPEC_HIDDEN
 
INSTALLSTATE msi_get_feature_action (MSIPACKAGE *package, MSIFEATURE *feature) DECLSPEC_HIDDEN
 
UINT msi_load_all_components (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_load_all_features (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_validate_product_id (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
void MSI_CloseRecord (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetIStream (MSIRECORD *, UINT, IStream *) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetIStream (MSIRECORD *, UINT, IStream **) DECLSPEC_HIDDEN
 
const WCHARMSI_RecordGetString (const MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
MSIRECORDMSI_CreateRecord (UINT) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetInteger (MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetStringW (MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
 
BOOL MSI_RecordIsNull (MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetStringW (MSIRECORD *, UINT, LPWSTR, LPDWORD) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetStringA (MSIRECORD *, UINT, LPSTR, LPDWORD) DECLSPEC_HIDDEN
 
int MSI_RecordGetInteger (MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
UINT MSI_RecordReadStream (MSIRECORD *, UINT, char *, LPDWORD) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetStream (MSIRECORD *, UINT, IStream *) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetFieldCount (const MSIRECORD *rec) DECLSPEC_HIDDEN
 
UINT MSI_RecordStreamToFile (MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetStreamFromFileW (MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_RecordCopyField (MSIRECORD *, UINT, MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
MSIRECORDMSI_CloneRecord (MSIRECORD *) DECLSPEC_HIDDEN
 
BOOL MSI_RecordsAreEqual (MSIRECORD *, MSIRECORD *) DECLSPEC_HIDDEN
 
BOOL MSI_RecordsAreFieldsEqual (MSIRECORD *a, MSIRECORD *b, UINT field) DECLSPEC_HIDDEN
 
UINT msi_record_set_string (MSIRECORD *, UINT, const WCHAR *, int) DECLSPEC_HIDDEN
 
const WCHARmsi_record_get_string (const MSIRECORD *, UINT, int *) DECLSPEC_HIDDEN
 
void dump_record (MSIRECORD *) DECLSPEC_HIDDEN
 
UINT unmarshal_record (const struct wire_record *in, MSIHANDLE *out) DECLSPEC_HIDDEN
 
struct wire_recordmarshal_record (MSIHANDLE handle) DECLSPEC_HIDDEN
 
void free_remote_record (struct wire_record *rec) DECLSPEC_HIDDEN
 
UINT copy_remote_record (const struct wire_record *rec, MSIHANDLE handle) DECLSPEC_HIDDEN
 
void enum_stream_names (IStorage *stg) DECLSPEC_HIDDEN
 
LPWSTR encode_streamname (BOOL bTable, LPCWSTR in) DECLSPEC_HIDDEN
 
BOOL decode_streamname (LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
 
UINT msi_get_stream (MSIDATABASE *, const WCHAR *, IStream **) DECLSPEC_HIDDEN
 
UINT MSI_OpenDatabaseW (LPCWSTR, LPCWSTR, MSIDATABASE **) DECLSPEC_HIDDEN
 
UINT MSI_DatabaseOpenViewW (MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
 
UINT WINAPIV MSI_OpenQuery (MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
 
UINT MSI_IterateRecords (MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
 
MSIRECORD *WINAPIV MSI_QueryGetRecord (MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
 
UINT MSI_DatabaseGetPrimaryKeys (MSIDATABASE *, LPCWSTR, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_ViewExecute (MSIQUERY *, MSIRECORD *) DECLSPEC_HIDDEN
 
UINT MSI_ViewFetch (MSIQUERY *, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_ViewClose (MSIQUERY *) DECLSPEC_HIDDEN
 
UINT MSI_ViewGetColumnInfo (MSIQUERY *, MSICOLINFO, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_ViewModify (MSIQUERY *, MSIMODIFY, MSIRECORD *) DECLSPEC_HIDDEN
 
UINT VIEW_find_column (MSIVIEW *, LPCWSTR, LPCWSTR, UINT *) DECLSPEC_HIDDEN
 
UINT msi_view_get_row (MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_SetInstallLevel (MSIPACKAGE *package, int iInstallLevel) DECLSPEC_HIDDEN
 
MSIPACKAGEMSI_CreatePackage (MSIDATABASE *) DECLSPEC_HIDDEN
 
UINT MSI_OpenPackageW (LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage) DECLSPEC_HIDDEN
 
UINT MSI_SetTargetPathW (MSIPACKAGE *, LPCWSTR, LPCWSTR) DECLSPEC_HIDDEN
 
INT MSI_ProcessMessageVerbatim (MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
 
INT MSI_ProcessMessage (MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
 
MSICONDITION MSI_EvaluateConditionW (MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_GetComponentStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE *) DECLSPEC_HIDDEN
 
UINT MSI_GetFeatureStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE *) DECLSPEC_HIDDEN
 
UINT MSI_SetFeatureStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE) DECLSPEC_HIDDEN
 
UINT msi_download_file (LPCWSTR szUrl, LPWSTR filename) DECLSPEC_HIDDEN
 
UINT msi_package_add_info (MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR) DECLSPEC_HIDDEN
 
UINT msi_package_add_media_disk (MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR) DECLSPEC_HIDDEN
 
UINT msi_clone_properties (MSIDATABASE *) DECLSPEC_HIDDEN
 
UINT msi_set_context (MSIPACKAGE *) DECLSPEC_HIDDEN
 
void msi_adjust_privilege_properties (MSIPACKAGE *) DECLSPEC_HIDDEN
 
UINT MSI_GetFeatureCost (MSIPACKAGE *, MSIFEATURE *, MSICOSTTREE, INSTALLSTATE, LPINT) DECLSPEC_HIDDEN
 
UINT MSI_FormatRecordW (MSIPACKAGE *, MSIRECORD *, LPWSTR, LPDWORD) DECLSPEC_HIDDEN
 
BOOL unsquash_guid (LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
 
BOOL squash_guid (LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
 
BOOL encode_base85_guid (GUID *, LPWSTR) DECLSPEC_HIDDEN
 
BOOL decode_base85_guid (LPCWSTR, GUID *) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUninstallKey (const WCHAR *, enum platform, HKEY *, BOOL) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUninstallKey (const WCHAR *, enum platform) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenProductKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenFeaturesKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserPatchesKey (LPCWSTR szPatch, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataFeaturesKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserComponentsKey (LPCWSTR szComponent, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataComponentKey (LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenPatchesKey (LPCWSTR szPatch, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataProductKey (LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataPatchKey (LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataProductPatchesKey (LPCWSTR product, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenInstallProps (LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUpgradeCodesKey (LPCWSTR szProduct, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserUpgradeCodesKey (LPCWSTR szProduct, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteProductKey (LPCWSTR szProduct) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserProductKey (LPCWSTR szProduct) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserDataPatchKey (LPCWSTR patch, MSIINSTALLCONTEXT context) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserDataProductKey (LPCWSTR, MSIINSTALLCONTEXT) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserFeaturesKey (LPCWSTR szProduct) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserDataComponentKey (LPCWSTR szComponent, LPCWSTR szUserSid) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserUpgradeCodesKey (LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUpgradeCodesKey (const WCHAR *) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteClassesUpgradeCodesKey (LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenClassesUpgradeCodesKey (LPCWSTR szUpgradeCode, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteLocalClassesProductKey (LPCWSTR szProductCode) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteLocalClassesFeaturesKey (LPCWSTR szProductCode) DECLSPEC_HIDDEN
 
UINT msi_locate_product (LPCWSTR szProduct, MSIINSTALLCONTEXT *context) DECLSPEC_HIDDEN
 
LPWSTR msi_reg_get_val_str (HKEY hkey, LPCWSTR name) DECLSPEC_HIDDEN
 
BOOL msi_reg_get_val_dword (HKEY hkey, LPCWSTR name, DWORD *val) DECLSPEC_HIDDEN
 
DWORD msi_version_str_to_dword (LPCWSTR p) DECLSPEC_HIDDEN
 
void msi_parse_version_string (LPCWSTR, PDWORD, PDWORD) DECLSPEC_HIDDEN
 
int msi_compare_file_versions (VS_FIXEDFILEINFO *, const WCHAR *) DECLSPEC_HIDDEN
 
int msi_compare_font_versions (const WCHAR *, const WCHAR *) DECLSPEC_HIDDEN
 
LONG msi_reg_set_val_str (HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
 
LONG msi_reg_set_val_multi_str (HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
 
LONG msi_reg_set_val_dword (HKEY hkey, LPCWSTR name, DWORD val) DECLSPEC_HIDDEN
 
LONG msi_reg_set_subkey_val (HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val) DECLSPEC_HIDDEN
 
void msi_dialog_check_messages (HANDLE) DECLSPEC_HIDDEN
 
void msi_dialog_destroy (msi_dialog *) DECLSPEC_HIDDEN
 
void msi_dialog_unregister_class (void) DECLSPEC_HIDDEN
 
UINT msi_get_suminfo (IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si) DECLSPEC_HIDDEN
 
UINT msi_get_db_suminfo (MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **si) DECLSPEC_HIDDEN
 
LPWSTR msi_suminfo_dup_string (MSISUMMARYINFO *si, UINT uiProperty) DECLSPEC_HIDDEN
 
INT msi_suminfo_get_int32 (MSISUMMARYINFO *si, UINT uiProperty) DECLSPEC_HIDDEN
 
LPWSTR msi_get_suminfo_product (IStorage *stg) DECLSPEC_HIDDEN
 
UINT msi_add_suminfo (MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns) DECLSPEC_HIDDEN
 
UINT msi_export_suminfo (MSIDATABASE *db, HANDLE handle) DECLSPEC_HIDDEN
 
UINT msi_load_suminfo_properties (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT WINAPI MsiCreateAndVerifyInstallerDirectory (DWORD)
 
UINT WINAPI MsiDecomposeDescriptorW (LPCWSTR, LPWSTR, LPWSTR, LPWSTR, LPDWORD)
 
UINT WINAPI MsiDecomposeDescriptorA (LPCSTR, LPSTR, LPSTR, LPSTR, LPDWORD)
 
LANGID WINAPI MsiLoadStringW (MSIHANDLE, UINT, LPWSTR, int, LANGID)
 
LANGID WINAPI MsiLoadStringA (MSIHANDLE, UINT, LPSTR, int, LANGID)
 
UINT ACTION_PerformAction (MSIPACKAGE *package, const WCHAR *action) DECLSPEC_HIDDEN
 
void ACTION_FinishCustomActions (const MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_CustomAction (MSIPACKAGE *package, const WCHAR *action) DECLSPEC_HIDDEN
 
void custom_stop_server (HANDLE process, HANDLE pipe) DECLSPEC_HIDDEN
 
UINT ACTION_AppSearch (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_CCPSearch (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_FindRelatedProducts (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_InstallFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_PatchFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RemoveFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_MoveFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_DuplicateFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RemoveDuplicateFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterClassInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterProgIdInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterExtensionInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterMIMEInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterFonts (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterClassInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterExtensionInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterFonts (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterMIMEInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterProgIdInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_MsiPublishAssemblies (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_MsiUnpublishAssemblies (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
DWORD deformat_string (MSIPACKAGE *package, LPCWSTR ptr, WCHAR **data) DECLSPEC_HIDDEN
 
WCHARmsi_dup_record_field (MSIRECORD *row, INT index) DECLSPEC_HIDDEN
 
LPWSTR msi_dup_property (MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
 
UINT msi_set_property (MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
 
UINT msi_get_property (MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD) DECLSPEC_HIDDEN
 
int msi_get_property_int (MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
 
WCHARmsi_resolve_source_folder (MSIPACKAGE *package, const WCHAR *name, MSIFOLDER **folder) DECLSPEC_HIDDEN
 
void msi_resolve_target_folder (MSIPACKAGE *package, const WCHAR *name, BOOL load_prop) DECLSPEC_HIDDEN
 
WCHARmsi_normalize_path (const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_resolve_file_source (MSIPACKAGE *package, MSIFILE *file) DECLSPEC_HIDDEN
 
const WCHARmsi_get_target_folder (MSIPACKAGE *package, const WCHAR *name) DECLSPEC_HIDDEN
 
void msi_reset_source_folders (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
MSICOMPONENTmsi_get_loaded_component (MSIPACKAGE *package, const WCHAR *Component) DECLSPEC_HIDDEN
 
MSIFEATUREmsi_get_loaded_feature (MSIPACKAGE *package, const WCHAR *Feature) DECLSPEC_HIDDEN
 
MSIFILEmsi_get_loaded_file (MSIPACKAGE *package, const WCHAR *file) DECLSPEC_HIDDEN
 
MSIFOLDERmsi_get_loaded_folder (MSIPACKAGE *package, const WCHAR *dir) DECLSPEC_HIDDEN
 
WCHARmsi_create_temp_file (MSIDATABASE *db) DECLSPEC_HIDDEN
 
void msi_free_action_script (MSIPACKAGE *package, UINT script) DECLSPEC_HIDDEN
 
WCHARmsi_build_icon_path (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHAR *WINAPIV msi_build_directory_name (DWORD,...) DECLSPEC_HIDDEN
 
void msi_reduce_to_long_filename (WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_create_component_advertise_string (MSIPACKAGE *, MSICOMPONENT *, const WCHAR *) DECLSPEC_HIDDEN
 
void ACTION_UpdateComponentStates (MSIPACKAGE *package, MSIFEATURE *feature) DECLSPEC_HIDDEN
 
UINT msi_register_unique_action (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
BOOL msi_action_is_unique (const MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
UINT msi_set_last_used_source (LPCWSTR product, LPCWSTR usersid, MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value) DECLSPEC_HIDDEN
 
UINT msi_create_empty_local_file (LPWSTR path, LPCWSTR suffix) DECLSPEC_HIDDEN
 
UINT msi_set_sourcedir_props (MSIPACKAGE *package, BOOL replace) DECLSPEC_HIDDEN
 
MSIASSEMBLYmsi_load_assembly (MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN
 
UINT msi_install_assembly (MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN
 
UINT msi_uninstall_assembly (MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN
 
BOOL msi_init_assembly_caches (MSIPACKAGE *) DECLSPEC_HIDDEN
 
void msi_destroy_assembly_caches (MSIPACKAGE *) DECLSPEC_HIDDEN
 
BOOL msi_is_global_assembly (MSICOMPONENT *) DECLSPEC_HIDDEN
 
IAssemblyEnummsi_create_assembly_enum (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_get_assembly_path (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHAR ** msi_split_string (const WCHAR *, WCHAR) DECLSPEC_HIDDEN
 
UINT msi_set_original_database_property (MSIDATABASE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_get_error_message (MSIDATABASE *, int) DECLSPEC_HIDDEN
 
UINT msi_strncpyWtoA (const WCHAR *str, int len, char *buf, DWORD *sz, BOOL remote) DECLSPEC_HIDDEN
 
UINT msi_strncpyW (const WCHAR *str, int len, WCHAR *buf, DWORD *sz) DECLSPEC_HIDDEN
 
WCHARmsi_get_package_code (MSIDATABASE *db) DECLSPEC_HIDDEN
 
static void msi_disable_fs_redirection (MSIPACKAGE *package)
 
static void msi_revert_fs_redirection (MSIPACKAGE *package)
 
HANDLE msi_create_file (MSIPACKAGE *, const WCHAR *, DWORD, DWORD, DWORD, DWORD) DECLSPEC_HIDDEN
 
BOOL msi_delete_file (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
BOOL msi_remove_directory (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
DWORD msi_get_file_attributes (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
BOOL msi_set_file_attributes (MSIPACKAGE *, const WCHAR *, DWORD) DECLSPEC_HIDDEN
 
HANDLE msi_find_first_file (MSIPACKAGE *, const WCHAR *, WIN32_FIND_DATAW *) DECLSPEC_HIDDEN
 
BOOL msi_find_next_file (MSIPACKAGE *, HANDLE, WIN32_FIND_DATAW *) DECLSPEC_HIDDEN
 
BOOL msi_move_file (MSIPACKAGE *, const WCHAR *, const WCHAR *, DWORD) DECLSPEC_HIDDEN
 
DWORD msi_get_file_version_info (MSIPACKAGE *, const WCHAR *, DWORD, BYTE *) DECLSPEC_HIDDEN
 
BOOL msi_create_full_path (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
DWORD msi_get_disk_file_size (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
VS_FIXEDFILEINFOmsi_get_disk_file_version (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
UINT msi_get_filehash (MSIPACKAGE *, const WCHAR *, MSIFILEHASHINFO *) DECLSPEC_HIDDEN
 
WCHARmsi_get_font_file_version (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
UINT ready_media (MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi) DECLSPEC_HIDDEN
 
UINT msi_load_media_info (MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi) DECLSPEC_HIDDEN
 
void msi_free_media_info (MSIMEDIAINFO *mi) DECLSPEC_HIDDEN
 
BOOL msi_cabextract (MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data) DECLSPEC_HIDDEN
 
UINT msi_add_cabinet_stream (MSIPACKAGE *, UINT, IStorage *, const WCHAR *) DECLSPEC_HIDDEN
 
void msi_event_fire (MSIPACKAGE *, const WCHAR *, MSIRECORD *) DECLSPEC_HIDDEN
 
void msi_event_cleanup_all_subscriptions (MSIPACKAGE *) DECLSPEC_HIDDEN
 
HRESULT create_msiserver (IUnknown *pOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT create_session (MSIHANDLE msiHandle, IDispatch *pInstaller, IDispatch **pDispatch) DECLSPEC_HIDDEN
 
HRESULT get_typeinfo (tid_t tid, ITypeInfo **ti) DECLSPEC_HIDDEN
 
void release_typelib (void) DECLSPEC_HIDDEN
 
DWORD call_script (MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action) DECLSPEC_HIDDEN
 
void msi_ui_progress (MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN
 
static voidmsi_alloc (size_t len) __WINE_ALLOC_SIZE(1)
 
static voidmsi_alloc_zero (size_t len) __WINE_ALLOC_SIZE(1)
 
static voidmsi_realloc (void *mem, size_t len) __WINE_ALLOC_SIZE(2)
 
static void msi_free (void *mem)
 
static charstrdupWtoA (LPCWSTR str)
 
static LPWSTR strdupAtoW (LPCSTR str)
 
static LPWSTR strdupW (LPCWSTR src)
 

Variables

static const BOOL is_64bit = sizeof(void *) > sizeof(int)
 
BOOL is_wow64 DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ GUID_SIZE

#define GUID_SIZE   39

Definition at line 733 of file msipriv.h.

◆ INSTALLUILEVEL_MASK

#define INSTALLUILEVEL_MASK   0x0007

Definition at line 60 of file msipriv.h.

◆ LONG_STR_BYTES

#define LONG_STR_BYTES   3

Definition at line 57 of file msipriv.h.

◆ MAX_STREAM_NAME_LEN

#define MAX_STREAM_NAME_LEN   62

Definition at line 56 of file msipriv.h.

◆ MSI_BUILDNUMBER

#define MSI_BUILDNUMBER   6001

Definition at line 731 of file msipriv.h.

◆ MSI_DATASIZEMASK

#define MSI_DATASIZEMASK   0x00ff

Definition at line 47 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_DISKID

#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID   32000

Definition at line 84 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_OFFSET

#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET   10000

Definition at line 83 of file msipriv.h.

◆ MSI_MAJORVERSION

#define MSI_MAJORVERSION   4

Definition at line 729 of file msipriv.h.

◆ MSI_MAX_PROPS

#define MSI_MAX_PROPS   20

Definition at line 482 of file msipriv.h.

◆ MSI_MINORVERSION

#define MSI_MINORVERSION   5

Definition at line 730 of file msipriv.h.

◆ MSI_OPEN_CREATE

#define MSI_OPEN_CREATE   3

Definition at line 102 of file msipriv.h.

◆ MSI_OPEN_CREATEDIRECT

#define MSI_OPEN_CREATEDIRECT   4

Definition at line 103 of file msipriv.h.

◆ MSI_OPEN_DIRECT

#define MSI_OPEN_DIRECT   2

Definition at line 101 of file msipriv.h.

◆ MSI_OPEN_PATCHFILE

#define MSI_OPEN_PATCHFILE   32

Definition at line 104 of file msipriv.h.

◆ MSI_OPEN_READONLY

#define MSI_OPEN_READONLY   0

Definition at line 99 of file msipriv.h.

◆ MSI_OPEN_TRANSACT

#define MSI_OPEN_TRANSACT   1

Definition at line 100 of file msipriv.h.

◆ MSICABEXTRACT_BEGINEXTRACT

#define MSICABEXTRACT_BEGINEXTRACT   0x01

Definition at line 1095 of file msipriv.h.

◆ MSICABEXTRACT_FILEEXTRACTED

#define MSICABEXTRACT_FILEEXTRACTED   0x02

Definition at line 1096 of file msipriv.h.

◆ MSIHANDLE_MAGIC

#define MSIHANDLE_MAGIC   0x4d434923

Definition at line 736 of file msipriv.h.

◆ MSIHANDLETYPE_ANY

#define MSIHANDLETYPE_ANY   0

Definition at line 721 of file msipriv.h.

◆ MSIHANDLETYPE_DATABASE

#define MSIHANDLETYPE_DATABASE   1

Definition at line 722 of file msipriv.h.

◆ MSIHANDLETYPE_PACKAGE

#define MSIHANDLETYPE_PACKAGE   5

Definition at line 726 of file msipriv.h.

◆ MSIHANDLETYPE_PREVIEW

#define MSIHANDLETYPE_PREVIEW   6

Definition at line 727 of file msipriv.h.

◆ MSIHANDLETYPE_RECORD

#define MSIHANDLETYPE_RECORD   4

Definition at line 725 of file msipriv.h.

◆ MSIHANDLETYPE_SUMMARYINFO

#define MSIHANDLETYPE_SUMMARYINFO   2

Definition at line 723 of file msipriv.h.

◆ MSIHANDLETYPE_VIEW

#define MSIHANDLETYPE_VIEW   3

Definition at line 724 of file msipriv.h.

◆ MSITYPE_IS_BINARY

#define MSITYPE_IS_BINARY (   type)    (((type) & ~MSITYPE_NULLABLE) == (MSITYPE_STRING|MSITYPE_VALID))

Definition at line 62 of file msipriv.h.

◆ MSITYPE_KEY

#define MSITYPE_KEY   0x2000

Definition at line 52 of file msipriv.h.

◆ MSITYPE_LOCALIZABLE

#define MSITYPE_LOCALIZABLE   0x200

Definition at line 49 of file msipriv.h.

◆ MSITYPE_NULLABLE

#define MSITYPE_NULLABLE   0x1000

Definition at line 51 of file msipriv.h.

◆ MSITYPE_STRING

#define MSITYPE_STRING   0x0800

Definition at line 50 of file msipriv.h.

◆ MSITYPE_TEMPORARY

#define MSITYPE_TEMPORARY   0x4000

Definition at line 53 of file msipriv.h.

◆ MSITYPE_UNKNOWN

#define MSITYPE_UNKNOWN   0x8000

Definition at line 54 of file msipriv.h.

◆ MSITYPE_VALID

#define MSITYPE_VALID   0x0100

Definition at line 48 of file msipriv.h.

◆ SEQUENCE_EXEC

#define SEQUENCE_EXEC   0x2

Definition at line 719 of file msipriv.h.

◆ SEQUENCE_UI

#define SEQUENCE_UI   0x1

Definition at line 718 of file msipriv.h.

◆ SQUASHED_GUID_SIZE

#define SQUASHED_GUID_SIZE   33

Definition at line 734 of file msipriv.h.

◆ WINE_OPENPACKAGEFLAGS_RECACHE

#define WINE_OPENPACKAGEFLAGS_RECACHE   0x80000000

Definition at line 883 of file msipriv.h.

Typedef Documentation

◆ column_info

◆ ComponentList

◆ FeatureList

◆ FolderList

◆ msi_dialog

Definition at line 361 of file msipriv.h.

◆ msi_file_state

◆ MSIAPPID

◆ MSIASSEMBLY

◆ MSIBINARY

◆ MSICABINETSTREAM

◆ MSICLASS

◆ MSICOMPONENT

◆ MSIDATABASE

◆ MSIEXTENSION

◆ MSIFEATURE

◆ MSIFIELD

◆ MSIFILE

◆ MSIFILEPATCH

◆ MSIFOLDER

◆ msihandledestructor

typedef VOID(* msihandledestructor) (MSIOBJECTHDR *)

Definition at line 73 of file msipriv.h.

◆ MSIITERHANDLE

Definition at line 229 of file msipriv.h.

◆ MSIMEDIADISK

◆ MSIMEDIAINFO

◆ MSIMIME

Definition at line 670 of file msipriv.h.

◆ MSIOBJECTHDR

Definition at line 71 of file msipriv.h.

◆ MSIPACKAGE

◆ MSIPATCHINFO

◆ MSIPREVIEW

◆ MSIPROGID

Definition at line 647 of file msipriv.h.

◆ MSIQUERY

◆ MSIRECORD

◆ MSISOURCELISTINFO

◆ MSISTREAM

◆ MSISUMMARYINFO

◆ MSITABLE

Definition at line 65 of file msipriv.h.

◆ MSITRANSFORM

◆ MSIVERB

◆ MSIVIEW

Definition at line 125 of file msipriv.h.

◆ MSIVIEWOPS

◆ PMSICABEXTRACTCB

typedef BOOL(* PMSICABEXTRACTCB) (MSIPACKAGE *, LPCWSTR, DWORD, LPWSTR *, DWORD *, PVOID)

Definition at line 1093 of file msipriv.h.

◆ record_func

typedef UINT(* record_func) (MSIRECORD *, LPVOID)

Definition at line 865 of file msipriv.h.

◆ string_table

Definition at line 68 of file msipriv.h.

◆ tid_t

typedef enum tid_t tid_t

Enumeration Type Documentation

◆ _msi_file_state

Enumerator
msifs_invalid 
msifs_missing 
msifs_overwrite 
msifs_present 
msifs_installed 
msifs_skipped 
msifs_hashmatch 

Definition at line 593 of file msipriv.h.

593 {
enum _msi_file_state msi_file_state
@ msifs_missing
Definition: msipriv.h:595
@ msifs_skipped
Definition: msipriv.h:599
@ msifs_installed
Definition: msipriv.h:598
@ msifs_invalid
Definition: msipriv.h:594
@ msifs_present
Definition: msipriv.h:597
@ msifs_hashmatch
Definition: msipriv.h:600
@ msifs_overwrite
Definition: msipriv.h:596

◆ clr_version

Enumerator
CLR_VERSION_V10 
CLR_VERSION_V11 
CLR_VERSION_V20 
CLR_VERSION_V40 
CLR_VERSION_MAX 

Definition at line 373 of file msipriv.h.

374{
380};
@ CLR_VERSION_V20
Definition: msipriv.h:377
@ CLR_VERSION_MAX
Definition: msipriv.h:379
@ CLR_VERSION_V40
Definition: msipriv.h:378
@ CLR_VERSION_V11
Definition: msipriv.h:376
@ CLR_VERSION_V10
Definition: msipriv.h:375

◆ folder_state

Enumerator
FOLDER_STATE_UNINITIALIZED 
FOLDER_STATE_EXISTS 
FOLDER_STATE_CREATED 
FOLDER_STATE_CREATED_PERSISTENT 
FOLDER_STATE_REMOVED 

Definition at line 563 of file msipriv.h.

564{
570};
@ FOLDER_STATE_UNINITIALIZED
Definition: msipriv.h:565
@ FOLDER_STATE_EXISTS
Definition: msipriv.h:566
@ FOLDER_STATE_REMOVED
Definition: msipriv.h:569
@ FOLDER_STATE_CREATED
Definition: msipriv.h:567
@ FOLDER_STATE_CREATED_PERSISTENT
Definition: msipriv.h:568

◆ platform

Enumerator
PLATFORM_UNRECOGNIZED 
PLATFORM_INTEL 
PLATFORM_INTEL64 
PLATFORM_X64 
PLATFORM_ARM 
PLATFORM_ARM64 

Definition at line 363 of file msipriv.h.

364{
371};
@ PLATFORM_X64
Definition: msipriv.h:368
@ PLATFORM_UNRECOGNIZED
Definition: msipriv.h:365
@ PLATFORM_INTEL64
Definition: msipriv.h:367
@ PLATFORM_INTEL
Definition: msipriv.h:366
@ PLATFORM_ARM
Definition: msipriv.h:369
@ PLATFORM_ARM64
Definition: msipriv.h:370

◆ script

Enumerator
SCRIPT_NONE 
SCRIPT_INSTALL 
SCRIPT_COMMIT 
SCRIPT_ROLLBACK 
SCRIPT_MAX 

Definition at line 382 of file msipriv.h.

383{
384 SCRIPT_NONE = -1,
385 SCRIPT_INSTALL = 0,
386 SCRIPT_COMMIT = 1,
387 SCRIPT_ROLLBACK = 2,
388 SCRIPT_MAX = 3
389};
@ SCRIPT_INSTALL
Definition: msipriv.h:385
@ SCRIPT_ROLLBACK
Definition: msipriv.h:387
@ SCRIPT_NONE
Definition: msipriv.h:384
@ SCRIPT_COMMIT
Definition: msipriv.h:386
@ SCRIPT_MAX
Definition: msipriv.h:388

◆ tid_t

Enumerator
LAST_tid 
LAST_tid 
Database_tid 
Installer_tid 
Record_tid 
Session_tid 
StringList_tid 
SummaryInfo_tid 
View_tid 
LAST_tid 
NULL_tid 
IXMLDOMAttribute_tid 
IXMLDOMCDATASection_tid 
IXMLDOMComment_tid 
IXMLDOMDocument_tid 
IXMLDOMDocument2_tid 
IXMLDOMDocument3_tid 
IXMLDOMDocumentFragment_tid 
IXMLDOMDocumentType_tid 
IXMLDOMElement_tid 
IXMLDOMEntityReference_tid 
IXMLDOMImplementation_tid 
IXMLDOMNamedNodeMap_tid 
IXMLDOMNode_tid 
IXMLDOMNodeList_tid 
IXMLDOMParseError2_tid 
IXMLDOMProcessingInstruction_tid 
IXMLDOMSchemaCollection_tid 
IXMLDOMSchemaCollection2_tid 
IXMLDOMSelection_tid 
IXMLDOMText_tid 
IXMLElement_tid 
IXMLDocument_tid 
IXMLHTTPRequest_tid 
IXSLProcessor_tid 
IXSLTemplate_tid 
IVBSAXAttributes_tid 
IVBSAXContentHandler_tid 
IVBSAXDeclHandler_tid 
IVBSAXDTDHandler_tid 
IVBSAXEntityResolver_tid 
IVBSAXErrorHandler_tid 
IVBSAXLexicalHandler_tid 
IVBSAXLocator_tid 
IVBSAXXMLFilter_tid 
IVBSAXXMLReader_tid 
IMXAttributes_tid 
IMXReaderControl_tid 
IMXWriter_tid 
IVBMXNamespaceManager_tid 
IServerXMLHTTPRequest_tid 
LAST_tid 
NULL_tid 
ITextDocument_tid 
ITextRange_tid 
ITextSelection_tid 
ITextFont_tid 
ITextPara_tid 
LAST_tid 
NULL_tid 
IDictionary_tid 
IDrive_tid 
IDriveCollection_tid 
IFile_tid 
IFileCollection_tid 
IFileSystem3_tid 
IFolder_tid 
IFolderCollection_tid 
ITextStream_tid 
LAST_tid 
NULL_tid 
IWshCollection_tid 
IWshEnvironment_tid 
IWshExec_tid 
IWshShell3_tid 
IWshShortcut_tid 
LAST_tid 

Definition at line 1118 of file msipriv.h.

1118 {
1121 Record_tid,
1125 View_tid,
1126 LAST_tid
1127} tid_t;
tid_t
Definition: msipriv.h:1118
@ View_tid
Definition: msipriv.h:1125
@ Session_tid
Definition: msipriv.h:1122
@ Database_tid
Definition: msipriv.h:1119
@ LAST_tid
Definition: msipriv.h:1126
@ SummaryInfo_tid
Definition: msipriv.h:1124
@ StringList_tid
Definition: msipriv.h:1123
@ Record_tid
Definition: msipriv.h:1121
@ Installer_tid
Definition: msipriv.h:1120

Function Documentation

◆ ACTION_AppSearch()

UINT ACTION_AppSearch ( MSIPACKAGE package)

Definition at line 1071 of file appsearch.c.

1072{
1073 MSIQUERY *view;
1074 UINT r;
1075
1076 if (msi_action_is_unique(package, L"AppSearch"))
1077 {
1078 TRACE("Skipping AppSearch action: already done in UI sequence\n");
1079 return ERROR_SUCCESS;
1080 }
1081 else
1082 msi_register_unique_action(package, L"AppSearch");
1083
1084 r = MSI_OpenQuery( package->db, &view, L"SELECT * FROM `AppSearch`" );
1085 if (r != ERROR_SUCCESS)
1086 return ERROR_SUCCESS;
1087
1089 msiobj_release( &view->hdr );
1090 return r;
1091}
static UINT ITERATE_AppSearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1036
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:113
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:131
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394

◆ ACTION_CCPSearch()

UINT ACTION_CCPSearch ( MSIPACKAGE package)

Definition at line 1118 of file appsearch.c.

1119{
1120 MSIQUERY *view;
1121 UINT r;
1122
1123 if (msi_action_is_unique(package, L"CCPSearch"))
1124 {
1125 TRACE("Skipping AppSearch action: already done in UI sequence\n");
1126 return ERROR_SUCCESS;
1127 }
1128 else
1129 msi_register_unique_action(package, L"CCPSearch");
1130
1131 r = MSI_OpenQuery(package->db, &view, L"SELECT * FROM `CCPSearch`");
1132 if (r != ERROR_SUCCESS)
1133 return ERROR_SUCCESS;
1134
1136 msiobj_release(&view->hdr);
1137 return r;
1138}
static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1093

◆ ACTION_CustomAction()

UINT ACTION_CustomAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 1460 of file custom.c.

1461{
1462 UINT rc = ERROR_SUCCESS;
1463 MSIRECORD *row;
1464 UINT type;
1465 const WCHAR *source, *target, *ptr, *deferred_data = NULL;
1466 WCHAR *deformated = NULL;
1467 int len;
1468
1469 /* deferred action: [properties]Action */
1470 if ((ptr = wcsrchr(action, ']')))
1471 {
1472 deferred_data = action;
1473 action = ptr + 1;
1474 }
1475
1476 row = MSI_QueryGetRecord( package->db, L"SELECT * FROM `CustomAction` WHERE `Action` = '%s'", action );
1477 if (!row)
1479
1483
1484 TRACE("Handling custom action %s (%x %s %s)\n",debugstr_w(action),type,
1486
1487 /* handle some of the deferred actions */
1489 FIXME("msidbCustomActionTypeTSAware not handled\n");
1490
1492 {
1494 WARN("msidbCustomActionTypeNoImpersonate not handled\n");
1495
1496 if (!action_type_matches_script(type, package->script))
1497 {
1498 rc = defer_custom_action( package, action, type );
1499 goto end;
1500 }
1501 else
1502 {
1503 LPWSTR actiondata = msi_dup_property( package->db, action );
1504
1506 package->scheduled_action_running = TRUE;
1507
1509 package->commit_action_running = TRUE;
1510
1512 package->rollback_action_running = TRUE;
1513
1514 if (deferred_data)
1515 set_deferred_action_props(package, deferred_data);
1516 else if (actiondata)
1517 msi_set_property( package->db, L"CustomActionData", actiondata, -1 );
1518 else
1519 msi_set_property( package->db, L"CustomActionData", L"", -1 );
1520
1521 msi_free(actiondata);
1522 }
1523 }
1525 {
1526 rc = ERROR_SUCCESS;
1527 goto end;
1528 }
1529
1530 switch (type & CUSTOM_ACTION_TYPE_MASK)
1531 {
1532 case 1: /* DLL file stored in a Binary table stream */
1533 rc = HANDLE_CustomType1( package, source, target, type, action );
1534 break;
1535 case 2: /* EXE file stored in a Binary table stream */
1536 rc = HANDLE_CustomType2( package, source, target, type, action );
1537 break;
1538 case 5:
1539 case 6: /* JScript/VBScript file stored in a Binary table stream */
1540 rc = HANDLE_CustomType5_6( package, source, target, type, action );
1541 break;
1542 case 7: /* Concurrent install from substorage */
1543 deformat_string( package, target, &deformated );
1544 rc = HANDLE_CustomType7( package, source, target, type, action );
1545 msi_free( deformated );
1546 break;
1547 case 17:
1548 rc = HANDLE_CustomType17( package, source, target, type, action );
1549 break;
1550 case 18: /* EXE file installed with package */
1551 rc = HANDLE_CustomType18( package, source, target, type, action );
1552 break;
1553 case 19: /* Error that halts install */
1554 rc = HANDLE_CustomType19( package, source, target, type, action );
1555 break;
1556 case 21: /* JScript/VBScript file installed with the product */
1557 case 22:
1558 rc = HANDLE_CustomType21_22( package, source, target, type, action );
1559 break;
1560 case 23: /* Installs another package in the source tree */
1561 deformat_string( package, target, &deformated );
1562 rc = HANDLE_CustomType23( package, source, deformated, type, action );
1563 msi_free( deformated );
1564 break;
1565 case 34: /* EXE to be run in specified directory */
1566 rc = HANDLE_CustomType34( package, source, target, type, action );
1567 break;
1568 case 35: /* Directory set with formatted text */
1569 deformat_string( package, target, &deformated );
1570 MSI_SetTargetPathW( package, source, deformated );
1571 msi_free( deformated );
1572 break;
1573 case 37: /* JScript/VBScript text stored in target column */
1574 case 38:
1575 rc = HANDLE_CustomType37_38( package, source, target, type, action );
1576 break;
1577 case 50: /* EXE file specified by a property value */
1578 rc = HANDLE_CustomType50( package, source, target, type, action );
1579 break;
1580 case 51: /* Property set with formatted text */
1581 if (!source) break;
1582 len = deformat_string( package, target, &deformated );
1583 rc = msi_set_property( package->db, source, deformated, len );
1584 if (rc == ERROR_SUCCESS && !wcscmp( source, L"SourceDir" )) msi_reset_source_folders( package );
1585 msi_free( deformated );
1586 break;
1587 case 53: /* JScript/VBScript text specified by a property value */
1588 case 54:
1589 rc = HANDLE_CustomType53_54( package, source, target, type, action );
1590 break;
1591 default:
1592 FIXME( "unhandled action type %u (%s %s)\n", type & CUSTOM_ACTION_TYPE_MASK, debugstr_w(source),
1593 debugstr_w(target) );
1594 }
1595
1596end:
1598 package->commit_action_running = FALSE;
1599 package->rollback_action_running = FALSE;
1600 msiobj_release(&row->hdr);
1601 return rc;
1602}
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define wcsrchr
Definition: compat.h:16
const WCHAR * action
Definition: action.c:7479
static UINT HANDLE_CustomType1(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:861
static UINT defer_custom_action(MSIPACKAGE *package, const WCHAR *action, UINT type)
Definition: custom.c:1423
static UINT HANDLE_CustomType7(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1122
#define CUSTOM_ACTION_TYPE_MASK
Definition: custom.c:51
static UINT HANDLE_CustomType37_38(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1271
static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR action, UINT options)
Definition: custom.c:142
static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1330
static UINT HANDLE_CustomType23(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1043
static UINT HANDLE_CustomType17(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:963
static UINT HANDLE_CustomType2(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:944
static void set_deferred_action_props(MSIPACKAGE *package, const WCHAR *deferred_data)
Definition: custom.c:199
static BOOL action_type_matches_script(UINT type, UINT script)
Definition: custom.c:1405
static UINT HANDLE_CustomType34(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1174
static UINT HANDLE_CustomType5_6(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1282
static UINT HANDLE_CustomType18(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:983
static UINT HANDLE_CustomType50(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1156
static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1389
static UINT HANDLE_CustomType19(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1001
DWORD deformat_string(MSIPACKAGE *package, const WCHAR *fmt, WCHAR **data)
Definition: format.c:1016
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, LPCWSTR szFolderPath)
Definition: install.c:564
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
GLenum target
Definition: glext.h:7315
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
@ msidbCustomActionTypeCommit
Definition: msidefs.h:137
@ msidbCustomActionTypeNoImpersonate
Definition: msidefs.h:139
@ msidbCustomActionTypeTSAware
Definition: msidefs.h:140
@ msidbCustomActionTypeRollback
Definition: msidefs.h:136
@ msidbCustomActionTypeInScript
Definition: msidefs.h:134
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100
MSIRECORD *WINAPIV MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
Definition: msiquery.c:201
static void msi_free(void *mem)
Definition: msipriv.h:1159
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
void msi_reset_source_folders(MSIPACKAGE *package) DECLSPEC_HIDDEN
Definition: package.c:2089
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2283
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
unsigned char commit_action_running
Definition: msipriv.h:467
unsigned char rollback_action_running
Definition: msipriv.h:468
enum script script
Definition: msipriv.h:432
unsigned char scheduled_action_running
Definition: msipriv.h:466
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by ACTION_HandleCustomAction().

◆ ACTION_DialogBox()

INT ACTION_DialogBox ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_DuplicateFiles()

UINT ACTION_DuplicateFiles ( MSIPACKAGE package)

Definition at line 1336 of file files.c.

1337{
1338 MSIQUERY *view;
1339 UINT rc;
1340
1341 if (package->script == SCRIPT_NONE)
1342 return msi_schedule_action(package, SCRIPT_INSTALL, L"DuplicateFiles");
1343
1344 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `DuplicateFile`", &view);
1345 if (rc != ERROR_SUCCESS)
1346 return ERROR_SUCCESS;
1347
1349 msiobj_release(&view->hdr);
1350 return rc;
1351}
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1275
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_FindRelatedProducts()

UINT ACTION_FindRelatedProducts ( MSIPACKAGE package)

Definition at line 217 of file upgrade.c.

218{
219 MSIQUERY *view;
220 UINT rc;
221
222 if (msi_get_property_int(package->db, L"Installed", 0))
223 {
224 TRACE("Skipping FindRelatedProducts action: product already installed\n");
225 return ERROR_SUCCESS;
226 }
227 if (msi_action_is_unique(package, L"FindRelatedProducts"))
228 {
229 TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n");
230 return ERROR_SUCCESS;
231 }
232 else
233 msi_register_unique_action(package, L"FindRelatedProducts");
234
235 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Upgrade`", &view);
236 if (rc != ERROR_SUCCESS)
237 return ERROR_SUCCESS;
238
240 msiobj_release(&view->hdr);
241 return rc;
242}
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
Definition: upgrade.c:115

◆ ACTION_FinishCustomActions()

void ACTION_FinishCustomActions ( const MSIPACKAGE package)

Definition at line 1604 of file custom.c.

1605{
1606 struct list *item;
1607 HANDLE *wait_handles;
1608 unsigned int handle_count, i;
1610
1611 while ((item = list_head( &package->RunningActions )))
1612 {
1614
1615 list_remove( &action->entry );
1616
1617 TRACE("waiting for %s\n", debugstr_w( action->name ) );
1619
1620 CloseHandle( action->handle );
1621 msi_free( action->name );
1622 msi_free( action );
1623 }
1624
1626
1627 handle_count = list_count( &msi_pending_custom_actions );
1628 wait_handles = msi_alloc( handle_count * sizeof(HANDLE) );
1629
1630 handle_count = 0;
1632 {
1633 if (info->package == package )
1634 {
1635 if (DuplicateHandle(GetCurrentProcess(), info->handle, GetCurrentProcess(), &wait_handles[handle_count], SYNCHRONIZE, FALSE, 0))
1636 handle_count++;
1637 }
1638 }
1639
1641
1642 for (i = 0; i < handle_count; i++)
1643 {
1644 msi_dialog_check_messages( wait_handles[i] );
1645 CloseHandle( wait_handles[i] );
1646 }
1647 msi_free( wait_handles );
1648
1651 {
1652 if (info->package == package)
1654 }
1656}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
Definition: list.h:37
#define CloseHandle
Definition: compat.h:739
#define GetCurrentProcess()
Definition: compat.h:759
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
Definition: handle.c:149
static struct list msi_pending_custom_actions
Definition: custom.c:73
static CRITICAL_SECTION msi_custom_action_cs
Definition: custom.c:63
static void free_custom_action_data(msi_custom_action_info *info)
Definition: custom.c:395
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:4069
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const char cursor[]
Definition: icontest.c:13
uint32_t entry
Definition: isohybrid.c:63
static ATOM item
Definition: dde.c:856
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
#define SYNCHRONIZE
Definition: nt_native.h:61
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
Definition: list.h:15
struct list RunningActions
Definition: msipriv.h:440
#define LIST_ENTRY(type)
Definition: queue.h:175
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by MSI_InstallPackage().

◆ ACTION_ForceReboot()

UINT ACTION_ForceReboot ( MSIPACKAGE package)

Definition at line 5183 of file action.c.

5184{
5185 WCHAR buffer[256], sysdir[MAX_PATH], squashed_pc[SQUASHED_GUID_SIZE];
5186 HKEY hkey;
5187
5188 squash_guid( package->ProductCode, squashed_pc );
5189
5190 GetSystemDirectoryW(sysdir, ARRAY_SIZE(sysdir));
5191 RegCreateKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce", &hkey);
5192 swprintf(buffer, ARRAY_SIZE(buffer), L"%s\\MsiExec.exe /@ \"%s\"", sysdir, squashed_pc);
5193
5194 msi_reg_set_val_str( hkey, squashed_pc, buffer );
5195 RegCloseKey(hkey);
5196
5197 TRACE("Reboot command %s\n",debugstr_w(buffer));
5198
5199 RegCreateKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\RunOnceEntries",
5200 &hkey);
5201 swprintf( buffer, ARRAY_SIZE(buffer), L"/I \"%s\" AFTERREBOOT=1 RUNONCEENTRY=\"%s\"", package->ProductCode,
5202 squashed_pc );
5203
5204 msi_reg_set_val_str( hkey, squashed_pc, buffer );
5205 RegCloseKey(hkey);
5206
5207 return ERROR_INSTALL_SUSPEND;
5208}
#define ARRAY_SIZE(A)
Definition: main.h:33
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1196
#define MAX_PATH
Definition: compat.h:34
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
#define swprintf
Definition: precomp.h:40
GLuint buffer
Definition: glext.h:5915
BOOL squash_guid(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
Definition: registry.c:74
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:734
LPWSTR ProductCode
Definition: msipriv.h:448
#define ERROR_INSTALL_SUSPEND
Definition: winerror.h:962
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by custom_get_thread_return(), and ITERATE_Actions().

◆ ACTION_InstallFiles()

UINT ACTION_InstallFiles ( MSIPACKAGE package)

Definition at line 556 of file files.c.

557{
559 UINT rc = ERROR_SUCCESS;
560 MSIFILE *file;
561
563
564 if (package->script == SCRIPT_NONE)
565 return msi_schedule_action(package, SCRIPT_INSTALL, L"InstallFiles");
566
567 schedule_install_files(package);
568 mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
569
571 {
572 BOOL is_global_assembly = msi_is_global_assembly( file->Component );
573
574 msi_file_update_ui( package, file, L"InstallFiles" );
575
576 rc = msi_load_media_info( package, file->Sequence, mi );
577 if (rc != ERROR_SUCCESS)
578 {
579 ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
581 goto done;
582 }
583
584 if (file->state != msifs_hashmatch &&
585 file->state != msifs_skipped &&
586 (file->state != msifs_present || !msi_get_property_int( package->db, L"Installed", 0 )) &&
587 (rc = ready_media( package, file->IsCompressed, mi )))
588 {
589 ERR("Failed to ready media for %s\n", debugstr_w(file->File));
590 goto done;
591 }
592
593 if (file->state != msifs_missing && !mi->is_continuous && file->state != msifs_overwrite)
594 continue;
595
596 if (file->Sequence > mi->last_sequence || mi->is_continuous ||
597 (file->IsCompressed && !mi->is_extracted))
598 {
601
602 data.mi = mi;
603 data.package = package;
605 data.user = &cursor;
606
607 if (file->IsCompressed && !msi_cabextract(package, mi, &data))
608 {
609 ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
611 goto done;
612 }
613 }
614
615 if (!file->IsCompressed)
616 {
618
619 TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath));
620
621 if (!is_global_assembly)
622 {
623 create_directory(package, file->Component->Directory);
624 }
625 rc = copy_install_file(package, file, source);
626 if (rc != ERROR_SUCCESS)
627 {
628 ERR("Failed to copy %s to %s (%u)\n", debugstr_w(source), debugstr_w(file->TargetPath), rc);
631 goto done;
632 }
633 if (!is_global_assembly) file->state = msifs_installed;
635 }
636 else if (!is_global_assembly && file->state != msifs_installed &&
637 !(file->Attributes & msidbFileAttributesPatchAdded))
638 {
639 ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
641 goto done;
642 }
643 }
645 {
646 MSICOMPONENT *comp = file->Component;
647
648 if (!msi_is_global_assembly( comp ) || comp->assembly->installed ||
649 (file->state != msifs_missing && file->state != msifs_overwrite)) continue;
650
651 rc = msi_install_assembly( package, comp );
652 if (rc != ERROR_SUCCESS)
653 {
654 ERR("Failed to install assembly\n");
656 break;
657 }
658 file->state = msifs_installed;
659 }
660
661done:
663 return rc;
664}
#define ERR(fmt,...)
Definition: debug.h:110
BOOL msi_is_global_assembly(MSICOMPONENT *comp)
Definition: action.c:2037
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
Definition: action.c:354
WCHAR * msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file)
Definition: files.c:528
static void msi_file_update_ui(MSIPACKAGE *package, MSIFILE *f, const WCHAR *action)
Definition: files.c:242
static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR filename, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:497
static UINT create_directory(MSIPACKAGE *package, const WCHAR *dir)
Definition: files.c:467
static void schedule_install_files(MSIPACKAGE *package)
Definition: files.c:379
static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
Definition: files.c:408
UINT ready_media(MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
Definition: media.c:850
void msi_free_media_info(MSIMEDIAINFO *mi)
Definition: media.c:661
BOOL msi_cabextract(MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
Definition: media.c:652
UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
Definition: media.c:689
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
UINT msi_install_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:411
@ msidbFileAttributesPatchAdded
Definition: msidefs.h:37
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
Definition: fci.c:127
BOOL installed
Definition: msipriv.h:518
MSIASSEMBLY * assembly
Definition: msipriv.h:540
struct list files
Definition: msipriv.h:403
static MONITORINFO mi
Definition: win.c:7338
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985

◆ ACTION_MoveFiles()

UINT ACTION_MoveFiles ( MSIPACKAGE package)

Definition at line 1206 of file files.c.

1207{
1208 MSIQUERY *view;
1209 UINT rc;
1210
1211 if (package->script == SCRIPT_NONE)
1212 return msi_schedule_action(package, SCRIPT_INSTALL, L"MoveFiles");
1213
1214 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `MoveFile`", &view);
1215 if (rc != ERROR_SUCCESS)
1216 return ERROR_SUCCESS;
1217
1219 msiobj_release(&view->hdr);
1220 return rc;
1221}
static UINT ITERATE_MoveFiles(MSIRECORD *rec, LPVOID param)
Definition: files.c:1080

◆ ACTION_MsiPublishAssemblies()

UINT ACTION_MsiPublishAssemblies ( MSIPACKAGE package)

Definition at line 595 of file assembly.c.

596{
597 MSICOMPONENT *comp;
598
599 if (package->script == SCRIPT_NONE)
600 return msi_schedule_action(package, SCRIPT_INSTALL, L"MsiPublishAssemblies");
601
603 {
604 LONG res;
605 HKEY hkey;
606 GUID guid;
607 DWORD size;
608 WCHAR buffer[43];
609 MSIRECORD *uirow;
611 BOOL win32;
612
613 if (!assembly || !comp->ComponentId) continue;
614
615 comp->Action = msi_get_component_action( package, comp );
616 if (comp->Action != INSTALLSTATE_LOCAL)
617 {
618 TRACE("component not scheduled for installation %s\n", debugstr_w(comp->Component));
619 continue;
620 }
621 TRACE("publishing %s\n", debugstr_w(comp->Component));
622
623 CLSIDFromString( package->ProductCode, &guid );
625 buffer[20] = '>';
628 buffer[42] = 0;
629
630 win32 = assembly->attributes & msidbAssemblyAttributesWin32;
631 if (assembly->application)
632 {
633 MSIFILE *file = msi_get_loaded_file( package, assembly->application );
634 if (!file)
635 {
636 WARN("no matching file %s for local assembly\n", debugstr_w(assembly->application));
637 continue;
638 }
639 if ((res = open_local_assembly_key( package->Context, win32, file->TargetPath, &hkey )))
640 {
641 WARN( "failed to open local assembly key %ld\n", res );
643 }
644 }
645 else
646 {
647 if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
648 {
649 WARN( "failed to open global assembly key %ld\n", res );
651 }
652 }
653 size = sizeof(buffer);
654 if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size )))
655 {
656 WARN( "failed to set assembly value %ld\n", res );
657 }
658 RegCloseKey( hkey );
659
660 uirow = MSI_CreateRecord( 2 );
661 MSI_RecordSetStringW( uirow, 2, assembly->display_name );
663 msiobj_release( &uirow->hdr );
664 }
665 return ERROR_SUCCESS;
666}
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4902
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:611
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:574
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
const GUID * guid
static LONG open_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename, HKEY *hkey)
Definition: assembly.c:535
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
Definition: assembly.c:575
@ INSTALLMESSAGE_ACTIONDATA
Definition: msi.h:103
@ INSTALLSTATE_LOCAL
Definition: msi.h:46
@ msidbAssemblyAttributesWin32
Definition: msidefs.h:216
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
BOOL encode_base85_guid(GUID *, LPWSTR) DECLSPEC_HIDDEN
Definition: registry.c:165
#define REG_MULTI_SZ
Definition: nt_native.h:1501
long LONG
Definition: pedump.c:60
LPWSTR Component
Definition: msipriv.h:525
INSTALLSTATE Action
Definition: msipriv.h:533
LPWSTR ComponentId
Definition: msipriv.h:526
struct list components
Definition: msipriv.h:401
UINT Context
Definition: msipriv.h:459
MSIOBJECTHDR hdr
Definition: msipriv.h:151
unsigned char BYTE
Definition: xxhash.c:193

◆ ACTION_MsiUnpublishAssemblies()

UINT ACTION_MsiUnpublishAssemblies ( MSIPACKAGE package)

Definition at line 668 of file assembly.c.

669{
670 MSICOMPONENT *comp;
671
672 if (package->script == SCRIPT_NONE)
673 return msi_schedule_action(package, SCRIPT_INSTALL, L"MsiUnpublishAssemblies");
674
676 {
677 LONG res;
678 MSIRECORD *uirow;
680 BOOL win32;
681
682 if (!assembly || !comp->ComponentId) continue;
683
684 comp->Action = msi_get_component_action( package, comp );
685 if (comp->Action != INSTALLSTATE_ABSENT)
686 {
687 TRACE("component not scheduled for removal %s\n", debugstr_w(comp->Component));
688 continue;
689 }
690 TRACE("unpublishing %s\n", debugstr_w(comp->Component));
691
692 win32 = assembly->attributes & msidbAssemblyAttributesWin32;
693 if (assembly->application)
694 {
695 MSIFILE *file = msi_get_loaded_file( package, assembly->application );
696 if (!file)
697 {
698 WARN("no matching file %s for local assembly\n", debugstr_w(assembly->application));
699 continue;
700 }
701 if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath )))
702 WARN( "failed to delete local assembly key %ld\n", res );
703 }
704 else
705 {
706 HKEY hkey;
707 if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
708 WARN( "failed to delete global assembly key %ld\n", res );
709 else
710 {
711 if ((res = RegDeleteValueW( hkey, assembly->display_name )))
712 WARN( "failed to delete global assembly value %ld\n", res );
713 RegCloseKey( hkey );
714 }
715 }
716
717 uirow = MSI_CreateRecord( 2 );
718 MSI_RecordSetStringW( uirow, 2, assembly->display_name );
720 msiobj_release( &uirow->hdr );
721 }
722 return ERROR_SUCCESS;
723}
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2352
static LONG delete_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename)
Definition: assembly.c:555
@ INSTALLSTATE_ABSENT
Definition: msi.h:45

◆ ACTION_PatchFiles()

UINT ACTION_PatchFiles ( MSIPACKAGE package)

Definition at line 784 of file files.c.

785{
786 MSIFILEPATCH *patch;
788 UINT rc = ERROR_SUCCESS;
789
790 TRACE("%p\n", package);
791
792 if (package->script == SCRIPT_NONE)
793 return msi_schedule_action(package, SCRIPT_INSTALL, L"PatchFiles");
794
795 mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
796
797 TRACE("extracting files\n");
798
800 {
801 MSIFILE *file = patch->File;
802 MSICOMPONENT *comp = file->Component;
803
804 rc = msi_load_media_info( package, patch->Sequence, mi );
805 if (rc != ERROR_SUCCESS)
806 {
807 ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
809 goto done;
810 }
811 comp->Action = msi_get_component_action( package, comp );
812 if (!comp->Enabled || comp->Action != INSTALLSTATE_LOCAL) continue;
813
814 if (!patch->extracted)
815 {
817 MSIFILEPATCH *cursor = patch;
818
819 rc = ready_media( package, TRUE, mi );
820 if (rc != ERROR_SUCCESS)
821 {
822 ERR("Failed to ready media for %s\n", debugstr_w(file->File));
823 goto done;
824 }
825 data.mi = mi;
826 data.package = package;
827 data.cb = patchfiles_cb;
828 data.user = &cursor;
829
830 if (!msi_cabextract( package, mi, &data ))
831 {
832 ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
834 goto done;
835 }
836 }
837 }
838
839 TRACE("applying patches\n");
840
842 {
843 MSICOMPONENT *comp = patch->File->Component;
844
845 if (!patch->path) continue;
846
847 if (msi_is_global_assembly( comp ))
848 rc = patch_assembly( package, comp->assembly, patch );
849 else
850 rc = patch_file( package, patch );
851
852 if (rc && !(patch->Attributes & msidbPatchAttributesNonVital))
853 {
854 ERR("Failed to apply patch to file: %s\n", debugstr_w(patch->File->File));
855 break;
856 }
857
858 if (msi_is_global_assembly( comp ))
859 {
860 if ((rc = msi_install_assembly( package, comp )))
861 {
862 ERR("Failed to install patched assembly\n");
863 break;
864 }
865 }
866 }
867
868done:
870 return rc;
871}
static UINT patch_assembly(MSIPACKAGE *package, MSIASSEMBLY *assembly, MSIFILEPATCH *patch)
Definition: files.c:734
static UINT patch_file(MSIPACKAGE *package, MSIFILEPATCH *patch)
Definition: files.c:712
static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:678
@ msidbPatchAttributesNonVital
Definition: msidefs.h:43
MSIFILE * File
Definition: msipriv.h:626
BOOL extracted
Definition: msipriv.h:630
WCHAR * path
Definition: msipriv.h:632
LPWSTR File
Definition: msipriv.h:606
MSICOMPONENT * Component
Definition: msipriv.h:607
struct list filepatches
Definition: msipriv.h:404

◆ ACTION_PerformAction()

UINT ACTION_PerformAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 7610 of file action.c.

7611{
7612 UINT rc;
7613
7614 TRACE("Performing action (%s)\n", debugstr_w(action));
7615
7616 package->action_progress_increment = 0;
7617 rc = ACTION_HandleStandardAction(package, action);
7618
7619 if (rc == ERROR_FUNCTION_NOT_CALLED)
7620 rc = ACTION_HandleCustomAction(package, action);
7621
7622 if (rc == ERROR_FUNCTION_NOT_CALLED)
7623 WARN("unhandled msi action %s\n", debugstr_w(action));
7624
7625 return rc;
7626}
static UINT ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:7567
static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:514
UINT action_progress_increment
Definition: msipriv.h:413

Referenced by ACTION_ExecuteAction(), ACTION_PerformActionSequence(), event_do_action(), execute_script(), ITERATE_Actions(), MSI_InstallPackage(), MsiCollectUserInfoA(), MsiCollectUserInfoW(), MsiConfigureFeatureW(), and MsiDoActionW().

◆ ACTION_RegisterClassInfo()

UINT ACTION_RegisterClassInfo ( MSIPACKAGE package)

Definition at line 690 of file classes.c.

691{
693 MSIRECORD *uirow;
694 HKEY hkey, hkey2, hkey3;
695 MSICLASS *cls;
696 UINT r;
697
698 if (package->script == SCRIPT_NONE)
699 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterClassInfo" );
700
701 r = load_classes_and_such( package );
702 if (r != ERROR_SUCCESS)
703 return r;
704
705 if (package->platform == PLATFORM_INTEL)
707 else
709
710 if (RegCreateKeyExW( HKEY_CLASSES_ROOT, L"CLSID", 0, NULL, 0, access, NULL, &hkey, NULL ))
712
713 LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
714 {
715 MSICOMPONENT *comp;
716 MSIFILE *file;
717 DWORD size;
718 LPWSTR argument;
720
721 comp = cls->Component;
722 if ( !comp )
723 continue;
724
725 if (!comp->Enabled)
726 {
727 TRACE("component is disabled\n");
728 continue;
729 }
730
731 feature = cls->Feature;
732 if (!feature)
733 continue;
734
735 feature->Action = msi_get_feature_action( package, feature );
736 if (feature->Action != INSTALLSTATE_LOCAL &&
738 {
739 TRACE("feature %s not scheduled for installation, skipping registration of class %s\n",
740 debugstr_w(feature->Feature), debugstr_w(cls->clsid));
741 continue;
742 }
743
744 if (!comp->KeyPath || !(file = msi_get_loaded_file( package, comp->KeyPath )))
745 {
746 TRACE("COM server not provided, skipping class %s\n", debugstr_w(cls->clsid));
747 continue;
748 }
749 TRACE("Registering class %s (%p)\n", debugstr_w(cls->clsid), cls);
750
752
753 RegCreateKeyW( hkey, cls->clsid, &hkey2 );
754
755 if (cls->Description)
756 msi_reg_set_val_str( hkey2, NULL, cls->Description );
757
758 RegCreateKeyW( hkey2, cls->Context, &hkey3 );
759
760 /*
761 * FIXME: Implement install on demand (advertised components).
762 *
763 * ole32.dll should call msi.MsiProvideComponentFromDescriptor()
764 * when it needs an InProcServer that doesn't exist.
765 * The component advertise string should be in the "InProcServer" value.
766 */
767 size = lstrlenW( file->TargetPath )+1;
768 if (cls->Argument)
769 size += lstrlenW(cls->Argument)+1;
770
771 argument = msi_alloc( size * sizeof(WCHAR) );
772 lstrcpyW( argument, file->TargetPath );
773
774 if (cls->Argument)
775 {
776 lstrcatW( argument, L" " );
777 lstrcatW( argument, cls->Argument );
778 }
779
780 msi_reg_set_val_str( hkey3, NULL, argument );
781 msi_free(argument);
782
783 RegCloseKey(hkey3);
784
785 if (cls->ProgID || cls->ProgIDText)
786 {
788
789 if (cls->ProgID)
790 progid = cls->ProgID->ProgID;
791 else
792 progid = cls->ProgIDText;
793
794 msi_reg_set_subkey_val( hkey2, L"ProgID", NULL, progid );
795
796 if (cls->ProgID && cls->ProgID->VersionInd)
797 {
798 msi_reg_set_subkey_val( hkey2, L"VersionIndependentProgID", NULL,
799 cls->ProgID->VersionInd->ProgID );
800 }
801 }
802
803 if (cls->AppID)
804 {
805 MSIAPPID *appid = cls->AppID;
806 msi_reg_set_val_str( hkey2, L"AppID", appid->AppID );
808 }
809
810 if (cls->IconPath)
811 msi_reg_set_subkey_val( hkey2, L"DefaultIcon", NULL, cls->IconPath );
812
813 if (cls->DefInprocHandler)
814 msi_reg_set_subkey_val( hkey2, L"InprocHandler", NULL, cls->DefInprocHandler );
815
816 if (cls->DefInprocHandler32)
817 msi_reg_set_subkey_val( hkey2, L"InprocHandler32", NULL, cls->DefInprocHandler32 );
818 RegCloseKey(hkey2);
819
820 /* if there is a FileTypeMask, register the FileType */
821 if (cls->FileTypeMask)
822 {
823 LPWSTR ptr, ptr2;
824 LPWSTR keyname;
825 INT index = 0;
826 ptr = cls->FileTypeMask;
827 while (ptr && *ptr)
828 {
829 ptr2 = wcschr(ptr,';');
830 if (ptr2)
831 *ptr2 = 0;
832 keyname = msi_alloc( (lstrlenW(L"FileType\\%s\\%d") + lstrlenW(cls->clsid) + 4) * sizeof(WCHAR));
833 swprintf( keyname, lstrlenW(L"FileType\\%s\\%d") + lstrlenW(cls->clsid) + 4,
834 L"FileType\\%s\\%d", cls->clsid, index );
835
837 msi_free(keyname);
838
839 if (ptr2)
840 ptr = ptr2+1;
841 else
842 ptr = NULL;
843
844 index ++;
845 }
846 }
847
848 uirow = MSI_CreateRecord(1);
849 MSI_RecordSetStringW( uirow, 1, cls->clsid );
851 msiobj_release(&uirow->hdr);
852 }
853 RegCloseKey(hkey);
854 return ERROR_SUCCESS;
855}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1091
#define wcschr
Definition: compat.h:17
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
INSTALLSTATE msi_get_feature_action(MSIPACKAGE *package, MSIFEATURE *feature)
Definition: action.c:627
#define progid(str)
Definition: exdisp.idl:31
GLuint index
Definition: glext.h:6031
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
char * appid
Definition: mkisofs.c:161
INTERNETFEATURELIST feature
Definition: misc.c:1719
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:631
static UINT register_appid(const MSIAPPID *appid, LPCWSTR app)
Definition: classes.c:659
@ INSTALLSTATE_ADVERTISED
Definition: msi.h:44
LONG msi_reg_set_subkey_val(HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val) DECLSPEC_HIDDEN
Definition: registry.c:230
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
LPWSTR clsid
Definition: msipriv.h:652
LPWSTR IconPath
Definition: msipriv.h:660
LPWSTR Argument
Definition: msipriv.h:663
LPWSTR ProgIDText
Definition: msipriv.h:656
INSTALLSTATE action
Definition: msipriv.h:667
LPWSTR DefInprocHandler
Definition: msipriv.h:661
MSIAPPID * AppID
Definition: msipriv.h:658
LPWSTR FileTypeMask
Definition: msipriv.h:659
LPWSTR Description
Definition: msipriv.h:657
LPWSTR DefInprocHandler32
Definition: msipriv.h:662
LPWSTR Context
Definition: msipriv.h:653
MSICOMPONENT * Component
Definition: msipriv.h:654
MSIFEATURE * Feature
Definition: msipriv.h:664
MSIPROGID * ProgID
Definition: msipriv.h:655
LPWSTR KeyPath
Definition: msipriv.h:530
struct list classes
Definition: msipriv.h:426
enum platform platform
Definition: msipriv.h:396
LPWSTR ProgID
Definition: msipriv.h:689
MSIPROGID * VersionInd
Definition: msipriv.h:696
int32_t INT
Definition: typedefs.h:58
ACCESS_MASK REGSAM
Definition: winreg.h:69
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define KEY_WOW64_32KEY
Definition: cmtypes.h:45
#define KEY_WOW64_64KEY
Definition: cmtypes.h:46
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ ACTION_RegisterExtensionInfo()

UINT ACTION_RegisterExtensionInfo ( MSIPACKAGE package)

Definition at line 1196 of file classes.c.

1197{
1198 HKEY hkey = NULL;
1200 MSIRECORD *uirow;
1201 BOOL install_on_demand = TRUE;
1202 LONG res;
1203 UINT r;
1204
1205 if (package->script == SCRIPT_NONE)
1206 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterExtensionInfo" );
1207
1208 r = load_classes_and_such( package );
1209 if (r != ERROR_SUCCESS)
1210 return r;
1211
1212 /* We need to set install_on_demand based on if the shell handles advertised
1213 * shortcuts and the like. Because Mike McCormack is working on this i am
1214 * going to default to TRUE
1215 */
1216
1218 {
1219 LPWSTR extension;
1221
1222 if (!ext->Component)
1223 continue;
1224
1225 if (!ext->Component->Enabled)
1226 {
1227 TRACE("component is disabled\n");
1228 continue;
1229 }
1230
1231 feature = ext->Feature;
1232 if (!feature)
1233 continue;
1234
1235 /*
1236 * yes. MSDN says that these are based on _Feature_ not on
1237 * Component. So verify the feature is to be installed
1238 */
1239 feature->Action = msi_get_feature_action( package, feature );
1240 if (feature->Action != INSTALLSTATE_LOCAL &&
1241 !(install_on_demand && feature->Action == INSTALLSTATE_ADVERTISED))
1242 {
1243 TRACE("feature %s not scheduled for installation, skipping registration of extension %s\n",
1244 debugstr_w(feature->Feature), debugstr_w(ext->Extension));
1245 continue;
1246 }
1247 TRACE("Registering extension %s (%p)\n", debugstr_w(ext->Extension), ext);
1248
1249 ext->action = INSTALLSTATE_LOCAL;
1250
1251 extension = msi_alloc( (lstrlenW( ext->Extension ) + 2) * sizeof(WCHAR) );
1252 if (extension)
1253 {
1254 extension[0] = '.';
1255 lstrcpyW( extension + 1, ext->Extension );
1256 res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey );
1257 msi_free( extension );
1258 if (res != ERROR_SUCCESS)
1259 WARN("failed to create extension key %ld\n", res);
1260 }
1261
1262 if (ext->Mime)
1263 msi_reg_set_val_str( hkey, L"Content Type", ext->Mime->ContentType );
1264
1265 if (ext->ProgID || ext->ProgIDText)
1266 {
1267 HKEY hkey2;
1268 LPWSTR newkey;
1270 MSIVERB *verb;
1271 INT Sequence = MSI_NULL_INTEGER;
1272
1273 if (ext->ProgID)
1274 progid = ext->ProgID->ProgID;
1275 else
1276 progid = ext->ProgIDText;
1277
1279
1280 newkey = msi_alloc( (lstrlenW(progid) + lstrlenW(L"\\ShellNew") + 1) * sizeof(WCHAR));
1281
1282 lstrcpyW(newkey, progid);
1283 lstrcatW(newkey, L"\\ShellNew");
1284 RegCreateKeyW(hkey, newkey, &hkey2);
1285 RegCloseKey(hkey2);
1286
1287 msi_free(newkey);
1288
1289 /* do all the verbs */
1290 LIST_FOR_EACH_ENTRY( verb, &ext->verbs, MSIVERB, entry )
1291 {
1292 register_verb( package, progid, ext->Component,
1293 ext, verb, &Sequence);
1294 }
1295 }
1296
1297 RegCloseKey(hkey);
1298
1299 uirow = MSI_CreateRecord(1);
1300 MSI_RecordSetStringW( uirow, 1, ext->Extension );
1302 msiobj_release(&uirow->hdr);
1303 }
1304 return ERROR_SUCCESS;
1305}
static const WCHAR *const ext[]
Definition: module.c:53
static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid, MSICOMPONENT *component, const MSIEXTENSION *extension, MSIVERB *verb, INT *Sequence)
Definition: classes.c:1124
#define MSI_NULL_INTEGER
Definition: msiquery.h:32
struct list extensions
Definition: msipriv.h:427

◆ ACTION_RegisterFonts()

UINT ACTION_RegisterFonts ( MSIPACKAGE package)

Definition at line 276 of file font.c.

277{
278 MSIQUERY *view;
279 UINT rc;
280
281 if (package->script == SCRIPT_NONE)
282 return msi_schedule_action(package, SCRIPT_INSTALL, L"RegisterFonts");
283
284 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Font`", &view);
285 if (rc != ERROR_SUCCESS)
286 return ERROR_SUCCESS;
287
289 msiobj_release(&view->hdr);
290 return rc;
291}
static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
Definition: font.c:212

◆ ACTION_RegisterMIMEInfo()

UINT ACTION_RegisterMIMEInfo ( MSIPACKAGE package)

Definition at line 1392 of file classes.c.

1393{
1394 MSIRECORD *uirow;
1395 MSIMIME *mt;
1396 UINT r;
1397
1398 if (package->script == SCRIPT_NONE)
1399 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterMIMEInfo" );
1400
1401 r = load_classes_and_such( package );
1402 if (r != ERROR_SUCCESS)
1403 return r;
1404
1405 LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
1406 {
1407 LPWSTR extension = NULL, key;
1408
1409 /*
1410 * check if the MIME is to be installed. Either as requested by an
1411 * extension or Class
1412 */
1413 if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) &&
1414 (!mt->Extension || mt->Extension->action != INSTALLSTATE_LOCAL))
1415 {
1416 TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType));
1417 continue;
1418 }
1419
1420 TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType));
1421
1422 if (mt->Extension) extension = msi_alloc( (lstrlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) );
1423 key = msi_alloc( (lstrlenW( mt->ContentType ) +
1424 lstrlenW( L"MIME\\Database\\Content Type\\" ) + 1) * sizeof(WCHAR) );
1425
1426 if (extension && key)
1427 {
1428 extension[0] = '.';
1429 lstrcpyW( extension + 1, mt->Extension->Extension );
1430
1431 lstrcpyW( key, L"MIME\\Database\\Content Type\\" );
1432 lstrcatW( key, mt->ContentType );
1433 msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, L"Extension", extension );
1434
1435 if (mt->clsid)
1437 }
1438 msi_free( extension );
1439 msi_free( key );
1440
1441 uirow = MSI_CreateRecord( 2 );
1442 MSI_RecordSetStringW( uirow, 1, mt->ContentType );
1443 MSI_RecordSetStringW( uirow, 2, mt->suffix );
1445 msiobj_release( &uirow->hdr );
1446 }
1447 return ERROR_SUCCESS;
1448}
Definition: copy.c:22
INSTALLSTATE action
Definition: msipriv.h:682
LPWSTR Extension
Definition: msipriv.h:675
MSIEXTENSION * Extension
Definition: msipriv.h:712
LPWSTR ContentType
Definition: msipriv.h:711
LPWSTR clsid
Definition: msipriv.h:714
MSICLASS * Class
Definition: msipriv.h:715
LPWSTR suffix
Definition: msipriv.h:713
struct list mimes
Definition: msipriv.h:429

◆ ACTION_RegisterProgIdInfo()

UINT ACTION_RegisterProgIdInfo ( MSIPACKAGE package)

Definition at line 1026 of file classes.c.

1027{
1029 MSIRECORD *uirow;
1030 UINT r;
1031
1032 if (package->script == SCRIPT_NONE)
1033 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterProgIdInfo" );
1034
1035 r = load_classes_and_such( package );
1036 if (r != ERROR_SUCCESS)
1037 return r;
1038
1040 {
1042 {
1043 TRACE("progid %s not scheduled to be installed\n", debugstr_w(progid->ProgID));
1044 continue;
1045 }
1046 TRACE("Registering progid %s\n", debugstr_w(progid->ProgID));
1047
1049
1050 uirow = MSI_CreateRecord( 1 );
1051 MSI_RecordSetStringW( uirow, 1, progid->ProgID );
1053 msiobj_release( &uirow->hdr );
1054 }
1055 return ERROR_SUCCESS;
1056}
static BOOL has_class_installed(const MSIPROGID *progid)
Definition: classes.c:1008
static BOOL has_one_extension_installed(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1015
static UINT register_progid(const MSIPROGID *progid)
Definition: classes.c:964
struct list progids
Definition: msipriv.h:428

◆ ACTION_RemoveDuplicateFiles()

UINT ACTION_RemoveDuplicateFiles ( MSIPACKAGE package)

Definition at line 1411 of file files.c.

1412{
1413 MSIQUERY *view;
1414 UINT rc;
1415
1416 if (package->script == SCRIPT_NONE)
1417 return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveDuplicateFiles");
1418
1419 rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `DuplicateFile`", &view );
1420 if (rc != ERROR_SUCCESS)
1421 return ERROR_SUCCESS;
1422
1424 msiobj_release( &view->hdr );
1425 return rc;
1426}
static UINT ITERATE_RemoveDuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1353

◆ ACTION_RemoveFiles()

UINT ACTION_RemoveFiles ( MSIPACKAGE package)

Definition at line 1549 of file files.c.

1550{
1551 MSIQUERY *view;
1552 MSICOMPONENT *comp;
1553 MSIFILE *file;
1554 UINT r;
1555
1556 if (package->script == SCRIPT_NONE)
1557 return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveFiles");
1558
1559 r = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `RemoveFile`", &view);
1560 if (r == ERROR_SUCCESS)
1561 {
1563 msiobj_release(&view->hdr);
1564 if (r != ERROR_SUCCESS)
1565 return r;
1566 }
1567
1569 {
1570 MSIRECORD *uirow;
1571 VS_FIXEDFILEINFO *ver;
1572
1573 comp = file->Component;
1574 msi_file_update_ui( package, file, L"RemoveFiles" );
1575
1576 comp->Action = msi_get_component_action( package, comp );
1578 continue;
1579
1580 if (comp->assembly && !comp->assembly->application)
1581 continue;
1582
1584 {
1585 TRACE("permanent component, not removing file\n");
1586 continue;
1587 }
1588
1589 if (file->Version)
1590 {
1591 ver = msi_get_disk_file_version( package, file->TargetPath );
1592 if (ver && msi_compare_file_versions( ver, file->Version ) > 0)
1593 {
1594 TRACE("newer version detected, not removing file\n");
1595 msi_free( ver );
1596 continue;
1597 }
1598 msi_free( ver );
1599 }
1600
1601 if (file->state == msifs_installed)
1602 WARN("removing installed file %s\n", debugstr_w(file->TargetPath));
1603
1604 TRACE("removing %s\n", debugstr_w(file->File) );
1605
1606 msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL );
1607 if (!msi_delete_file( package, file->TargetPath ))
1608 {
1609 WARN( "failed to delete %s (%lu)\n", debugstr_w(file->TargetPath), GetLastError() );
1610 }
1611 file->state = msifs_missing;
1612
1613 uirow = MSI_CreateRecord( 9 );
1614 MSI_RecordSetStringW( uirow, 1, file->FileName );
1615 MSI_RecordSetStringW( uirow, 9, comp->Directory );
1617 msiobj_release( &uirow->hdr );
1618 }
1619
1621 {
1622 comp->Action = msi_get_component_action( package, comp );
1623 if (comp->Action != INSTALLSTATE_ABSENT) continue;
1624
1626 {
1627 TRACE("permanent component, not removing directory\n");
1628 continue;
1629 }
1630 if (comp->assembly && !comp->assembly->application)
1631 msi_uninstall_assembly( package, comp );
1632 else
1633 {
1634 MSIFOLDER *folder = msi_get_loaded_folder( package, comp->Directory );
1635 if (folder) remove_folder( folder );
1636 }
1637 }
1638 return ERROR_SUCCESS;
1639}
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
int msi_compare_file_versions(VS_FIXEDFILEINFO *fi, const WCHAR *version)
Definition: action.c:1930
MSIFOLDER * msi_get_loaded_folder(MSIPACKAGE *package, const WCHAR *dir)
Definition: action.c:585
BOOL msi_set_file_attributes(MSIPACKAGE *package, const WCHAR *filename, DWORD attrs)
Definition: files.c:97
BOOL msi_delete_file(MSIPACKAGE *package, const WCHAR *filename)
Definition: files.c:70
VS_FIXEDFILEINFO * msi_get_disk_file_version(MSIPACKAGE *package, const WCHAR *filename)
Definition: files.c:161
static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1452
static void remove_folder(MSIFOLDER *folder)
Definition: files.c:1535
UINT msi_uninstall_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:456
@ INSTALLSTATE_SOURCE
Definition: msi.h:47
@ msidbComponentAttributesPermanent
Definition: msidefs.h:164
Definition: fci.c:116
LPWSTR application
Definition: msipriv.h:514
INSTALLSTATE Installed
Definition: msipriv.h:531
LPWSTR Directory
Definition: msipriv.h:527
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ ACTION_ShowDialog()

INT ACTION_ShowDialog ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_UnregisterClassInfo()

UINT ACTION_UnregisterClassInfo ( MSIPACKAGE package)

Definition at line 857 of file classes.c.

858{
860 MSIRECORD *uirow;
861 MSICLASS *cls;
862 HKEY hkey, hkey2;
863 UINT r;
864
865 if (package->script == SCRIPT_NONE)
866 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterClassInfo" );
867
868 r = load_classes_and_such( package );
869 if (r != ERROR_SUCCESS)
870 return r;
871
872 if (package->platform == PLATFORM_INTEL)
874 else
876
877 if (RegCreateKeyExW( HKEY_CLASSES_ROOT, L"CLSID", 0, NULL, 0, access, NULL, &hkey, NULL ))
879
880 LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
881 {
883 MSICOMPONENT *comp;
885 LONG res;
886
887 comp = cls->Component;
888 if (!comp)
889 continue;
890
891 if (!comp->Enabled)
892 {
893 TRACE("component is disabled\n");
894 continue;
895 }
896
897 feature = cls->Feature;
898 if (!feature)
899 continue;
900
901 feature->Action = msi_get_feature_action( package, feature );
902 if (feature->Action != INSTALLSTATE_ABSENT)
903 {
904 TRACE("feature %s not scheduled for removal, skipping unregistration of class %s\n",
905 debugstr_w(feature->Feature), debugstr_w(cls->clsid));
906 continue;
907 }
908 TRACE("Unregistering class %s (%p)\n", debugstr_w(cls->clsid), cls);
909
911
912 res = RegDeleteTreeW( hkey, cls->clsid );
913 if (res != ERROR_SUCCESS)
914 WARN("failed to delete class key %ld\n", res);
915
916 if (cls->AppID)
917 {
918 res = RegOpenKeyW( HKEY_CLASSES_ROOT, L"AppID", &hkey2 );
919 if (res == ERROR_SUCCESS)
920 {
921 res = RegDeleteKeyW( hkey2, cls->AppID->AppID );
922 if (res != ERROR_SUCCESS)
923 WARN("failed to delete appid key %ld\n", res);
924 RegCloseKey( hkey2 );
925 }
926 }
927 if (cls->FileTypeMask)
928 {
929 filetype = msi_alloc( (lstrlenW( L"FileType\\" ) + lstrlenW( cls->clsid ) + 1) * sizeof(WCHAR) );
930 if (filetype)
931 {
932 lstrcpyW( filetype, L"FileType\\" );
933 lstrcatW( filetype, cls->clsid );
936
937 if (res != ERROR_SUCCESS)
938 WARN("failed to delete file type %ld\n", res);
939 }
940 }
941
942 uirow = MSI_CreateRecord( 1 );
943 MSI_RecordSetStringW( uirow, 1, cls->clsid );
945 msiobj_release( &uirow->hdr );
946 }
947 RegCloseKey( hkey );
948 return ERROR_SUCCESS;
949}
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3288
LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
Definition: reg.c:1743
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1234
LOCAL char * filetype(int t)
Definition: tree.c:114
LPWSTR AppID
Definition: msipriv.h:638

◆ ACTION_UnregisterExtensionInfo()

UINT ACTION_UnregisterExtensionInfo ( MSIPACKAGE package)

Definition at line 1307 of file classes.c.

1308{
1310 MSIRECORD *uirow;
1311 LONG res;
1312 UINT r;
1313
1314 if (package->script == SCRIPT_NONE)
1315 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterExtensionInfo" );
1316
1317 r = load_classes_and_such( package );
1318 if (r != ERROR_SUCCESS)
1319 return r;
1320
1322 {
1323 LPWSTR extension;
1325
1326 if (!ext->Component)
1327 continue;
1328
1329 if (!ext->Component->Enabled)
1330 {
1331 TRACE("component is disabled\n");
1332 continue;
1333 }
1334
1335 feature = ext->Feature;
1336 if (!feature)
1337 continue;
1338
1339 feature->Action = msi_get_feature_action( package, feature );
1340 if (feature->Action != INSTALLSTATE_ABSENT)
1341 {
1342 TRACE("feature %s not scheduled for removal, skipping unregistration of extension %s\n",
1343 debugstr_w(feature->Feature), debugstr_w(ext->Extension));
1344 continue;
1345 }
1346 TRACE("Unregistering extension %s\n", debugstr_w(ext->Extension));
1347
1348 ext->action = INSTALLSTATE_ABSENT;
1349
1350 extension = msi_alloc( (lstrlenW( ext->Extension ) + 2) * sizeof(WCHAR) );
1351 if (extension)
1352 {
1353 extension[0] = '.';
1354 lstrcpyW( extension + 1, ext->Extension );
1355 res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
1356 msi_free( extension );
1357 if (res != ERROR_SUCCESS)
1358 WARN("failed to delete extension key %ld\n", res);
1359 }
1360
1361 if (ext->ProgID || ext->ProgIDText)
1362 {
1364 LPWSTR progid_shell;
1365
1366 if (ext->ProgID)
1367 progid = ext->ProgID->ProgID;
1368 else
1369 progid = ext->ProgIDText;
1370
1371 progid_shell = msi_alloc( (lstrlenW( progid ) + lstrlenW( L"\\shell" ) + 1) * sizeof(WCHAR) );
1372 if (progid_shell)
1373 {
1374 lstrcpyW( progid_shell, progid );
1375 lstrcatW( progid_shell, L"\\shell" );
1376 res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
1377 msi_free( progid_shell );
1378 if (res != ERROR_SUCCESS)
1379 WARN("failed to delete shell key %ld\n", res);
1381 }
1382 }
1383
1384 uirow = MSI_CreateRecord( 1 );
1385 MSI_RecordSetStringW( uirow, 1, ext->Extension );
1387 msiobj_release( &uirow->hdr );
1388 }
1389 return ERROR_SUCCESS;
1390}

◆ ACTION_UnregisterFonts()

UINT ACTION_UnregisterFonts ( MSIPACKAGE package)

Definition at line 357 of file font.c.

358{
359 MSIQUERY *view;
360 UINT r;
361
362 if (package->script == SCRIPT_NONE)
363 return msi_schedule_action(package, SCRIPT_INSTALL, L"UnregisterFonts");
364
365 r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Font`", &view );
366 if (r != ERROR_SUCCESS)
367 return ERROR_SUCCESS;
368
370 msiobj_release( &view->hdr );
371 return r;
372}
static UINT ITERATE_UnregisterFonts(MSIRECORD *row, LPVOID param)
Definition: font.c:293

◆ ACTION_UnregisterMIMEInfo()

UINT ACTION_UnregisterMIMEInfo ( MSIPACKAGE package)

Definition at line 1450 of file classes.c.

1451{
1452 MSIRECORD *uirow;
1453 MSIMIME *mime;
1454 UINT r;
1455
1456 if (package->script == SCRIPT_NONE)
1457 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterMIMEInfo" );
1458
1459 r = load_classes_and_such( package );
1460 if (r != ERROR_SUCCESS)
1461 return r;
1462
1464 {
1465 LONG res;
1466 LPWSTR mime_key;
1467
1468 if ((!mime->Class || mime->Class->action != INSTALLSTATE_ABSENT) &&
1469 (!mime->Extension || mime->Extension->action != INSTALLSTATE_ABSENT))
1470 {
1471 TRACE("MIME %s not scheduled to be removed\n", debugstr_w(mime->ContentType));
1472 continue;
1473 }
1474
1475 TRACE("Unregistering MIME type %s\n", debugstr_w(mime->ContentType));
1476
1477 mime_key = msi_alloc( (lstrlenW( L"MIME\\Database\\Content Type\\" ) +
1478 lstrlenW( mime->ContentType ) + 1) * sizeof(WCHAR) );
1479 if (mime_key)
1480 {
1481 lstrcpyW( mime_key, L"MIME\\Database\\Content Type\\" );
1482 lstrcatW( mime_key, mime->ContentType );
1483 res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key );
1484 if (res != ERROR_SUCCESS)
1485 WARN("failed to delete MIME key %ld\n", res);
1486 msi_free( mime_key );
1487 }
1488
1489 uirow = MSI_CreateRecord( 2 );
1490 MSI_RecordSetStringW( uirow, 1, mime->ContentType );
1491 MSI_RecordSetStringW( uirow, 2, mime->suffix );
1493 msiobj_release( &uirow->hdr );
1494 }
1495 return ERROR_SUCCESS;
1496}
const WCHAR * mime
Definition: mimefilter.c:512

◆ ACTION_UnregisterProgIdInfo()

UINT ACTION_UnregisterProgIdInfo ( MSIPACKAGE package)

Definition at line 1088 of file classes.c.

1089{
1091 MSIRECORD *uirow;
1092 LONG res;
1093 UINT r;
1094
1095 if (package->script == SCRIPT_NONE)
1096 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterProgIdInfo" );
1097
1098 r = load_classes_and_such( package );
1099 if (r != ERROR_SUCCESS)
1100 return r;
1101
1103 {
1104 if (!has_class_removed( progid ) ||
1105 (has_extensions( package, progid ) && !has_all_extensions_removed( package, progid )))
1106 {
1107 TRACE("progid %s not scheduled to be removed\n", debugstr_w(progid->ProgID));
1108 continue;
1109 }
1110 TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
1111
1113 if (res != ERROR_SUCCESS)
1114 TRACE("failed to delete progid key %ld\n", res);
1115
1116 uirow = MSI_CreateRecord( 1 );
1117 MSI_RecordSetStringW( uirow, 1, progid->ProgID );
1119 msiobj_release( &uirow->hdr );
1120 }
1121 return ERROR_SUCCESS;
1122}
static BOOL has_extensions(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1065
static BOOL has_all_extensions_removed(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1075
static BOOL has_class_removed(const MSIPROGID *progid)
Definition: classes.c:1058

◆ ACTION_UpdateComponentStates()

void ACTION_UpdateComponentStates ( MSIPACKAGE package,
MSIFEATURE feature 
)

Definition at line 833 of file install.c.

834{
835 INSTALLSTATE newstate;
836 ComponentList *cl;
837
838 newstate = feature->ActionRequest;
839 if (newstate == INSTALLSTATE_ABSENT) newstate = INSTALLSTATE_UNKNOWN;
840
842 {
843 MSICOMPONENT *component = cl->component;
844
845 if (!component->Enabled) continue;
846
847 TRACE("Modifying (%d): Component %s (Installed %d, Action %d, Request %d)\n",
848 newstate, debugstr_w(component->Component), component->Installed,
849 component->Action, component->ActionRequest);
850
851 if (newstate == INSTALLSTATE_LOCAL)
852 {
853 component->Action = INSTALLSTATE_LOCAL;
855 }
856 else
857 {
858 ComponentList *clist;
859 MSIFEATURE *f;
860
861 component->hasLocalFeature = FALSE;
862
863 component->Action = newstate;
864 component->ActionRequest = newstate;
865 /* if any other feature wants it local we need to set it local */
867 {
868 if ( f->ActionRequest != INSTALLSTATE_LOCAL &&
869 f->ActionRequest != INSTALLSTATE_SOURCE )
870 {
871 continue;
872 }
873 LIST_FOR_EACH_ENTRY(clist, &f->Components, ComponentList, entry)
874 {
875 if (clist->component == component &&
876 (f->ActionRequest == INSTALLSTATE_LOCAL ||
877 f->ActionRequest == INSTALLSTATE_SOURCE))
878 {
879 TRACE("Saved by %s\n", debugstr_w(f->Feature));
880 component->hasLocalFeature = TRUE;
881
883 {
884 if (f->Attributes & msidbFeatureAttributesFavorSource)
885 {
886 component->Action = INSTALLSTATE_SOURCE;
888 }
889 else
890 {
891 component->Action = INSTALLSTATE_LOCAL;
893 }
894 }
896 {
897 component->Action = INSTALLSTATE_SOURCE;
899 }
900 else
901 {
902 component->Action = INSTALLSTATE_LOCAL;
904 }
905 }
906 }
907 }
908 }
909 TRACE("Result (%d): Component %s (Installed %d, Action %d, Request %d)\n",
910 newstate, debugstr_w(component->Component), component->Installed,
911 component->Action, component->ActionRequest);
912 }
913}
GLfloat f
Definition: glext.h:7540
#define f
Definition: ke_i.h:83
@ INSTALLSTATE_UNKNOWN
Definition: msi.h:42
@ msidbComponentAttributesOptional
Definition: msidefs.h:161
@ msidbComponentAttributesSourceOnly
Definition: msidefs.h:160
@ msidbFeatureAttributesFavorSource
Definition: msidefs.h:149
MSICOMPONENT * component
Definition: msipriv.h:554
unsigned int hasLocalFeature
Definition: msipriv.h:545
INSTALLSTATE ActionRequest
Definition: msipriv.h:532
struct list features
Definition: msipriv.h:402
int INSTALLSTATE
Definition: winemsi.idl:31

Referenced by msi_seltree_update_feature_installstate(), and MSI_SetFeatureStateW().

◆ alloc_msi_remote_handle()

MSIHANDLE alloc_msi_remote_handle ( MSIHANDLE  remote)

Definition at line 135 of file handle.c.

136{
139
141
143 if (ret)
144 {
145 entry = &msihandletable[ ret - 1 ];
146 entry->u.rem = remote;
147 entry->dwThreadId = GetCurrentThreadId();
148 entry->remote = TRUE;
149 }
150
152
153 TRACE( "%lu -> %lu\n", remote, ret );
154
155 return ret;
156}
static MSIHANDLE alloc_handle_table_entry(void)
Definition: handle.c:80
static CRITICAL_SECTION MSI_handle_cs
Definition: handle.c:38
static msi_handle_info * msihandletable
Definition: handle.c:68
int ret
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
unsigned long MSIHANDLE
Definition: winemsi.idl:27

Referenced by __wine_msi_call_dll_function(), MsiDatabaseOpenViewW(), MsiGetActiveDatabase(), and MsiGetSummaryInformationW().

◆ alloc_msihandle()

◆ alloc_msiobject()

void * alloc_msiobject ( UINT  type,
UINT  size,
msihandledestructor  destroy 
)

Definition at line 201 of file handle.c.

202{
204
206 if( info )
207 {
208 info->magic = MSIHANDLE_MAGIC;
209 info->type = type;
210 info->refcount = 1;
211 info->destructor = destroy;
212 }
213
214 return info;
215}
void destroy(_Tp *__pointer)
Definition: _construct.h:278
#define MSIHANDLE_MAGIC
Definition: msipriv.h:736

Referenced by create_suminfo(), MSI_CreateRecord(), MSI_DatabaseOpenViewW(), MSI_EnableUIPreview(), and MSI_OpenDatabaseW().

◆ append_storage_to_db()

void append_storage_to_db ( MSIDATABASE db,
IStorage stg 
)

Definition at line 76 of file database.c.

77{
79
80 t = msi_alloc( sizeof *t );
81 t->stg = stg;
82 IStorage_AddRef( stg );
83 list_add_head( &db->transforms, &t->entry );
84}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
GLdouble GLdouble t
Definition: gl.h:2047
struct list transforms
Definition: msipriv.h:119

Referenced by msi_table_apply_transform().

◆ call_script()

DWORD call_script ( MSIHANDLE  hPackage,
INT  type,
LPCWSTR  script,
LPCWSTR  function,
LPCWSTR  action 
)

Definition at line 288 of file script.c.

289{
290 HRESULT hr;
291 IActiveScript *pActiveScript = NULL;
292 IActiveScriptParse *pActiveScriptParse = NULL;
293 MsiActiveScriptSite *scriptsite;
294 IDispatch *pDispatch = NULL;
295 DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
296 DISPID dispid;
297 CLSID clsid;
298 VARIANT var;
300
302
303 /* Create MsiActiveScriptSite object */
304 hr = create_activescriptsite(&scriptsite);
305 if (hr != S_OK) goto done;
306
307 /* Create an installer object */
308 hr = create_msiserver(NULL, (void**)&scriptsite->installer);
309 if (hr != S_OK) goto done;
310
311 /* Create a session object */
312 hr = create_session(hPackage, scriptsite->installer, &scriptsite->session);
313 if (hr != S_OK) goto done;
314
315 /* Create the scripting engine */
318 hr = CLSIDFromProgID(L"JScript", &clsid);
320 hr = CLSIDFromProgID(L"VBScript", &clsid);
321 else {
322 ERR("Unknown script type %d\n", type);
323 goto done;
324 }
325 if (FAILED(hr)) {
326 ERR("Could not find CLSID for Windows Script\n");
327 goto done;
328 }
329 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IActiveScript, (void **)&pActiveScript);
330 if (FAILED(hr)) {
331 ERR("Could not instantiate class for Windows Script\n");
332 goto done;
333 }
334
335 hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (void **)&pActiveScriptParse);
336 if (FAILED(hr)) goto done;
337
338 hr = IActiveScript_SetScriptSite(pActiveScript, &scriptsite->IActiveScriptSite_iface);
339 if (FAILED(hr)) goto done;
340
341 hr = IActiveScriptParse_InitNew(pActiveScriptParse);
342 if (FAILED(hr)) goto done;
343
344 hr = IActiveScript_AddNamedItem(pActiveScript, L"Session", SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE);
345 if (FAILED(hr)) goto done;
346
347 hr = IActiveScriptParse_ParseScriptText(pActiveScriptParse, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL);
348 if (FAILED(hr)) goto done;
349
350 hr = IActiveScript_SetScriptState(pActiveScript, SCRIPTSTATE_CONNECTED);
351 if (FAILED(hr)) goto done;
352
353 /* Call a function if necessary through the IDispatch interface */
354 if (function && function[0]) {
355 TRACE("Calling function %s\n", debugstr_w(function));
356
357 hr = IActiveScript_GetScriptDispatch(pActiveScript, NULL, &pDispatch);
358 if (FAILED(hr)) goto done;
359
360 hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, (WCHAR **)&function, 1,LOCALE_USER_DEFAULT, &dispid);
361 if (FAILED(hr)) goto done;
362
363 hr = IDispatch_Invoke(pDispatch, dispid, &IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &dispparamsNoArgs, &var, NULL, NULL);
364 if (FAILED(hr)) goto done;
365
366 hr = VariantChangeType(&var, &var, 0, VT_I4);
367 if (FAILED(hr)) goto done;
368
370
372 } else {
373 /* If no function to be called, MSI behavior is to succeed */
375 }
376
377done:
378
379 if (pDispatch) IDispatch_Release(pDispatch);
380 if (pActiveScript) IActiveScript_Release(pActiveScript);
381 if (pActiveScriptParse) IActiveScriptParse_Release(pActiveScriptParse);
382 if (scriptsite)
383 {
384 if (scriptsite->session) IDispatch_Release(scriptsite->session);
385 if (scriptsite->installer) IDispatch_Release(scriptsite->installer);
386 IActiveScriptSite_Release(&scriptsite->IActiveScriptSite_iface);
387 }
388 CoUninitialize(); /* must call even if CoInitialize failed */
389 return ret;
390}
@ SCRIPTSTATE_CONNECTED
Definition: activscp.idl:59
@ VT_I4
Definition: compat.h:2298
#define IActiveScriptParse_ParseScriptText
Definition: script.c:41
HRESULT create_session(MSIHANDLE msiHandle, IDispatch *installer, IDispatch **disp)
Definition: automation.c:2440
HRESULT create_msiserver(IUnknown *outer, void **ppObj)
Definition: automation.c:2421
#define IActiveScriptParse_InitNew
Definition: script.c:47
#define IActiveScriptParse_Release
Definition: script.c:46
static UINT map_return_value(LONG val)
Definition: script.c:271
static HRESULT create_activescriptsite(MsiActiveScriptSite **obj)
Definition: script.c:249
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
Definition: compobj.c:2602
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
const char * var
Definition: shader.c:5666
static VARIANTARG static DISPID
Definition: ordinal.c:52
REFCLSID clsid
Definition: msctf.c:82
@ msidbCustomActionTypeJScript
Definition: msidefs.h:119
@ msidbCustomActionTypeVBScript
Definition: msidefs.h:120
script
Definition: msipriv.h:383
struct stdole::DISPPARAMS DISPPARAMS
#define LOCALE_USER_DEFAULT
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_I4(A)
Definition: oleauto.h:247
#define IID_NULL
Definition: guiddef.h:98
HRESULT hr
Definition: shlfolder.c:183
IDispatch * installer
Definition: script.c:57
IDispatch * session
Definition: script.c:58
IActiveScriptSite IActiveScriptSite_iface
Definition: script.c:56
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

Referenced by ACTION_CallScript().

◆ copy_remote_record()

UINT copy_remote_record ( const struct wire_record rec,
MSIHANDLE  handle 
)

Definition at line 1052 of file record.c.

1053{
1054 MSIRECORD *rec;
1055 unsigned int i;
1057
1059 return ERROR_INVALID_HANDLE;
1060
1061 rec->cookie = in->cookie;
1062 for (i = 0; i <= in->count; i++)
1063 {
1064 switch (in->fields[i].type)
1065 {
1066 case MSIFIELD_NULL:
1067 MSI_FreeField(&rec->fields[i]);
1068 rec->fields[i].type = MSIFIELD_NULL;
1069 break;
1070 case MSIFIELD_INT:
1071 r = MSI_RecordSetInteger(rec, i, in->fields[i].u.iVal);
1072 break;
1073 case MSIFIELD_WSTR:
1074 r = MSI_RecordSetStringW(rec, i, in->fields[i].u.szwVal);
1075 break;
1076 case MSIFIELD_STREAM:
1077 r = MSI_RecordSetIStream(rec, i, in->fields[i].u.stream);
1078 break;
1079 default:
1080 ERR("invalid field type %d\n", in->fields[i].type);
1081 break;
1082 }
1083
1084 if (r)
1085 {
1086 msiobj_release(&rec->hdr);
1087 return r;
1088 }
1089 }
1090
1091 msiobj_release(&rec->hdr);
1092 return ERROR_SUCCESS;
1093}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
Definition: handle.c:158
UINT MSI_RecordSetStringW(MSIRECORD *rec, UINT iField, LPCWSTR szValue)
Definition: record.c:597
#define MSIFIELD_STREAM
Definition: record.c:47
UINT MSI_RecordSetInteger(MSIRECORD *rec, UINT iField, int iVal)
Definition: record.c:280
#define MSIFIELD_INT
Definition: record.c:45
#define MSIFIELD_WSTR
Definition: record.c:46
UINT MSI_RecordSetIStream(MSIRECORD *rec, UINT iField, IStream *stm)
Definition: record.c:836
#define MSIFIELD_NULL
Definition: record.c:44
static void MSI_FreeField(MSIFIELD *field)
Definition: record.c:49
GLuint in
Definition: glext.h:9616
#define MSIHANDLETYPE_RECORD
Definition: msipriv.h:725
static FILE * out
Definition: regtests2xml.c:44
UINT type
Definition: msipriv.h:139
MSIFIELD fields[1]
Definition: msipriv.h:154
UINT64 cookie
Definition: msipriv.h:153

Referenced by MsiViewModify(), and unmarshal_record().

◆ create_msiserver()

HRESULT create_msiserver ( IUnknown pOuter,
LPVOID ppObj 
)