Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / InteropServices / ExtensibleClassFactory.cs / 1 / ExtensibleClassFactory.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: ExtensibleClassFactory
**
**
** Purpose: Methods used to customize the creation of managed objects that
** extend from unmanaged objects.
**
**
=============================================================================*/
namespace System.Runtime.InteropServices {
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.CompilerServices;
using System;
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ExtensibleClassFactory
{
// Prevent instantiation.
private ExtensibleClassFactory() {}
// Register a delegate that will be called whenever an instance of a managed
// type that extends from an unmanaged type needs to allocate the aggregated
// unmanaged object. This delegate is expected to allocate and aggregate the
// unmanaged object and is called in place of a CoCreateInstance. This
// routine must be called in the context of the static initializer for the
// class for which the callbacks will be made.
// It is not legal to register this callback from a class that has any
// parents that have already registered a callback.
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public static extern void RegisterObjectCreationCallback(ObjectCreationDelegate callback);
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlProcessingInstruction.cs
- DirectoryGroupQuery.cs
- COM2ExtendedBrowsingHandler.cs
- NodeInfo.cs
- RecipientInfo.cs
- InternalCache.cs
- Visual3D.cs
- DiagnosticsElement.cs
- FrameworkTextComposition.cs
- ListView.cs
- TextServicesDisplayAttribute.cs
- SmiMetaDataProperty.cs
- XmlC14NWriter.cs
- TextSpan.cs
- SHA256Managed.cs
- ColorTransformHelper.cs
- HotSpotCollection.cs
- DWriteFactory.cs
- SecurityResources.cs
- ProxyHwnd.cs
- IntSecurity.cs
- Soap12ServerProtocol.cs
- ServiceModelConfigurationSection.cs
- Util.cs
- assertwrapper.cs
- HtmlWindowCollection.cs
- UnknownBitmapEncoder.cs
- AbsoluteQuery.cs
- EventlogProvider.cs
- Freezable.cs
- HtmlInputText.cs
- XmlObjectSerializerReadContext.cs
- CharConverter.cs
- StaticSiteMapProvider.cs
- RuleConditionDialog.cs
- ZipIOCentralDirectoryFileHeader.cs
- WebPartConnectionsCloseVerb.cs
- TreeBuilder.cs
- HandlerFactoryWrapper.cs
- SoapObjectWriter.cs
- VerticalAlignConverter.cs
- ControlValuePropertyAttribute.cs
- PackWebRequest.cs
- FormParameter.cs
- Subset.cs
- GeometryDrawing.cs
- DialogResultConverter.cs
- AdRotator.cs
- MbpInfo.cs
- DBCSCodePageEncoding.cs
- SQLString.cs
- XmlDomTextWriter.cs
- List.cs
- DataKeyCollection.cs
- XmlDataCollection.cs
- CacheEntry.cs
- ThemeDictionaryExtension.cs
- PrimitiveType.cs
- DbFunctionCommandTree.cs
- PictureBox.cs
- Domain.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- IPEndPointCollection.cs
- LineProperties.cs
- XsltArgumentList.cs
- CellParagraph.cs
- XmlValidatingReader.cs
- KnownBoxes.cs
- XmlValidatingReaderImpl.cs
- Timer.cs
- _NegotiateClient.cs
- Part.cs
- IODescriptionAttribute.cs
- TextSelection.cs
- FormViewUpdatedEventArgs.cs
- NavigationFailedEventArgs.cs
- Span.cs
- RetriableClipboard.cs
- UIElement3DAutomationPeer.cs
- PageBorderless.cs
- NavigateEvent.cs
- FixedSOMPage.cs
- PermissionListSet.cs
- BorderSidesEditor.cs
- HtmlInputPassword.cs
- ProfilePropertyMetadata.cs
- DateTimeOffsetConverter.cs
- Comparer.cs
- XPathPatternBuilder.cs
- Expander.cs
- TemplateControlCodeDomTreeGenerator.cs
- Vector3DCollection.cs
- TreeNodeMouseHoverEvent.cs
- MsmqChannelFactory.cs
- MessageQueueTransaction.cs
- ShaderEffect.cs
- PKCS1MaskGenerationMethod.cs
- COM2ExtendedUITypeEditor.cs
- XmlILAnnotation.cs
- BooleanExpr.cs