ExtensibleClassFactory.RegisterObjectCreationCallback Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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.