Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / InteropServices / DispatchWrapper.cs / 1 / DispatchWrapper.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: DispatchWrapper. ** ** ** Purpose: Wrapper that is converted to a variant with VT_DISPATCH. ** ** =============================================================================*/ namespace System.Runtime.InteropServices { using System; using System.Security; using System.Security.Permissions; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public sealed class DispatchWrapper { [SecurityPermissionAttribute(SecurityAction.Demand,Flags=SecurityPermissionFlag.UnmanagedCode)] public DispatchWrapper(Object obj) { if (obj != null) { // Make sure this guy has an IDispatch IntPtr pdisp = Marshal.GetIDispatchForObject(obj); // If we got here without throwing an exception, the QI for IDispatch succeeded. Marshal.Release(pdisp); } m_WrappedObject = obj; } public Object WrappedObject { get { return m_WrappedObject; } } private Object m_WrappedObject; } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UserControl.cs
- ExpressionLexer.cs
- ValueOfAction.cs
- WindowCollection.cs
- Rectangle.cs
- SchemeSettingElementCollection.cs
- BamlBinaryReader.cs
- CachedPathData.cs
- WindowsStreamSecurityBindingElement.cs
- CodeExporter.cs
- FrameDimension.cs
- UnsafeNetInfoNativeMethods.cs
- iisPickupDirectory.cs
- ControlIdConverter.cs
- Pipe.cs
- CacheHelper.cs
- SystemEvents.cs
- BitArray.cs
- Activity.cs
- PassportIdentity.cs
- BamlRecords.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ImportedNamespaceContextItem.cs
- RtfControls.cs
- GeometryCollection.cs
- FollowerQueueCreator.cs
- CollectionBase.cs
- SafeCryptoHandles.cs
- SoapProcessingBehavior.cs
- AssemblyAssociatedContentFileAttribute.cs
- SecurityKeyIdentifier.cs
- SourceElementsCollection.cs
- DPAPIProtectedConfigurationProvider.cs
- SortKey.cs
- Variant.cs
- ToolStripMenuItemCodeDomSerializer.cs
- Int32AnimationUsingKeyFrames.cs
- ComponentDispatcher.cs
- XmlSchemaSimpleContent.cs
- MultipleViewPattern.cs
- FormatConvertedBitmap.cs
- XmlSchemaSimpleTypeRestriction.cs
- securitycriticaldata.cs
- AlphaSortedEnumConverter.cs
- XmlWrappingReader.cs
- SiteMapDesignerDataSourceView.cs
- RegionIterator.cs
- MatchingStyle.cs
- SQLBinaryStorage.cs
- HandlerFactoryWrapper.cs
- EqualityComparer.cs
- WebRequestModuleElement.cs
- DurableServiceAttribute.cs
- SqlComparer.cs
- ElementProxy.cs
- ReferentialConstraintRoleElement.cs
- MediaContext.cs
- SymLanguageVendor.cs
- MessageDescriptionCollection.cs
- UrlAuthorizationModule.cs
- NamespaceExpr.cs
- MenuCommand.cs
- DataGridViewCellLinkedList.cs
- ColorConvertedBitmap.cs
- ColorDialog.cs
- Size3D.cs
- JsonServiceDocumentSerializer.cs
- HttpServerProtocol.cs
- TypedElement.cs
- WebPartActionVerb.cs
- DurableOperationAttribute.cs
- EntityProviderFactory.cs
- UTF32Encoding.cs
- DataServiceStreamResponse.cs
- PropertyManager.cs
- UidManager.cs
- ParagraphVisual.cs
- FilterQuery.cs
- NonceCache.cs
- Util.cs
- SqlRemoveConstantOrderBy.cs
- DbConnectionPoolCounters.cs
- DbMetaDataColumnNames.cs
- Attributes.cs
- Menu.cs
- StackSpiller.Bindings.cs
- MultipleViewPattern.cs
- HtmlElementCollection.cs
- CodeSnippetTypeMember.cs
- LockedBorderGlyph.cs
- KeyInfo.cs
- DataGridAutoFormatDialog.cs
- Transactions.cs
- TypeTypeConverter.cs
- Stackframe.cs
- CombinedGeometry.cs
- IDQuery.cs
- WSFederationHttpBindingCollectionElement.cs
- WebSysDisplayNameAttribute.cs
- ChtmlTextBoxAdapter.cs