大网数据广告活动
Windows 系统接口

Registering the DLL Server for Surrogate Activation

· 52CE 我爱测

Registering the DLL Server for Surrogate Activation

A DLL server will be loaded into a surrogate process under the following conditions:

If there is a LocalServer, LocalServer32, or LocalService, indicating the existence of an EXE, the EXE server or service will always be launched in preference to loading a DLL server into a surrogate process.

The DllSurrogate named-value must be specified for surrogate activation to occur. Activation refers to calls to any of the following activation functions:

To launch an instance of the system-supplied surrogate, set the value of DllSurrogate either to an empty string or to NULL. To specify the launch of a custom surrogate, set the value to the path of the surrogate.

If both RemoteServerName and DllSurrogate are specified for the same AppID, the RemoteServerName value is ignored and the DllSurrogate value causes an activation on the local computer. For remote surrogate activation, specify RemoteServerName but not DllSurrogate on the client, and specify DllSurrogate on the server.

A DLL server that is designed to always run alone in its own surrogate process is best configured with an AppID equal its CLSID. Under AppID, simply specify a DllSurrogate named-value with an empty string value.

It is best to configure a DLL server that is designed to run alone in its own surrogate process and to service multiple clients across a network with a RunAs value specified under the AppID registry key. Whether the RunAs specifies "Interactive User" or a specific user identity depends upon the user interface, security, and other server requirements. When a RunAs value is specified, only one instance of the server is loaded to service all of the clients, regardless of the identity of the client. On the other hand, do not configure the server with RunAs if the intention is to have one instance of the DLL server running in surrogate to service each remote client identity.

Related topics

DLL Server Requirements

Surrogate Sharing

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。