﻿<?xml version="1.0" encoding="utf-8"?><Type Name="ExtensibleClassFactory" FullName="System.Runtime.InteropServices.ExtensibleClassFactory"><TypeSignature Maintainer="auto" Language="C#" Value="public sealed class ExtensibleClassFactory" /><TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ExtensibleClassFactory extends System.Object" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement><Base><BaseTypeName>System.Object</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The ExtensibleClassFactory allows users to specify a delegate that is called during construction of a runtime callable wrapper (RCW) that provides an instance of the underlying COM object. In effect, the callback acts as the class factory for the COM object wrapped by the RCW. Without the callback, the common language runtime creates the underlying COM object by calling CoCreateInstance. This callback provides an alternative way of activating the underlying object, such as with a COM moniker or by providing a singleton object. The <see cref="M:System.Runtime.InteropServices.ExtensibleClassFactory.RegisterObjectCreationCallback(System.Runtime.InteropServices.ObjectCreationDelegate)" /> method must be called in the static initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an IUnknown interface pointer for the base object.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Enables customization of managed objects that extend from unmanaged objects during creation.</para></summary></Docs><Members><Member MemberName="RegisterObjectCreationCallback"><MemberSignature Language="C#" Value="public static void RegisterObjectCreationCallback (System.Runtime.InteropServices.ObjectCreationDelegate callback);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig void RegisterObjectCreationCallback(class System.Runtime.InteropServices.ObjectCreationDelegate callback) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="callback" Type="System.Runtime.InteropServices.ObjectCreationDelegate" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>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.</para><para>Only one class in an hierarchy should register a delegate callback.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>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.</para></summary><param name="callback"><attribution license="cc4" from="Microsoft" modified="false" />A delegate that is called in place of CoCreateInstance. </param></Docs></Member></Members></Type>