Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- PowerModeChangedEventArgs.cs
- StatusBarDesigner.cs
- diagnosticsswitches.cs
- EntityProviderServices.cs
- VarInfo.cs
- DockPanel.cs
- GetTokenRequest.cs
- IntegrationExceptionEventArgs.cs
- PropertyOrder.cs
- CodeNamespace.cs
- Evidence.cs
- TaskbarItemInfo.cs
- StorageScalarPropertyMapping.cs
- Pen.cs
- ActivityExecutor.cs
- NullableBoolConverter.cs
- _HeaderInfo.cs
- WebUtil.cs
- LayoutEditorPart.cs
- XDRSchema.cs
- ControlBindingsCollection.cs
- ToolStripSettings.cs
- MimeBasePart.cs
- HtmlInputText.cs
- safemediahandle.cs
- SafeHandles.cs
- thaishape.cs
- Win32.cs
- BoundingRectTracker.cs
- RIPEMD160Managed.cs
- AssertFilter.cs
- WorkflowServiceHostFactory.cs
- SRef.cs
- CssClassPropertyAttribute.cs
- ControlPaint.cs
- WindowsEditBox.cs
- MultipleViewPattern.cs
- Win32MouseDevice.cs
- EditorPart.cs
- URL.cs
- FieldToken.cs
- SecurityChannelFactory.cs
- CannotUnloadAppDomainException.cs
- ErrorsHelper.cs
- SerializationAttributes.cs
- ParallelLoopState.cs
- CalloutQueueItem.cs
- TypeGeneratedEventArgs.cs
- ViewStateChangedEventArgs.cs
- WebControlsSection.cs
- PageCatalogPart.cs
- SecurityRuntime.cs
- ToolStripSystemRenderer.cs
- SortDescription.cs
- CodeExpressionStatement.cs
- EntityRecordInfo.cs
- NativeMethodsOther.cs
- EndPoint.cs
- SettingsProperty.cs
- LongValidatorAttribute.cs
- DataGridPagerStyle.cs
- SecurityState.cs
- Control.cs
- NodeLabelEditEvent.cs
- AccessDataSource.cs
- FreezableDefaultValueFactory.cs
- ProviderConnectionPointCollection.cs
- ResourceDisplayNameAttribute.cs
- DataGridViewBand.cs
- MonthChangedEventArgs.cs
- ScrollBarRenderer.cs
- ValidatorCompatibilityHelper.cs
- ResourceDisplayNameAttribute.cs
- HostingEnvironmentException.cs
- ColumnWidthChangingEvent.cs
- StyleConverter.cs
- FrameworkElementFactoryMarkupObject.cs
- Evaluator.cs
- HtmlUtf8RawTextWriter.cs
- Int32.cs
- DocumentReferenceCollection.cs
- FigureHelper.cs
- EncryptedType.cs
- StringReader.cs
- DataGridViewRow.cs
- StickyNoteHelper.cs
- securitycriticaldataformultiplegetandset.cs
- Package.cs
- TickBar.cs
- dataobject.cs
- StackSpiller.cs
- columnmapkeybuilder.cs
- ServiceDescriptionContext.cs
- ApplyHostConfigurationBehavior.cs
- PrinterResolution.cs
- GridViewCommandEventArgs.cs
- SqlBulkCopyColumnMappingCollection.cs
- OraclePermissionAttribute.cs
- Repeater.cs
- WaitForChangedResult.cs