User Guide
461
OLE Automation Function Reference
AddComponent
Adds a component to the installation. You can specify the directory, condition, and
attributes of the new component.
AddComponentToFeature
Assigns the given component to the given feature.
Parameters strFeature: name of the feature to add the MTS/COM+ application to
strName: MTS/COM+ application name or ID
bServer: TRUE to install the server portion of the MTS/COM+ application; FALSE to install
the client portion
strRemoteServerName: for a client installation, the name of the computer on the network
that contains the MTS/COM+ server application to which the client connects
Attr: sets attributes of the COM+ application
2 for a client install
4 to not refresh on compile
8 to use existing source paths
Return Value TRUE if successful; FALSE if not
Function
Prototype
BOOL AddComponent(BSTR szComponent, BSTR szDirectory, BSTR szCondition, short
iAttributes)
Parameters szComponent: new component name
szDirectory: key to directory table or destination directory path to assign to the
component
szCondition: condition that must be valid for the component to install
iAttributes: ORed values of:
0 cannot be run from source
1 can only be run from source
2 can be run from source or locally
4 key path is for registry
8 increment shared .DLL reference count of keypath .DLL
16 component is not removed during uninstall
32 keypath is an ODBC datasource
64 component is transitive
128 never overwrite if keypath already exists
Default value created in user interface is 0
Return Value Nonzero if successful
Function
Prototype
BOOL AddComponentToFeature(BSTR szComponent, BSTR szFeature)
Parameters szComponent: component name to add to a feature
szFeature: feature to which to add component
Return Value Nonzero if successful