User Guide

464
OLE Automation Function Reference
AddMergeModule
Adds a merge module to the specified feature and directory. You can add a merge
module to multiple features by making multiple calls to this function, with each call
adding the same module to a different feature. In the case of multiple features, the
szDirectory parameter is ignored after the first call for a particular module.
AddRegistryValue
Adds a registry key to a component or feature.
Function
Prototype
BOOL AddMergeModule(BSTR szMergeModulePathName, BSTR szFeatureName,BSTR
szDirectory)
Parameters szMergeModulePathName: path to module to add
szFeatureName: feature to which to add module
szDirectory: directory to which to convert module’s TARGETDIR
Return Value Nonzero if successful
Function
Prototype
BSTR AddRegistryValue(short sKeyRoot, BSTR szKey, BSTR szValueName,BSTR szData,
short sDataType, short sOperation,BSTR szFeatureComponent,short iType,BSTR
*szComponentKey)
Parameters SKeyRoot: specifies to which registry root to add key
-1 for HKEY_CURRENT_USER if per-user install, otherwise, HKEY_LOCAL_MACHINE
0 for HKEY_CLASSES_ROOT
1 for HKEY_CURRENT_USER
2 for HKEY_LOCAL_MACHINE
3 for HKEY_USERS
szKey: path of key
szValueName: registry value name
szData: new value of registry entry
sDataType:
0 for string
1 for expandable string
2 for integer
3 for binary
sOperation: if szData is empty, the following values are valid:
1 to have key created if absent
2 to have key and subkeys deleted on uninstall
3 to have key created if absent on install and deleted with subkeys on uninstall
szFeatureComponent: feature or component name to which to add key
iType:
0 for feature
1 for component
szComponentKey: [out parameter] component to which registry key is added
Return Value Key to new registry row