Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ISurrogate interface

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

When to implement

If you are using the system-supplied surrogate, which implements this interface, you do not need to implement it as well. All surrogate processes must implement this interface, so if you are writing a custom surrogate, you must implement it along with IUnknown, IClassFactory, and IMarshal.

When to use

In general, you would not call the methods of ISurrogate directly. COM calls LoadDllServer when there is an activation request for a class registered with the DllSurrogate named-value. COM also calls FreeSurrogate when all DLL servers running in the surrogate have terminated.

Members

The ISurrogate interface inherits from the IUnknown interface. ISurrogate also has these types of members:

Methods

The ISurrogate interface has these methods.

MethodDescription
FreeSurrogate

Unloads a DLL server.

LoadDllServer

Loads a DLL server into the implementing surrogate.

 

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 | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_ISurrogate is defined as 00000022-0000-0000-C000-000000000046

See also

DLL Surrogates
Writing a Custom Surrogate

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.