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
- HttpWebRequestElement.cs
- VisualStyleElement.cs
- _ShellExpression.cs
- Int32Rect.cs
- Trace.cs
- Keyboard.cs
- QualifiedCellIdBoolean.cs
- QueryMatcher.cs
- DeleteHelper.cs
- ImageSourceConverter.cs
- DbConnectionPoolOptions.cs
- ContentHostHelper.cs
- PropertyInformation.cs
- Byte.cs
- ZipIOExtraField.cs
- MappingSource.cs
- DbDataRecord.cs
- BeginStoryboard.cs
- Currency.cs
- TransformerConfigurationWizardBase.cs
- HistoryEventArgs.cs
- ProtectedConfigurationSection.cs
- ToolStripRendererSwitcher.cs
- HighlightComponent.cs
- WhitespaceSignificantCollectionAttribute.cs
- SqlConnectionPoolProviderInfo.cs
- ExpressionBuilderContext.cs
- HistoryEventArgs.cs
- NonClientArea.cs
- DiagnosticTrace.cs
- ScriptResourceAttribute.cs
- OdbcFactory.cs
- HitTestResult.cs
- ProjectionPruner.cs
- CapabilitiesRule.cs
- DetailsViewPagerRow.cs
- AssemblyInfo.cs
- XmlWellformedWriter.cs
- IImplicitResourceProvider.cs
- Zone.cs
- FileClassifier.cs
- RootProfilePropertySettingsCollection.cs
- UriTemplateMatchException.cs
- AssemblyBuilderData.cs
- AuthenticationSection.cs
- ByteArrayHelperWithString.cs
- AutomationPeer.cs
- InkSerializer.cs
- EventSinkHelperWriter.cs
- SmiContextFactory.cs
- ContextStack.cs
- PropertyFilter.cs
- TimeSpanOrInfiniteConverter.cs
- BoolExpressionVisitors.cs
- WebPartTracker.cs
- PriorityRange.cs
- ColorAnimationUsingKeyFrames.cs
- WorkflowRuntimeSection.cs
- SecUtil.cs
- PopupRoot.cs
- ObjectViewQueryResultData.cs
- ContainerFilterService.cs
- PersonalizationProviderHelper.cs
- QuaternionAnimationUsingKeyFrames.cs
- ViewValidator.cs
- TextSchema.cs
- LayoutDump.cs
- XPathAncestorIterator.cs
- ToolStripContentPanel.cs
- GenericRootAutomationPeer.cs
- FontSizeConverter.cs
- DetailsViewCommandEventArgs.cs
- EncryptedXml.cs
- InputScopeNameConverter.cs
- TextMarkerSource.cs
- UserUseLicenseDictionaryLoader.cs
- ListenerElementsCollection.cs
- DetailsViewPagerRow.cs
- AccessViolationException.cs
- ToolStripDesigner.cs
- CapabilitiesAssignment.cs
- RadioButtonFlatAdapter.cs
- AutomationProperty.cs
- EntityDataSourceDesigner.cs
- Utils.cs
- MouseButtonEventArgs.cs
- Delegate.cs
- ProgressBarRenderer.cs
- DataRowComparer.cs
- XPathParser.cs
- TableItemStyle.cs
- AppDomainManager.cs
- XmlElementList.cs
- TabPanel.cs
- ErrorProvider.cs
- Queue.cs
- Int32RectValueSerializer.cs
- WebControlsSection.cs
- BaseTypeViewSchema.cs
- HyperlinkAutomationPeer.cs