RegistrationClassContext RegistrationClassContext RegistrationClassContext RegistrationClassContext Enum


指定执行上下文集,类对象将在这些上下文中对请求构造实例的请求可用。Specifies the set of execution contexts in which a class object will be made available for requests to construct instances.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class RegistrationClassContext
public enum RegistrationClassContext
type RegistrationClassContext = 
Public Enum RegistrationClassContext


DisableActivateAsActivator DisableActivateAsActivator DisableActivateAsActivator DisableActivateAsActivator 32768

仅对此激活禁用“作为激活者激活”(AAA)。Disables activate-as-activator (AAA) activations for this activation only.

EnableActivateAsActivator EnableActivateAsActivator EnableActivateAsActivator EnableActivateAsActivator 65536

仅对此激活启用“作为激活者激活”(AAA)。Enables activate-as-activator (AAA) activations for this activation only.

EnableCodeDownload EnableCodeDownload EnableCodeDownload EnableCodeDownload 8192

允许从目录服务或 Internet 下载代码。Allows the downloading of code from the Directory Service or the Internet.

FromDefaultContext FromDefaultContext FromDefaultContext FromDefaultContext 131072

从当前单元的默认上下文开始此激活。Begin this activation from the default context of the current apartment.

InProcessHandler InProcessHandler InProcessHandler InProcessHandler 2

管理此类的对象的代码是一个进程内处理程序。The code that manages objects of this class is an in-process handler.

InProcessHandler16 InProcessHandler16 InProcessHandler16 InProcessHandler16 32

未使用。Not used.

InProcessServer InProcessServer InProcessServer InProcessServer 1

创建和管理此类的对象的代码是一个 DLL,它与指定类上下文的函数的调用方在同一个进程中运行。The code that creates and manages objects of this class is a DLL that runs in the same process as the caller of the function specifying the class context.

InProcessServer16 InProcessServer16 InProcessServer16 InProcessServer16 8

未使用。Not used.

LocalServer LocalServer LocalServer LocalServer 4

创建和管理此类的对象的 EXE 代码在同一台计算机上运行,但在一个单独的进程空间中加载。The EXE code that creates and manages objects of this class runs on same machine but is loaded in a separate process space.

NoCodeDownload NoCodeDownload NoCodeDownload NoCodeDownload 1024

不允许从目录服务或 Internet 下载代码。Disallows the downloading of code from the Directory Service or the Internet.

NoCustomMarshal NoCustomMarshal NoCustomMarshal NoCustomMarshal 4096

指定激活在使用自定义封送时是否会失败。Specifies whether activation fails if it uses custom marshaling.

NoFailureLog NoFailureLog NoFailureLog NoFailureLog 16384

重写对失败事件的日志记录。Overrides the logging of failures.

RemoteServer RemoteServer RemoteServer RemoteServer 16

远程计算机上下文。A remote machine context.

Reserved1 Reserved1 Reserved1 Reserved1 64

未使用。Not used.

Reserved2 Reserved2 Reserved2 Reserved2 128

未使用。Not used.

Reserved3 Reserved3 Reserved3 Reserved3 256

未使用。Not used.

Reserved4 Reserved4 Reserved4 Reserved4 512

未使用。Not used.

Reserved5 Reserved5 Reserved5 Reserved5 2048

未使用。Not used.


中的值RegistrationClassContext中使用枚举classContext参数的RegisterTypeForComClients方法。The values in the RegistrationClassContext enumeration are used in the classContext parameter of the RegisterTypeForComClients method. 这些值是在 COM 中定义的相同CLSCTX枚举,将其用作dwClsContext中对 COM API 的调用参数CoRegisterClassObjectThese values are the same as those defined in the COM CLSCTX enumeration, which is used as the dwClsContext parameter in calls to the COM API CoRegisterClassObject.

有关详细信息CoRegisterClassObjectCLSCTX枚举,请参阅 MSDN 库。For more information about CoRegisterClassObject and the CLSCTX enumeration, see the MSDN library.