Code:
/ 4.0 / 4.0 / 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. // ==++== // // 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
- Geometry3D.cs
- BitmapEffect.cs
- XmlSchemaParticle.cs
- BufferedStream2.cs
- ClientConfigurationSystem.cs
- Int16AnimationUsingKeyFrames.cs
- NotFiniteNumberException.cs
- BamlResourceDeserializer.cs
- DataObject.cs
- Command.cs
- ipaddressinformationcollection.cs
- SchemaInfo.cs
- CssTextWriter.cs
- NegatedConstant.cs
- GlobalizationSection.cs
- NumberSubstitution.cs
- DataGridViewButtonCell.cs
- EncoderExceptionFallback.cs
- ItemsPanelTemplate.cs
- TimeoutException.cs
- MenuItemBindingCollection.cs
- Tokenizer.cs
- TextBoxBase.cs
- __ConsoleStream.cs
- TableLayoutPanel.cs
- Win32SafeHandles.cs
- CalloutQueueItem.cs
- FontConverter.cs
- Application.cs
- Debug.cs
- MimeBasePart.cs
- StylusSystemGestureEventArgs.cs
- FtpRequestCacheValidator.cs
- TableLayoutRowStyleCollection.cs
- ActivityIdHeader.cs
- RolePrincipal.cs
- wmiprovider.cs
- SendMailErrorEventArgs.cs
- FacetChecker.cs
- TCPListener.cs
- SystemTcpConnection.cs
- CatalogPartCollection.cs
- DocumentViewerBaseAutomationPeer.cs
- BufferedGraphics.cs
- EditorPartCollection.cs
- Effect.cs
- RestHandlerFactory.cs
- ButtonBaseAdapter.cs
- ResourceContainer.cs
- PropertyRecord.cs
- WithStatement.cs
- rsa.cs
- LinqDataSourceDeleteEventArgs.cs
- IteratorFilter.cs
- RuntimeConfigurationRecord.cs
- DateTimePicker.cs
- UrlUtility.cs
- DiagnosticsConfigurationHandler.cs
- MappingMetadataHelper.cs
- VersionedStreamOwner.cs
- ImageKeyConverter.cs
- SimpleTableProvider.cs
- unsafeIndexingFilterStream.cs
- Span.cs
- DefaultEventAttribute.cs
- Message.cs
- Overlapped.cs
- VariableAction.cs
- CodeTypeReferenceExpression.cs
- login.cs
- EventLogReader.cs
- DataFormat.cs
- SqlBulkCopyColumnMappingCollection.cs
- ColumnHeaderConverter.cs
- DecimalAnimation.cs
- AnnotationHighlightLayer.cs
- UTF32Encoding.cs
- AppSettingsExpressionBuilder.cs
- SqlConnectionPoolGroupProviderInfo.cs
- GenericAuthenticationEventArgs.cs
- DataContractSerializerSection.cs
- XmlReflectionMember.cs
- CodeIterationStatement.cs
- CommandLibraryHelper.cs
- RowToFieldTransformer.cs
- OrderPreservingMergeHelper.cs
- Byte.cs
- followingsibling.cs
- CompilerState.cs
- _ContextAwareResult.cs
- ReflectEventDescriptor.cs
- PlacementWorkspace.cs
- ColorConvertedBitmapExtension.cs
- DependencyPropertyKind.cs
- ImageMapEventArgs.cs
- DesignerAttribute.cs
- CqlLexer.cs
- StylusCollection.cs
- ThicknessConverter.cs
- KeyPullup.cs