ISurrogate interface

Used to dynamically load new DLL servers into an existing surrogate and free the surrogate when it is no longer needed.

Methods

The ISurrogate interface has these methods.

Method Description
ISurrogate::FreeSurrogate Unloads a DLL server.
ISurrogate::LoadDllServer Loads a DLL server into the implementing surrogate. COM calls this method when there is an activation request for the DLL server's class, if the class is registered as DllSurrogate.

Remarks

A surrogate is an EXE process into which a DLL server can be loaded to give the DLL server the advantages of an EXE server without the coding overhead. It can also allow independent DLL servers to be located together within a single process, reducing the total number of processes needed. DLL servers are easy to write using standard development tools, like Microsoft Visual Studio, and running them in a surrogate process provides the benefits of an executable implementation, including fault isolation, the ability to serve multiple clients simultaneously, and allowing the server to provide services to remote clients in a distributed environment.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header objidlbase.h (include ObjIdl.h)

See Also

DLL Surrogates

Writing a Custom Surrogate