- type
- The Type object to register for use from COM.
- classContext
- One of the System.Runtime.InteropServices.RegistrationClassContext values that indicates the context in which the executable code will be run.
- flags
- One of the System.Runtime.InteropServices.RegistrationConnectionType values that specifies how connections are made to the class object.
An integer that represents a cookie value.
This method is equivalent to calling CoRegisterClassObject in COM. The RegistrationServices.RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) method is not atomic and can cause unpredictable results when used in a multithreaded context.
In the .NET Framework version 2.0 and later, use the RegistrationServices.UnregisterTypeForComClients(int) method to unregister a type in COM.
Note that using platform invoke to call the unmanaged CoRegisterClassObject and CoDisconnectObject methods for registration and unregistration of COM objects is not supported.