CoInstall function (objbase.h)

[This function is not supported and may be altered or unavailable in the future.]

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

[in] pbc

Reserved for future use; this value must be NULL.

[in] dwFlags

Reserved for future use; this value must be 0.

[in] pClassSpec

A pointer to a uCLSSPEC union. 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.

[in] pQuery

A pointer to a QUERYCONTEXT structure. The dwContext field must be set to the desired CLSCTX value. For more information, see QUERYCONTEXT.

[in] pszCodeBase

Reserved for future use; this value must be NULL.

Return value

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

Term Description
S_OK Indicates success.
CS_E_PACKAGE_NOTFOUND The tyspec field of pClassSpec was not set to TYSPEC_CLSID.

Requirements

Requirement Value
Target Platform Windows
Header objbase.h
Library Ole32.lib
DLL Ole32.dll

See also

QUERYCONTEXT

TYSPEC