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
- DataGridTablesFactory.cs
- OrderByLifter.cs
- ByteStream.cs
- InputLanguageManager.cs
- NativeRightsManagementAPIsStructures.cs
- XmlSortKeyAccumulator.cs
- PrintingPermission.cs
- SerTrace.cs
- BitmapEffect.cs
- WindowsListViewItemCheckBox.cs
- GlyphShapingProperties.cs
- SolidColorBrush.cs
- IsolatedStorageFilePermission.cs
- HistoryEventArgs.cs
- XmlSchemaSimpleTypeUnion.cs
- RoleBoolean.cs
- FileDetails.cs
- TableDesigner.cs
- XmlNamespaceDeclarationsAttribute.cs
- ItemContainerProviderWrapper.cs
- EncryptedKey.cs
- XmlEnumAttribute.cs
- RadioButtonFlatAdapter.cs
- TypeBuilderInstantiation.cs
- XmlBinaryReader.cs
- LocalizationComments.cs
- SchemaImporterExtensionElement.cs
- EdmItemError.cs
- TagMapCollection.cs
- NameGenerator.cs
- AttributeQuery.cs
- BindingMemberInfo.cs
- EventTask.cs
- SingleQueryOperator.cs
- FilterableData.cs
- ProjectionCamera.cs
- CodeTypeOfExpression.cs
- SrgsElementList.cs
- MappingItemCollection.cs
- TreeWalkHelper.cs
- metadatamappinghashervisitor.cs
- TemplatePartAttribute.cs
- UnionCqlBlock.cs
- ConnectionProviderAttribute.cs
- AspNetSynchronizationContext.cs
- ResourceLoader.cs
- _ConnectStream.cs
- ScrollBar.cs
- NativeMethods.cs
- ListSortDescriptionCollection.cs
- BigInt.cs
- PreservationFileReader.cs
- VisualSerializer.cs
- InternalConfigEventArgs.cs
- IndexedSelectQueryOperator.cs
- GridViewUpdateEventArgs.cs
- AutomationElementCollection.cs
- XmlAnyAttributeAttribute.cs
- QuaternionConverter.cs
- TemplateXamlParser.cs
- FontEmbeddingManager.cs
- ChangeConflicts.cs
- ClientConfigurationSystem.cs
- XmlElementList.cs
- Win32.cs
- ElementNotEnabledException.cs
- Symbol.cs
- DataGridViewMethods.cs
- ListViewItem.cs
- SByte.cs
- ComponentConverter.cs
- ApplicationBuildProvider.cs
- HyperLinkDataBindingHandler.cs
- TrackBar.cs
- CodeSnippetStatement.cs
- ComPlusContractBehavior.cs
- XmlElementAttributes.cs
- StringConverter.cs
- _OverlappedAsyncResult.cs
- DataGridViewLinkColumn.cs
- ManifestResourceInfo.cs
- RuntimeTransactionHandle.cs
- Point.cs
- ErrorTolerantObjectWriter.cs
- WhitespaceSignificantCollectionAttribute.cs
- X509ChainElement.cs
- MouseDevice.cs
- PanelStyle.cs
- JsonClassDataContract.cs
- SecurityPermission.cs
- QilTargetType.cs
- ZipIOExtraFieldPaddingElement.cs
- QueryParameter.cs
- SmiTypedGetterSetter.cs
- CfgArc.cs
- LambdaReference.cs
- XPathDocumentNavigator.cs
- XsltQilFactory.cs
- EventWaitHandle.cs
- DiscoveryClientDuplexChannel.cs