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
- _ScatterGatherBuffers.cs
- DataSourceControlBuilder.cs
- WorkflowEventArgs.cs
- EntitySetDataBindingList.cs
- HtmlInputReset.cs
- SecUtil.cs
- unitconverter.cs
- DesignerDataColumn.cs
- TreeNodeMouseHoverEvent.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- StorageComplexPropertyMapping.cs
- InternalDispatchObject.cs
- ThemeDirectoryCompiler.cs
- securitycriticaldata.cs
- PageAsyncTask.cs
- GenericRootAutomationPeer.cs
- FileCodeGroup.cs
- Set.cs
- CompositeKey.cs
- DiscoveryClientDuplexChannel.cs
- SystemIPv6InterfaceProperties.cs
- TextDecorations.cs
- _NativeSSPI.cs
- IfAction.cs
- ConfigPathUtility.cs
- SslSecurityTokenParameters.cs
- ThreadInterruptedException.cs
- WsatStrings.cs
- WinEventWrap.cs
- EventHandlersStore.cs
- LoginDesignerUtil.cs
- ProfileManager.cs
- ComponentEditorForm.cs
- CodeSnippetTypeMember.cs
- RawMouseInputReport.cs
- ModuleBuilderData.cs
- OptimisticConcurrencyException.cs
- DataColumnPropertyDescriptor.cs
- keycontainerpermission.cs
- QuaternionRotation3D.cs
- CompositionAdorner.cs
- PageClientProxyGenerator.cs
- DataGridItemCollection.cs
- Semaphore.cs
- CompilationLock.cs
- WebRequest.cs
- ReflectionTypeLoadException.cs
- NativeMethods.cs
- RefreshEventArgs.cs
- DictionaryBase.cs
- TextRangeAdaptor.cs
- __FastResourceComparer.cs
- baseaxisquery.cs
- WindowsGraphics.cs
- ObjectQueryState.cs
- PathGeometry.cs
- StylusPoint.cs
- XPathAxisIterator.cs
- AggregateException.cs
- smtppermission.cs
- UnsafeNativeMethodsPenimc.cs
- DataGridViewDataConnection.cs
- LoadRetryConstantStrategy.cs
- ForeignConstraint.cs
- SafeReadContext.cs
- CompositeCollection.cs
- PeerPresenceInfo.cs
- SystemResources.cs
- InfocardInteractiveChannelInitializer.cs
- userdatakeys.cs
- SiteMapNodeCollection.cs
- OutputCacheProfile.cs
- DesignColumn.cs
- EventSourceCreationData.cs
- GeneralTransform3DGroup.cs
- KeyBinding.cs
- DataPagerFieldCommandEventArgs.cs
- contentDescriptor.cs
- UriParserTemplates.cs
- DeclarativeCatalogPart.cs
- TdsValueSetter.cs
- mediapermission.cs
- shaperfactoryquerycacheentry.cs
- RegexGroup.cs
- ProgressBar.cs
- BinaryObjectWriter.cs
- ClientCultureInfo.cs
- XmlFormatWriterGenerator.cs
- CodeGroup.cs
- TabletCollection.cs
- QilGeneratorEnv.cs
- XsltLoader.cs
- DynamicRendererThreadManager.cs
- LongTypeConverter.cs
- TypeLoadException.cs
- StrongNameIdentityPermission.cs
- ListViewGroupItemCollection.cs
- WeakReadOnlyCollection.cs
- ListViewUpdateEventArgs.cs
- DataGridViewCellFormattingEventArgs.cs