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
- Boolean.cs
- Properties.cs
- MemberPath.cs
- ColorMatrix.cs
- HttpRequest.cs
- MenuCommandsChangedEventArgs.cs
- ClientReliableChannelBinder.cs
- TextSpanModifier.cs
- FirstMatchCodeGroup.cs
- FontFamilyConverter.cs
- DelegateArgument.cs
- RowUpdatedEventArgs.cs
- BindingMemberInfo.cs
- AsymmetricSignatureFormatter.cs
- BackgroundFormatInfo.cs
- XmlSchemaImporter.cs
- DynamicFilterExpression.cs
- StringAnimationBase.cs
- ImageInfo.cs
- RoleGroup.cs
- AutoGeneratedField.cs
- SafeRegistryHandle.cs
- OracleParameterCollection.cs
- HttpClientProtocol.cs
- FontWeightConverter.cs
- ObfuscateAssemblyAttribute.cs
- SafeArrayTypeMismatchException.cs
- SQLMoneyStorage.cs
- ChainedAsyncResult.cs
- PixelShader.cs
- LogArchiveSnapshot.cs
- BmpBitmapEncoder.cs
- CrossAppDomainChannel.cs
- TriggerActionCollection.cs
- EndpointIdentity.cs
- GetReadStreamResult.cs
- _SSPIWrapper.cs
- WbmpConverter.cs
- XPathDocumentNavigator.cs
- RegexParser.cs
- DataTransferEventArgs.cs
- KeyboardEventArgs.cs
- ProfileProvider.cs
- Form.cs
- TransactionManager.cs
- CommandManager.cs
- ValidatorCompatibilityHelper.cs
- XmlEncoding.cs
- CompoundFileStorageReference.cs
- Odbc32.cs
- WasHostedComPlusFactory.cs
- RegularExpressionValidator.cs
- DatagridviewDisplayedBandsData.cs
- ResourceExpressionBuilder.cs
- EmptyStringExpandableObjectConverter.cs
- StackBuilderSink.cs
- Component.cs
- HtmlInputControl.cs
- AnnotationAdorner.cs
- AutomationPatternInfo.cs
- ReliableMessagingVersionConverter.cs
- ThemeInfoAttribute.cs
- PathFigureCollectionValueSerializer.cs
- PropertyDescriptorComparer.cs
- XmlSchemaImport.cs
- ButtonAutomationPeer.cs
- BrowserCapabilitiesFactory.cs
- SignedXml.cs
- LassoSelectionBehavior.cs
- DecimalStorage.cs
- RequestContextBase.cs
- WSFederationHttpSecurityMode.cs
- CommentAction.cs
- ScalarRestriction.cs
- CaseCqlBlock.cs
- recordstate.cs
- UTF32Encoding.cs
- CommandEventArgs.cs
- MetadataExchangeBindings.cs
- SafeMILHandleMemoryPressure.cs
- XmlText.cs
- SignatureConfirmationElement.cs
- ConnectionsZone.cs
- XmlSchemaInfo.cs
- WizardSideBarListControlItem.cs
- InstanceKeyCompleteException.cs
- XomlCompiler.cs
- HostingEnvironment.cs
- TraceUtils.cs
- CellCreator.cs
- SupportingTokenAuthenticatorSpecification.cs
- CFStream.cs
- XmlHierarchicalDataSourceView.cs
- QueuePropertyVariants.cs
- DataViewListener.cs
- GridViewRowCollection.cs
- DrawingContext.cs
- InputScopeNameConverter.cs
- PageAsyncTask.cs
- XPathMultyIterator.cs