Code:
/ DotNET / DotNET / 8.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
- DataBindingCollection.cs
- Permission.cs
- BoundsDrawingContextWalker.cs
- DateTimeOffsetConverter.cs
- ExtensionElement.cs
- RegexCaptureCollection.cs
- DoubleCollection.cs
- MulticastDelegate.cs
- EventLogConfiguration.cs
- VirtualDirectoryMapping.cs
- ByeOperationCD1AsyncResult.cs
- TabPanel.cs
- TdsValueSetter.cs
- CharConverter.cs
- TreeNodeCollection.cs
- XPathMessageFilterTable.cs
- sqlpipe.cs
- QueryExpr.cs
- JoinElimination.cs
- _FtpDataStream.cs
- BmpBitmapDecoder.cs
- TransactionsSectionGroup.cs
- DesignTimeData.cs
- StringUtil.cs
- MapPathBasedVirtualPathProvider.cs
- IsolationInterop.cs
- SqlHelper.cs
- XmlDocumentType.cs
- BitmapEffectrendercontext.cs
- IIS7WorkerRequest.cs
- PartialClassGenerationTask.cs
- EncodingTable.cs
- WorkflowOwnershipException.cs
- SqlUtils.cs
- mediaeventargs.cs
- TextBoxBase.cs
- DefaultEventAttribute.cs
- AudioSignalProblemOccurredEventArgs.cs
- DPCustomTypeDescriptor.cs
- TableItemPattern.cs
- StringAnimationBase.cs
- Update.cs
- Page.cs
- CmsInterop.cs
- TriState.cs
- JsonReader.cs
- BamlRecordHelper.cs
- SingleTagSectionHandler.cs
- SessionSwitchEventArgs.cs
- BackgroundWorker.cs
- ContainerActivationHelper.cs
- InternalMappingException.cs
- ToolBarTray.cs
- SortFieldComparer.cs
- EntityDataSourceWizardForm.cs
- AsymmetricSignatureFormatter.cs
- XamlGridLengthSerializer.cs
- CallbackException.cs
- FutureFactory.cs
- ExtensionsSection.cs
- MatrixKeyFrameCollection.cs
- StringReader.cs
- EventWaitHandle.cs
- dbdatarecord.cs
- SmtpTransport.cs
- Misc.cs
- XmlSortKeyAccumulator.cs
- TextParagraphProperties.cs
- PerformanceCounterLib.cs
- XmlWrappingWriter.cs
- ReadOnlyHierarchicalDataSource.cs
- QueueProcessor.cs
- ElementAction.cs
- ConfigXmlCDataSection.cs
- TypographyProperties.cs
- assertwrapper.cs
- Parameter.cs
- OdbcCommand.cs
- BehaviorEditorPart.cs
- MsdtcWrapper.cs
- SourceFilter.cs
- MarkupProperty.cs
- ColorAnimationUsingKeyFrames.cs
- Span.cs
- Clause.cs
- TimelineClockCollection.cs
- Sequence.cs
- ThreadStaticAttribute.cs
- WebPartMenuStyle.cs
- ProcessHostMapPath.cs
- RegexCompiler.cs
- StickyNote.cs
- ObjectNavigationPropertyMapping.cs
- SpeechRecognizer.cs
- GridPattern.cs
- ImageDrawing.cs
- Utils.cs
- OdbcParameterCollection.cs
- LogEntryUtils.cs
- _ListenerRequestStream.cs