Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / InteropServices / ExtensibleClassFactory.cs / 1305376 / 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.Runtime.Versioning;
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.
[System.Security.SecuritySafeCritical] // auto-generated
[ResourceExposure(ResourceScope.None)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public static extern void RegisterObjectCreationCallback(ObjectCreationDelegate callback);
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FakeModelItemImpl.cs
- ExpressionConverter.cs
- StatusBarItem.cs
- PointLightBase.cs
- JavaScriptObjectDeserializer.cs
- ViewBox.cs
- SplayTreeNode.cs
- TextEditorParagraphs.cs
- ClientSideProviderDescription.cs
- StorageEntityContainerMapping.cs
- Rect.cs
- CompiledQuery.cs
- StringFreezingAttribute.cs
- PeerCollaborationPermission.cs
- Environment.cs
- CqlIdentifiers.cs
- PropertyGridView.cs
- UpDownEvent.cs
- SurrogateSelector.cs
- ToolStripContentPanelRenderEventArgs.cs
- DataException.cs
- ResizeGrip.cs
- EntitySqlException.cs
- IOException.cs
- ConstantSlot.cs
- MaskDesignerDialog.cs
- MenuEventArgs.cs
- RuleSetDialog.Designer.cs
- DocumentPageViewAutomationPeer.cs
- Material.cs
- NavigationHelper.cs
- Animatable.cs
- ConnectionProviderAttribute.cs
- ITreeGenerator.cs
- CollectionView.cs
- Soap12ProtocolReflector.cs
- LinkArea.cs
- GridViewAutomationPeer.cs
- SafeNativeMethodsOther.cs
- wmiutil.cs
- FlagsAttribute.cs
- HtmlElementErrorEventArgs.cs
- GridViewRowPresenter.cs
- ParameterCollection.cs
- WebConfigurationFileMap.cs
- TableRow.cs
- HttpFileCollection.cs
- __Filters.cs
- WeakEventTable.cs
- DataGridParentRows.cs
- FtpRequestCacheValidator.cs
- RedistVersionInfo.cs
- MouseButtonEventArgs.cs
- DBConnection.cs
- SequenceNumber.cs
- StatusBar.cs
- StreamWriter.cs
- ConfigurationElementProperty.cs
- ArcSegment.cs
- DataGridViewCellPaintingEventArgs.cs
- XamlPathDataSerializer.cs
- COSERVERINFO.cs
- TableColumnCollectionInternal.cs
- _HTTPDateParse.cs
- HttpModuleAction.cs
- AdPostCacheSubstitution.cs
- SafeArrayTypeMismatchException.cs
- EmptyReadOnlyDictionaryInternal.cs
- FileChangesMonitor.cs
- ConfigsHelper.cs
- AppDomainFactory.cs
- ContextStaticAttribute.cs
- SmtpReplyReader.cs
- UpdateCompiler.cs
- UriExt.cs
- SqlParameter.cs
- HtmlFormParameterWriter.cs
- ExpressionVisitorHelpers.cs
- SqlCaseSimplifier.cs
- XmlObjectSerializerWriteContextComplex.cs
- IndentedTextWriter.cs
- MouseDevice.cs
- BatchServiceHost.cs
- ProgressChangedEventArgs.cs
- UInt64Converter.cs
- TdsParserSafeHandles.cs
- ListView.cs
- SyntaxCheck.cs
- SerialReceived.cs
- ProgressBar.cs
- NumberSubstitution.cs
- Fault.cs
- CommentEmitter.cs
- PasswordRecoveryDesigner.cs
- SqlPersistenceProviderFactory.cs
- XNodeValidator.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- DataObjectSettingDataEventArgs.cs
- WindowsTooltip.cs
- FormViewRow.cs