Export (0) Print
Expand All
COM
Expand Minimize

CoRegisterSurrogate function

Registers the surrogate process through its ISurrogate interface pointer.

Syntax


HRESULT CoRegisterSurrogate(
  _In_  LPSURROGATE pSurrogate
);

Parameters

pSurrogate [in]

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

Return value

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.

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

ISurrogate
Writing a Custom Surrogate

 

 

Community Additions

ADD
Show:
© 2014 Microsoft