ExtensibleClassFactory.RegisterObjectCreationCallback Metodo

Definizione

Registra un oggetto delegate che verrà chiamato quando un'istanza di un tipo gestito estesa da un tipo non gestito deve allocare l'oggetto aggregato non gestito.

public:
 static void RegisterObjectCreationCallback(System::Runtime::InteropServices::ObjectCreationDelegate ^ callback);
public static void RegisterObjectCreationCallback (System.Runtime.InteropServices.ObjectCreationDelegate callback);
static member RegisterObjectCreationCallback : System.Runtime.InteropServices.ObjectCreationDelegate -> unit
Public Shared Sub RegisterObjectCreationCallback (callback As ObjectCreationDelegate)

Parametri

callback
ObjectCreationDelegate

Oggetto delegate che viene chiamato al posto di CoCreateInstance.

Commenti

Alloca delegate e aggrega l'oggetto non gestito e viene chiamato al posto di CoCreateInstance. Deve delegate essere registrato nel contesto dell'inizializzatore static di classe per cui verranno eseguiti i callback.

Una sola classe in una gerarchia deve registrare un delegate callback.

Si applica a