Export (0) Print
Expand All

ExtensibleClassFactory.RegisterObjectCreationCallback Method

Registers a delegate that is called when an instance of a managed type, that extends from an unmanaged type, needs to allocate the aggregated unmanaged object.

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)

public static void RegisterObjectCreationCallback (
	ObjectCreationDelegate callback
)
public static void RegisterObjectCreationCallback (
	ObjectCreationDelegate callback
)
public static function RegisterObjectCreationCallback (
	callback : ObjectCreationDelegate
)

Parameters

callback

A delegate that is called in place of CoCreateInstance.

This delegate allocates and aggregates the unmanaged object and is called in place of CoCreateInstance. This delegate must be registered in the context of the static class initializer for which the callbacks will be made.

Only one class in an hierarchy should register a delegate callback.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft