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
- CreateParams.cs
- SerialPort.cs
- TableLayoutPanelCellPosition.cs
- ExceptionHandler.cs
- SingleAnimation.cs
- MissingManifestResourceException.cs
- DebugInfoGenerator.cs
- DurableEnlistmentState.cs
- RadioButton.cs
- InvalidComObjectException.cs
- PersonalizableTypeEntry.cs
- MetadataCollection.cs
- FixedSOMSemanticBox.cs
- RelOps.cs
- PerfCounters.cs
- StyleSheetRefUrlEditor.cs
- TraceProvider.cs
- CommandBinding.cs
- SubqueryRules.cs
- Console.cs
- UpDownBase.cs
- ScopeElement.cs
- XPathSelectionIterator.cs
- XmlExtensionFunction.cs
- BamlLocalizabilityResolver.cs
- BypassElementCollection.cs
- DispatcherSynchronizationContext.cs
- IndexingContentUnit.cs
- DesignerAttribute.cs
- BufferModesCollection.cs
- SafeThemeHandle.cs
- ProxyElement.cs
- FontWeights.cs
- _AcceptOverlappedAsyncResult.cs
- DataObjectPastingEventArgs.cs
- InfoCardCryptoHelper.cs
- ConcurrentBag.cs
- ExpandCollapsePattern.cs
- DifferencingCollection.cs
- MeasurementDCInfo.cs
- RemotingHelper.cs
- AsyncPostBackTrigger.cs
- FamilyMap.cs
- _SpnDictionary.cs
- CompModSwitches.cs
- MembershipUser.cs
- DesignerActionVerbItem.cs
- DataSourceSelectArguments.cs
- LazyTextWriterCreator.cs
- DateTimeFormatInfo.cs
- TextRenderer.cs
- Error.cs
- QilInvokeEarlyBound.cs
- StandardCommandToolStripMenuItem.cs
- LocationEnvironment.cs
- TextEndOfParagraph.cs
- StoreItemCollection.cs
- QueryResult.cs
- TextTreeTextNode.cs
- AbandonedMutexException.cs
- ResourceKey.cs
- UseLicense.cs
- FullTextLine.cs
- PasswordDeriveBytes.cs
- NavigateUrlConverter.cs
- CachedRequestParams.cs
- TreeNodeBinding.cs
- XamlParser.cs
- SiteMapNodeItem.cs
- DbException.cs
- CursorInteropHelper.cs
- Encoder.cs
- DispatcherObject.cs
- WinCategoryAttribute.cs
- HtmlMeta.cs
- _KerberosClient.cs
- InstanceKeyNotReadyException.cs
- PageSetupDialog.cs
- GridProviderWrapper.cs
- SqlGatherProducedAliases.cs
- BindingSource.cs
- SessionIDManager.cs
- NavigationHelper.cs
- SecUtil.cs
- XmlQualifiedNameTest.cs
- Helper.cs
- SocketAddress.cs
- RolePrincipal.cs
- OleDbParameter.cs
- XmlSchemaComplexContentExtension.cs
- StringExpressionSet.cs
- HotSpot.cs
- HashFinalRequest.cs
- TargetParameterCountException.cs
- DbXmlEnabledProviderManifest.cs
- ParallelTimeline.cs
- SmtpNtlmAuthenticationModule.cs
- DesignSurfaceEvent.cs
- ResXResourceSet.cs
- BitmapSizeOptions.cs