Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 1.1
.NET Framework
Reference
Class Library
Methods
 RegisterObjectCreationCallback Meth...
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
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.

[Visual Basic]
Public Shared Sub RegisterObjectCreationCallback( _
   ByVal callback As ObjectCreationDelegate _
)
[C#]
public static void RegisterObjectCreationCallback(
 ObjectCreationDelegate callback
);
[C++]
public: static void RegisterObjectCreationCallback(
 ObjectCreationDelegate* callback
);
[JScript]
public static function RegisterObjectCreationCallback(
   callback : ObjectCreationDelegate
);

Parameters

callback
A delegate that is called in place of CoCreateInstance.

Remarks

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 (Shared in Visual Basic) class initializer for which the callbacks will be made.

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ExtensibleClassFactory Class | ExtensibleClassFactory Members | System.Runtime.InteropServices Namespace

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker