Skip to content

Latest commit

 

History

History
83 lines (64 loc) · 2.78 KB

nf-combaseapi-coregistersurrogate.md

File metadata and controls

83 lines (64 loc) · 2.78 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:combaseapi.CoRegisterSurrogate
CoRegisterSurrogate function (combaseapi.h)
Registers the surrogate process through its ISurrogate interface pointer.
CoRegisterSurrogate
CoRegisterSurrogate function [COM]
_com_CoRegisterSurrogate
com.coregistersurrogate
combaseapi/CoRegisterSurrogate
com\coregistersurrogate.htm
com
4d1c6ca6-ab21-429c-9433-7c95d9e757b5
12/05/2018
CoRegisterSurrogate, CoRegisterSurrogate function [COM], _com_CoRegisterSurrogate, com.coregistersurrogate, combaseapi/CoRegisterSurrogate
combaseapi.h
Objbase.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Ole32.lib
Ole32.dll
Windows
19H1
CoRegisterSurrogate
combaseapi/CoRegisterSurrogate
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l1-1-0.dll
ComBase.dll
API-MS-Win-Core-Com-l1-1-1.dll
API-MS-Win-DownLevel-Ole32-l1-1-1.dll
CoRegisterSurrogate

CoRegisterSurrogate function

-description

Registers the surrogate process through its ISurrogate interface pointer.

-parameters

-param pSurrogate [in]

A pointer to the ISurrogate interface on the surrogate process to be registered.

-returns

This function returns S_OK to indicate that the surrogate process was registered successfully.

-remarks

The CoRegisterSurrogate function sets a global interface pointer to the ISurrogate interface implemented on the surrogate process. This pointer is set in the ole32 DLL loaded in the surrogate process. COM uses this global pointer in ole32 to call the methods of ISurrogate. This function is usually called by the surrogate implementation when it is launched.

As of Windows Server 2003, if a COM object application is registered as a service, COM verifies the registration. COM makes sure the process ID of the service, in the service control manager (SCM), matches the process ID of the registering process. If not, COM fails the registration.

-see-also

ISurrogate

Writing a Custom Surrogate