Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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; } } // 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
- Panel.cs
- HttpApplication.cs
- LambdaSerializationException.cs
- EncryptedXml.cs
- TimeoutHelper.cs
- ProcessExitedException.cs
- EditorPartChrome.cs
- ListBoxItem.cs
- SqlWebEventProvider.cs
- DataViewListener.cs
- RegexWorker.cs
- AssemblyResourceLoader.cs
- SendOperation.cs
- HttpCookie.cs
- ServiceContractGenerator.cs
- RowParagraph.cs
- WebSysDescriptionAttribute.cs
- ComplexType.cs
- SQLInt16.cs
- ObjectKeyFrameCollection.cs
- StringValueSerializer.cs
- OdbcConnectionString.cs
- WS2007FederationHttpBinding.cs
- LateBoundBitmapDecoder.cs
- LinqDataSourceEditData.cs
- OdbcCommand.cs
- CompilationUnit.cs
- HwndHost.cs
- MembershipUser.cs
- PackWebRequestFactory.cs
- DodSequenceMerge.cs
- StylusPointDescription.cs
- ComplexType.cs
- StickyNoteHelper.cs
- TypeSource.cs
- ListBoxItem.cs
- SizeAnimationUsingKeyFrames.cs
- ScriptResourceInfo.cs
- XmlSchemaAnyAttribute.cs
- DisplayClaim.cs
- ProfileGroupSettings.cs
- HtmlToClrEventProxy.cs
- ClonableStack.cs
- ReaderWriterLock.cs
- SimpleHandlerFactory.cs
- TypeLibConverter.cs
- EntityContainerRelationshipSetEnd.cs
- TypeUsage.cs
- SystemTcpConnection.cs
- ProfileService.cs
- ValueChangedEventManager.cs
- ReliableMessagingHelpers.cs
- FormatterConverter.cs
- RecipientInfo.cs
- PropertyEmitter.cs
- DiscoveryMessageSequenceCD1.cs
- HttpServerProtocol.cs
- SpnEndpointIdentity.cs
- PolyBezierSegmentFigureLogic.cs
- StyleCollection.cs
- AppDomain.cs
- BitVector32.cs
- DocumentReference.cs
- EntitySetDataBindingList.cs
- EncryptedKeyIdentifierClause.cs
- DataGridViewCellStateChangedEventArgs.cs
- StreamResourceInfo.cs
- StrongName.cs
- Misc.cs
- Drawing.cs
- MultipartContentParser.cs
- followingsibling.cs
- TextTreeExtractElementUndoUnit.cs
- SmiSettersStream.cs
- Message.cs
- AuthorizationSection.cs
- ColumnResizeAdorner.cs
- TagNameToTypeMapper.cs
- ContextStaticAttribute.cs
- XmlReader.cs
- DescendantQuery.cs
- AnimationStorage.cs
- HttpProcessUtility.cs
- XamlSerializer.cs
- AlgoModule.cs
- Deflater.cs
- QilVisitor.cs
- SecurityProtocolFactory.cs
- String.cs
- CornerRadius.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- LinqToSqlWrapper.cs
- SqlDataSourceCustomCommandPanel.cs
- ObjectViewListener.cs
- RectValueSerializer.cs
- DocumentApplication.cs
- RawMouseInputReport.cs
- InternalMappingException.cs
- EllipseGeometry.cs
- ImageSourceValueSerializer.cs