📄 msiquery.h
字号:
#define MsiEvaluateCondition MsiEvaluateConditionA
#endif // !UNICODE
// Get the installed state and requested action state of a feature
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiGetFeatureStateA(MSIHANDLE hInstall,
LPCSTR szFeature, // feature name within product
INSTALLSTATE *piInstalled, // returned current install state
INSTALLSTATE *piAction); // action taken during install session
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall,
LPCWSTR szFeature, // feature name within product
INSTALLSTATE *piInstalled, // returned current install state
INSTALLSTATE *piAction); // action taken during install session
#ifdef UNICODE
#define MsiGetFeatureState MsiGetFeatureStateW
#else
#define MsiGetFeatureState MsiGetFeatureStateA
#endif // !UNICODE
// Request a feature to be set to a specified state
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiSetFeatureStateA(MSIHANDLE hInstall,
LPCSTR szFeature, // feature name within product
INSTALLSTATE iState); // requested state for feature
UINT WINAPI MsiSetFeatureStateW(MSIHANDLE hInstall,
LPCWSTR szFeature, // feature name within product
INSTALLSTATE iState); // requested state for feature
#ifdef UNICODE
#define MsiSetFeatureState MsiSetFeatureStateW
#else
#define MsiSetFeatureState MsiSetFeatureStateA
#endif // !UNICODE
#if (_WIN32_MSI >= 110)
// Set the attribute bits of a specified feature at runtime.
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiSetFeatureAttributesA(MSIHANDLE hInstall,
LPCSTR szFeature, // feature name within product
DWORD dwAttributes); // attributes bits to set for this feature
UINT WINAPI MsiSetFeatureAttributesW(MSIHANDLE hInstall,
LPCWSTR szFeature, // feature name within product
DWORD dwAttributes); // attributes bits to set for this feature
#ifdef UNICODE
#define MsiSetFeatureAttributes MsiSetFeatureAttributesW
#else
#define MsiSetFeatureAttributes MsiSetFeatureAttributesA
#endif // !UNICODE
#endif //(_WIN32_MSI >= 110)
// Get the installed state and requested action state of a component
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiGetComponentStateA(MSIHANDLE hInstall,
LPCSTR szComponent, // component name within product
INSTALLSTATE *piInstalled, // returned current install state
INSTALLSTATE *piAction); // action taken during install session
UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall,
LPCWSTR szComponent, // component name within product
INSTALLSTATE *piInstalled, // returned current install state
INSTALLSTATE *piAction); // action taken during install session
#ifdef UNICODE
#define MsiGetComponentState MsiGetComponentStateW
#else
#define MsiGetComponentState MsiGetComponentStateA
#endif // !UNICODE
// Request a component to be set to a specified state
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiSetComponentStateA(MSIHANDLE hInstall,
LPCSTR szComponent, // component name within product
INSTALLSTATE iState); // requested state for component
UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall,
LPCWSTR szComponent, // component name within product
INSTALLSTATE iState); // requested state for component
#ifdef UNICODE
#define MsiSetComponentState MsiSetComponentStateW
#else
#define MsiSetComponentState MsiSetComponentStateA
#endif // !UNICODE
// 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
UINT WINAPI MsiGetFeatureCostA(MSIHANDLE hInstall,
LPCSTR szFeature, // name of feature
MSICOSTTREE iCostTree, // portion of tree to cost
INSTALLSTATE iState, // requested state, or INSTALLSTATE_UNKNOWN
INT *piCost); // returned cost, in units of 512 bytes
UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall,
LPCWSTR szFeature, // name of feature
MSICOSTTREE iCostTree, // portion of tree to cost
INSTALLSTATE iState, // requested state, or INSTALLSTATE_UNKNOWN
INT *piCost); // returned cost, in units of 512 bytes
#ifdef UNICODE
#define MsiGetFeatureCost MsiGetFeatureCostW
#else
#define MsiGetFeatureCost MsiGetFeatureCostA
#endif // !UNICODE
// 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
UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall,
int iInstallLevel);
// 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
UINT WINAPI MsiGetFeatureValidStatesA(MSIHANDLE hInstall,
LPCSTR szFeature,
DWORD *dwInstallStates);
UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE hInstall,
LPCWSTR szFeature,
DWORD *dwInstallStates);
#ifdef UNICODE
#define MsiGetFeatureValidStates MsiGetFeatureValidStatesW
#else
#define MsiGetFeatureValidStates MsiGetFeatureValidStatesA
#endif // !UNICODE
// Return the full source path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiGetSourcePathA(MSIHANDLE hInstall,
LPCSTR szFolder, // folder identifier, primary key into Directory table
LPSTR szPathBuf, // buffer to return full path
DWORD *pcchPathBuf); // in/out buffer character count
UINT WINAPI MsiGetSourcePathW(MSIHANDLE hInstall,
LPCWSTR szFolder, // folder identifier, primary key into Directory table
LPWSTR szPathBuf, // buffer to return full path
DWORD *pcchPathBuf); // in/out buffer character count
#ifdef UNICODE
#define MsiGetSourcePath MsiGetSourcePathW
#else
#define MsiGetSourcePath MsiGetSourcePathA
#endif // !UNICODE
// Return the full target path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiGetTargetPathA(MSIHANDLE hInstall,
LPCSTR szFolder, // folder identifier, primary key into Directory table
LPSTR szPathBuf, // buffer to return full path
DWORD *pcchPathBuf); // in/out buffer character count
UINT WINAPI MsiGetTargetPathW(MSIHANDLE hInstall,
LPCWSTR szFolder, // folder identifier, primary key into Directory table
LPWSTR szPathBuf, // buffer to return full path
DWORD *pcchPathBuf); // in/out buffer character count
#ifdef UNICODE
#define MsiGetTargetPath MsiGetTargetPathW
#else
#define MsiGetTargetPath MsiGetTargetPathA
#endif // !UNICODE
// Set the full target path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
UINT WINAPI MsiSetTargetPathA(MSIHANDLE hInstall,
LPCSTR szFolder, // folder identifier, primary key into Directory table
LPCSTR szFolderPath); // full path for folder, ending in directory separator
UINT WINAPI MsiSetTargetPathW(MSIHANDLE hInstall,
LPCWSTR szFolder, // folder identifier, primary key into Directory table
LPCWSTR szFolderPath); // full path for folder, ending in directory separator
#ifdef UNICODE
#define MsiSetTargetPath MsiSetTargetPathW
#else
#define MsiSetTargetPath MsiSetTargetPathA
#endif // !UNICODE
// Check to see if sufficent disk space is present for the current installation
// Returns ERROR_SUCCESS, ERROR_DISK_FULL, ERROR_INVALID_HANDLE_STATE, or ERROR_INVALID_HANDLE
UINT WINAPI MsiVerifyDiskSpace(MSIHANDLE hInstall);
// --------------------------------------------------------------------------
// Functions for rendering UI dialogs from the database representations.
// Purpose is for product development, not for use during installation.
// --------------------------------------------------------------------------
// Enable UI in preview mode to facilitate authoring of UI dialogs.
// The preview mode will end when the handle is closed.
UINT WINAPI MsiEnableUIPreview(MSIHANDLE hDatabase,
MSIHANDLE* phPreview); // returned handle for UI preview capability
// Display any UI dialog as modeless and inactive.
// Supplying a null name will remove any current dialog.
UINT WINAPI MsiPreviewDialogA(MSIHANDLE hPreview,
LPCSTR szDialogName); // dialog to display, Dialog table key
UINT WINAPI MsiPreviewDialogW(MSIHANDLE hPreview,
LPCWSTR szDialogName); // dialog to display, Dialog table key
#ifdef UNICODE
#define MsiPreviewDialog MsiPreviewDialogW
#else
#define MsiPreviewDialog MsiPreviewDialogA
#endif // !UNICODE
// Display a billboard within a host control in the displayed dialog.
// Supplying a null billboard name will remove any billboard displayed.
UINT WINAPI MsiPreviewBillboardA(MSIHANDLE hPreview,
LPCSTR szControlName, // name of control that accepts billboards
LPCSTR szBillboard); // name of billboard to display
UINT WINAPI MsiPreviewBillboardW(MSIHANDLE hPreview,
LPCWSTR szControlName, // name of control that accepts billboards
LPCWSTR szBillboard); // name of billboard to display
#ifdef UNICODE
#define MsiPreviewBillboard MsiPreviewBillboardW
#else
#define MsiPreviewBillboard MsiPreviewBillboardA
#endif // !UNICODE
// Fetch the next sequential record from the view
// Result is ERROR_SUCCESS if a row is found, and its handle is returned
// else ERROR_NO_DATA if no records remain, and a null handle is returned
// else result is error: ERROR_INVALID_HANDLE_STATE, ERROR_INVALID_HANDLE, ERROR_GEN_FAILURE
// --------------------------------------------------------------------------
// Error handling not associated with any particular object
// --------------------------------------------------------------------------
// Return a record handle to the last function that generated an error record
// Only specified functions will set the error record, or clear it if success
// Field 1 of the record will contain the internal MSI error code
// Other fields will contain data specific to the particular error
// The error record is released internally after this function is executed
MSIHANDLE WINAPI MsiGetLastErrorRecord(); // returns 0 if no cached record
#ifdef __cplusplus
}
#endif
#pragma option pop /*P_O_Pop*/
#endif // _MSIQUERY_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -