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

Surrogate Sharing

· 52CE 我爱测

DLL servers will share a surrogate if they have matching security identities and share the same AppID value.

DLL servers will share a surrogate if they have matching security identities and share the same AppID value.

DLL servers are loaded, by default, into their own surrogate process. To load other DLL servers into an existing surrogate so that it supports more than one DLL server, there are two requirements:

  • The DLL servers must have the same AppID value.
  • The security context of the DLL servers must be the same.

If two DLL servers are to be launched under different security identities, they must be in different surrogates, whether their AppIDs match.

Following is an example of administering surrogate sharing with AppIDs:

    AppID
        {00001111-aaaa-2222-bbbb-3333cccc4444}
            @DllSurrogate    REG_SZ
    CLSID
        {12345678-0000-0000-0000-000000000001}
            @AppId    REG_SZ    {00001111-aaaa-2222-bbbb-3333cccc4444}
            InProcServer32
    @    REG_SZ    c:\myapp\comp1.dll
        {12345678-0000-0000-0000-000000000002}
            @AppId    REG_SZ    {00001111-aaaa-2222-bbbb-3333cccc4444}
            InProcServer32
    @    REG_SZ    c:\myapp\comp2.dll
 

The two CLSIDs for DLL components comp1.dll and comp2.dll have been configured to share an AppID. The AppID key specifies that the DLL server can be loaded in a surrogate by specifying the DllSurrogate value. In this example, the DllSurrogate value is an empty string, indicating that the default system implementation of the DLL surrogate should be used.

Related topics

DLL Server Requirements

Registering the DLL Server for Surrogate Activation

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)

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

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