📄 jwamsiquery.pas
字号:
// Set an internal install session boolean mode - Note: most modes are read-only
// Returns ERROR_SUCCESS if the mode can be set to the desired state
// Returns ERROR_ACCESS_DENIED if the mode is not settable
// Returns ERROR_INVALID_HANDLE if the handle is not an active install session
function MsiSetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE; fState: BOOL): UINT; stdcall;
{$EXTERNALSYM MsiSetMode}
// Format record data using a format string containing field markers and/or properties
// Record field 0 must contain the format string
// Other fields must contain data that may be referenced by the format string.
function MsiFormatRecordA(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPSTR;
var pcchResultBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiFormatRecordA}
function MsiFormatRecordW(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPWSTR;
var pcchResultBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiFormatRecordW}
{$IFDEF UNICODE}
function MsiFormatRecord(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPWSTR;
var pcchResultBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiFormatRecord}
{$ELSE}
function MsiFormatRecord(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPSTR;
var pcchResultBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiFormatRecord}
{$ENDIF}
// Execute another action, either built-in, custom, or UI wizard
// Returns ERROR_FUNCTION_NOT_CALLED if action not found
// Returns ERROR_SUCCESS if action completed succesfully
// Returns ERROR_INSTALL_USEREXIT if user cancelled during action
// Returns ERROR_INSTALL_FAILURE if action failed
// Returns ERROR_INSTALL_SUSPEND if user suspended installation
// Returns ERROR_MORE_DATA if action wishes to skip remaining actions
// Returns ERROR_INVALID_HANDLE_STATE if install session not active
// Returns ERROR_INVALID_DATA if failure calling custom action
// Returns ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER if arguments invalid
function MsiDoActionA(hInstall: MSIHANDLE; szAction: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiDoActionA}
function MsiDoActionW(hInstall: MSIHANDLE; szAction: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiDoActionW}
{$IFDEF UNICODE}
function MsiDoAction(hInstall: MSIHANDLE; szAction: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiDoAction}
{$ELSE}
function MsiDoAction(hInstall: MSIHANDLE; szAction: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiDoAction}
{$ENDIF}
// Execute another action sequence, as descibed in the specified table
// Returns the same error codes as MsiDoAction
function MsiSequenceA(hInstall: MSIHANDLE; szTable: LPCSTR; iSequenceMode: Integer): UINT; stdcall;
{$EXTERNALSYM MsiSequenceA}
function MsiSequenceW(hInstall: MSIHANDLE; szTable: LPCWSTR; iSequenceMode: Integer): UINT; stdcall;
{$EXTERNALSYM MsiSequenceW}
{$IFDEF UNICODE}
function MsiSequence(hInstall: MSIHANDLE; szTable: LPCWSTR; iSequenceMode: Integer): UINT; stdcall;
{$EXTERNALSYM MsiSequence}
{$ELSE}
function MsiSequence(hInstall: MSIHANDLE; szTable: LPCSTR; iSequenceMode: Integer): UINT; stdcall;
{$EXTERNALSYM MsiSequence}
{$ENDIF}
// Send an error record to the installer for processing.
// If field 0 (template) is not set, field 1 must be set to the error code,
// corresponding the the error message in the Error database table,
// and the message will be formatted using the template from the Error table
// before passing it to the UI handler for display.
// Returns Win32 button codes: IDOK IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO
// or 0 if no action taken, or -1 if invalid argument or handle
function MsiProcessMessage(hInstall: MSIHANDLE; eMessageType: INSTALLMESSAGE;
hRecord: MSIHANDLE): Integer; stdcall;
{$EXTERNALSYM MsiProcessMessage}
// Evaluate a conditional expression containing property names and values
function MsiEvaluateConditionA(hInstall: MSIHANDLE; szCondition: LPCSTR): MSICONDITION; stdcall;
{$EXTERNALSYM MsiEvaluateConditionA}
function MsiEvaluateConditionW(hInstall: MSIHANDLE; szCondition: LPCWSTR): MSICONDITION; stdcall;
{$EXTERNALSYM MsiEvaluateConditionW}
{$IFDEF UNICODE}
function MsiEvaluateCondition(hInstall: MSIHANDLE; szCondition: LPCWSTR): MSICONDITION; stdcall;
{$EXTERNALSYM MsiEvaluateCondition}
{$ELSE}
function MsiEvaluateCondition(hInstall: MSIHANDLE; szCondition: LPCSTR): MSICONDITION; stdcall;
{$EXTERNALSYM MsiEvaluateCondition}
{$ENDIF}
// Get the installed state and requested action state of a feature
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiGetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureStateA}
function MsiGetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureStateW}
{$IFDEF UNICODE}
function MsiGetFeatureState(hInstall: MSIHANDLE; szFeature: LPCWSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureState}
{$ELSE}
function MsiGetFeatureState(hInstall: MSIHANDLE; szFeature: LPCSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureState}
{$ENDIF}
// Request a feature to be set to a specified state
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiSetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureStateA}
function MsiSetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureStateW}
{$IFDEF UNICODE}
function MsiSetFeatureState(hInstall: MSIHANDLE; szFeature: LPCWSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureState}
{$ELSE}
function MsiSetFeatureState(hInstall: MSIHANDLE; szFeature: LPCSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureState}
{$ENDIF}
// Set the attribute bits of a specified feature at runtime.
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiSetFeatureAttributesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
dwAttributes: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureAttributesA}
function MsiSetFeatureAttributesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
dwAttributes: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureAttributesW}
{$IFDEF UNICODE}
function MsiSetFeatureAttributes(hInstall: MSIHANDLE; szFeature: LPCWSTR;
dwAttributes: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureAttributes}
{$ELSE}
function MsiSetFeatureAttributes(hInstall: MSIHANDLE; szFeature: LPCSTR;
dwAttributes: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiSetFeatureAttributes}
{$ENDIF}
// Get the installed state and requested action state of a component
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiGetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetComponentStateA}
function MsiGetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetComponentStateW}
{$IFDEF UNICODE}
function MsiGetComponentState(hInstall: MSIHANDLE; szComponent: LPCWSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetComponentState}
{$ELSE}
function MsiGetComponentState(hInstall: MSIHANDLE; szComponent: LPCSTR;
var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiGetComponentState}
{$ENDIF}
// Request a component to be set to a specified state
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiSetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetComponentStateA}
function MsiSetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetComponentStateW}
{$IFDEF UNICODE}
function MsiSetComponentState(hInstall: MSIHANDLE; szComponent: LPCWSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetComponentState}
{$ELSE}
function MsiSetComponentState(hInstall: MSIHANDLE; szComponent: LPCSTR;
iState: INSTALLSTATE): UINT; stdcall;
{$EXTERNALSYM MsiSetComponentState}
{$ENDIF}
// Return the disk cost for a feature and related features
// Can specify either current feature state or proposed state
// Can specify extent of related features to cost
// Note that adding costs for several features may produce an
// excessively large cost due to shared components and parents.
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiGetFeatureCostA(hInstall: MSIHANDLE; szFeature: LPCSTR;
iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureCostA}
function MsiGetFeatureCostW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureCostW}
{$IFDEF UNICODE}
function MsiGetFeatureCost(hInstall: MSIHANDLE; szFeature: LPCWSTR;
iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureCost}
{$ELSE}
function MsiGetFeatureCost(hInstall: MSIHANDLE; szFeature: LPCSTR;
iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureCost}
{$ENDIF}
// Enumerates the costs and temporary costs per drives for
// szComponent. If szComponent is set to NULL, it enumerates
// the above costs for the engine, per drives.
//
// The enumeration is 0-based, i.e. it returns the data for
// the first drive when called w/ dwIndex set to 0.
//
// Can specify either current feature state or proposed state.
//
// Execution of this function sets the error record, accessible
// via MsiGetLastErrorRecord.
function MsiEnumComponentCostsA(hInstall: MSIHANDLE; szComponent: LPCSTR; dwIndex: DWORD; iState: INSTALLSTATE;
szDriveBuf: LPSTR; var pcchDriveBuf: DWORD; var piCost: INT; piTempCost: INT): UINT; stdcall;
{$EXTERNALSYM MsiEnumComponentCostsA}
function MsiEnumComponentCostsW(hInstall: MSIHANDLE; szComponent: LPCWSTR; dwIndex: DWORD; iState: INSTALLSTATE;
szDriveBuf: LPWSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
{$EXTERNALSYM MsiEnumComponentCostsW}
{$IFDEF UNICODE}
function MsiEnumComponentCosts(hInstall: MSIHANDLE; szComponent: LPCWSTR; dwIndex: DWORD; iState: INSTALLSTATE;
szDriveBuf: LPWSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
{$EXTERNALSYM MsiEnumComponentCosts}
{$ELSE}
function MsiEnumComponentCosts(hInstall: MSIHANDLE; szComponent: LPCSTR; dwIndex: DWORD; iState: INSTALLSTATE;
szDriveBuf: LPSTR; var pcchDriveBuf: DWORD; var piCost: INT; piTempCost: INT): UINT; stdcall;
{$EXTERNALSYM MsiEnumComponentCosts}
{$ENDIF}
// Set the install level for a full product installation (not a feature request)
// Setting the value to 0 initialized components and features to the default level
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiSetInstallLevel(hInstall: MSIHANDLE; iInstallLevel: Integer): UINT; stdcall;
{$EXTERNALSYM MsiSetInstallLevel}
// Get the valid install states for a feature, represented by bit flags
// For each valid install state, a bit is set of value: (1 << INSTALLSTATE)
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiGetFeatureValidStatesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
var dwInstallStates: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureValidStatesA}
function MsiGetFeatureValidStatesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
var dwInstallStates: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureValidStatesW}
{$IFDEF UNICODE}
function MsiGetFeatureValidStates(hInstall: MSIHANDLE; szFeature: LPCWSTR;
var dwInstallStates: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureValidStates}
{$ELSE}
function MsiGetFeatureValidStates(hInstall: MSIHANDLE; szFeature: LPCSTR;
var dwInstallStates: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetFeatureValidStates}
{$ENDIF}
// Return the full source path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiGetSourcePathA(hInstall: MSIHANDLE; szFolder: LPCSTR; szPathBuf: LPSTR;
var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetSourcePathA}
function MsiGetSourcePathW(hInstall: MSIHANDLE; szFolder: LPCWSTR; szPathBuf: LPWSTR;
var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetSourcePathW}
{$IFDEF UNICODE}
function MsiGetSourcePath(hInstall: MSIHANDLE; szFolder: LPCWSTR; szPathBuf: LPWSTR;
var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetSourcePath}
{$ELSE}
function MsiGetSourcePath(hInstall: MSIHANDLE; szFolder: LPCSTR; szPathBuf: LPSTR;
var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetSourcePath}
{$ENDIF}
// Return the full target path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
function MsiGetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
szPathBuf: LPSTR; var pcchPathBuf: DWORD): UINT; stdcall;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -