ICoCreateLocally::CoCreateLocally
Clients call ICoCreateLocally::CoCreateLocally to create a helper object in the same context as the server object. This allows clients to increase performance because they are running in the server application.
HRESULT CoCreateLocally(
REFCLSIDrclsid,DWORDdwClsContext,REFIIDriid,IUnknown* punk,REFIIDriidParam,IUnknown* punkParam,VARIANTvarParam);
Parameters
- rclsid
[in] Class identifier of the object to be created locally. - dwClsContext
[in] Context in which the helper object should run. This is usually CLSCTX_INPROC_SERVER. - riid
[in] The desired interface identifier (IID). - punk
[out] Interface pointer to the desired interface identifier (from riid). - riidParam
[in] An optional interface parameter that is passed to the new helper object. This parameter specifies an interface identifier. - punkParam
[in] An optional interface parameter that is passed to the new helper object. This parameter specifies the interface pointer. - varParam
[in] An optional interface parameter that is passed to the new helper object.
Return Values
If successful, returns S_OK.
If not successful, returns the following value or another standard COM error code.
Error | Description |
---|---|
E_ACCESSDENIED | The client does not have sufficient permissions to create this object in the server process. |
Requirements
** Windows NT/2000/XP/Server 2003:** Included in Windows XP and Windows Server 2003.
** Windows 95/98/Me:** Unsupported.
** Redistributable:** Requires Active Accessibility 2.0 RDK on Windows NT 4.0 SP6 and Windows 98.
** Header:** Declared in Msaatext.h.