Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / InteropServices / DispatchWrapper.cs / 1305376 / 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 { [System.Security.SecuritySafeCritical] // auto-generated [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; } } // 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
- TemplateControlParser.cs
- DockingAttribute.cs
- DesignerForm.cs
- GreenMethods.cs
- CellParagraph.cs
- CallContext.cs
- SqlRemoveConstantOrderBy.cs
- Transform.cs
- StrokeNodeData.cs
- RegexGroupCollection.cs
- AttributeSetAction.cs
- HttpPostClientProtocol.cs
- DoubleLinkListEnumerator.cs
- ObjectSecurity.cs
- CryptoKeySecurity.cs
- SqlGenericUtil.cs
- ExcCanonicalXml.cs
- ArgumentsParser.cs
- HttpCacheVary.cs
- OdbcRowUpdatingEvent.cs
- DelegateTypeInfo.cs
- Nullable.cs
- webclient.cs
- DataSysAttribute.cs
- Missing.cs
- ProofTokenCryptoHandle.cs
- OdbcConnection.cs
- EtwTrackingBehavior.cs
- DirtyTextRange.cs
- XmlReaderSettings.cs
- SqlUserDefinedAggregateAttribute.cs
- DBConnection.cs
- GetPageNumberCompletedEventArgs.cs
- CustomValidator.cs
- FrameAutomationPeer.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- SQLChars.cs
- Rotation3DAnimationUsingKeyFrames.cs
- GeometryModel3D.cs
- CompositeCollection.cs
- XmlTextAttribute.cs
- Int16AnimationBase.cs
- SqlConnectionPoolProviderInfo.cs
- DataStreamFromComStream.cs
- UMPAttributes.cs
- XmlAttributeOverrides.cs
- SplitterDesigner.cs
- figurelengthconverter.cs
- ReadOnlyCollectionBase.cs
- Blend.cs
- MessageSmuggler.cs
- ClientSession.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ToolZone.cs
- ClosureBinding.cs
- CustomErrorCollection.cs
- ManagedFilter.cs
- RemoteWebConfigurationHost.cs
- ComponentEvent.cs
- ISAPIWorkerRequest.cs
- ExpressionPrefixAttribute.cs
- TextServicesProperty.cs
- DataKeyCollection.cs
- FixedSOMPage.cs
- InheritanceAttribute.cs
- ProgressBarHighlightConverter.cs
- PartitionResolver.cs
- CommentEmitter.cs
- ImageSourceValueSerializer.cs
- WsatAdminException.cs
- EncryptedType.cs
- Point3DKeyFrameCollection.cs
- ListBoxItemWrapperAutomationPeer.cs
- UserControlAutomationPeer.cs
- XmlComment.cs
- EventWaitHandleSecurity.cs
- entitydatasourceentitysetnameconverter.cs
- PeerNearMe.cs
- DSACryptoServiceProvider.cs
- RolePrincipal.cs
- ProfessionalColors.cs
- TypeElementCollection.cs
- CheckedPointers.cs
- ColorAnimation.cs
- ButtonPopupAdapter.cs
- MenuBase.cs
- ResourcesBuildProvider.cs
- RawStylusInputCustomData.cs
- MediaPlayerState.cs
- WebPartConnectionsEventArgs.cs
- StringAnimationUsingKeyFrames.cs
- MainMenu.cs
- BaseComponentEditor.cs
- XmlDataCollection.cs
- ListDictionaryInternal.cs
- BindingMAnagerBase.cs
- ColorDialog.cs
- TextBounds.cs
- CompressStream.cs
- ByteRangeDownloader.cs