Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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); } } // 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
- CodeArrayIndexerExpression.cs
- RoleBoolean.cs
- ItemsControl.cs
- HasCopySemanticsAttribute.cs
- HttpRequestCacheValidator.cs
- AttributeExtensions.cs
- ThreadExceptionEvent.cs
- SharedPersonalizationStateInfo.cs
- OracleRowUpdatedEventArgs.cs
- PopupEventArgs.cs
- DataServiceExpressionVisitor.cs
- XmlSchemaIdentityConstraint.cs
- activationcontext.cs
- WindowsButton.cs
- DrawingAttributesDefaultValueFactory.cs
- MsdtcWrapper.cs
- UserPreferenceChangedEventArgs.cs
- HashHelper.cs
- FormatterConverter.cs
- ToolStripItem.cs
- SqlTypeConverter.cs
- TCPListener.cs
- ToolboxCategory.cs
- XamlSerializerUtil.cs
- CanonicalFormWriter.cs
- KnownIds.cs
- Descriptor.cs
- AnimatedTypeHelpers.cs
- PnrpPermission.cs
- FontResourceCache.cs
- Line.cs
- KnownAssembliesSet.cs
- AlternateViewCollection.cs
- BmpBitmapDecoder.cs
- CollectionView.cs
- Rect3D.cs
- RankException.cs
- MatrixStack.cs
- PathFigure.cs
- WaitingCursor.cs
- xmlformatgeneratorstatics.cs
- VariantWrapper.cs
- TypeGeneratedEventArgs.cs
- PictureBox.cs
- DropShadowEffect.cs
- CellNormalizer.cs
- ConstructorNeedsTagAttribute.cs
- WindowsPen.cs
- XmlNullResolver.cs
- PriorityItem.cs
- EventMappingSettings.cs
- AccessedThroughPropertyAttribute.cs
- AttributeCallbackBuilder.cs
- StrokeSerializer.cs
- WindowsSecurityToken.cs
- AppDomainResourcePerfCounters.cs
- MethodAccessException.cs
- FileLoadException.cs
- CubicEase.cs
- XPathScanner.cs
- AudioFileOut.cs
- XmlQueryContext.cs
- CorrelationManager.cs
- ButtonBaseAdapter.cs
- ViewLoader.cs
- SqlDataSourceSelectingEventArgs.cs
- Size.cs
- CodeTypeConstructor.cs
- DataGridViewSelectedRowCollection.cs
- TraceEventCache.cs
- SqlTypeConverter.cs
- SmtpSection.cs
- ByteStreamGeometryContext.cs
- RawStylusInput.cs
- RegexFCD.cs
- SendKeys.cs
- FixedTextSelectionProcessor.cs
- XmlCharCheckingReader.cs
- TreeNodeBinding.cs
- HttpListenerPrefixCollection.cs
- ExtractCollection.cs
- DataGridViewIntLinkedList.cs
- WindowsListViewGroup.cs
- listitem.cs
- PrincipalPermissionMode.cs
- Base64Encoder.cs
- FileSecurity.cs
- Permission.cs
- VectorKeyFrameCollection.cs
- WebPartDisplayModeEventArgs.cs
- Identity.cs
- DataContractJsonSerializerOperationBehavior.cs
- UserControlCodeDomTreeGenerator.cs
- HttpFormatExtensions.cs
- SqlTransaction.cs
- CodeTypeDelegate.cs
- ExtensionQuery.cs
- AssemblyName.cs
- ArrayElementGridEntry.cs
- RecordManager.cs