CoInstall function

Installs the requested COM server application.

Syntax


HRESULT CoInstall(
  _In_ IBindCtx     *pbc,
  _In_ DWORD        dwFlags,
  _In_ uCLSSPEC     *pClassSpec,
  _In_ QUERYCONTEXT *pQuery,
  _In_ LPWSTR       pszCodeBase
);

Parameters

pbc [in]

This parameter is reserved and must be NULL.

dwFlags [in]

This parameter is reserved and must be 0.

pClassSpec [in]

A pointer to a uCLSSPEC structure. The tyspec member must be set to TYSPEC_CLSID and the clsid member must be set to the CLSID to be installed. For more information see TYSPEC.

pQuery [in]

A pointer to a QUERYCONTEXT structure. The dwContext member must be set to the desired CLSCTX value.

pszCodeBase [in]

This parameter is reserved and must be NULL.

Return value

This function can return the standard return value E_INVALIDARG, as well as the following values.

Return codeDescription
S_OK

Indicates success.

CS_E_PACKAGE_NOTFOUND

The tyspec member of pClassSpec was not set to TYSPEC_CLSID.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

QUERYCONTEXT
TYSPEC

 

 

Show: