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
- Polyline.cs
- ComEventsHelper.cs
- EventHandlerList.cs
- LayoutSettings.cs
- HtmlInputHidden.cs
- InputMethodStateChangeEventArgs.cs
- XmlnsDictionary.cs
- ListViewGroup.cs
- EDesignUtil.cs
- GridViewCancelEditEventArgs.cs
- HttpEncoder.cs
- ExpandSegmentCollection.cs
- FileUpload.cs
- ImageProxy.cs
- CrossAppDomainChannel.cs
- BitmapEffectInputData.cs
- ComAdminInterfaces.cs
- SslStream.cs
- SchemaCollectionCompiler.cs
- Codec.cs
- EdmItemError.cs
- BidOverLoads.cs
- ValueType.cs
- SimpleType.cs
- XmlEventCache.cs
- Component.cs
- ListBoxChrome.cs
- InputManager.cs
- HttpRuntime.cs
- InheritanceContextChangedEventManager.cs
- TextSelectionHelper.cs
- SizeAnimationUsingKeyFrames.cs
- TextBoxBaseDesigner.cs
- PassportPrincipal.cs
- Stylesheet.cs
- InputLanguageSource.cs
- ComponentEvent.cs
- IUnknownConstantAttribute.cs
- WindowsFormsHostAutomationPeer.cs
- DefaultCommandConverter.cs
- Delegate.cs
- GeneralTransformGroup.cs
- TreeViewItemAutomationPeer.cs
- Socket.cs
- PropertyGrid.cs
- XPathItem.cs
- TextSearch.cs
- WorkflowInstanceQuery.cs
- XmlSequenceWriter.cs
- WebContext.cs
- AppDomain.cs
- HostingEnvironmentException.cs
- DataViewSettingCollection.cs
- ModelPerspective.cs
- LineInfo.cs
- StyleHelper.cs
- FontFamily.cs
- ResourceAttributes.cs
- MenuItem.cs
- SelectionPatternIdentifiers.cs
- KeysConverter.cs
- PageCache.cs
- PassportAuthentication.cs
- Geometry.cs
- IncomingWebResponseContext.cs
- followingquery.cs
- WebConfigurationHostFileChange.cs
- BamlTreeMap.cs
- FixedBufferAttribute.cs
- SqlNotificationEventArgs.cs
- Int64Converter.cs
- wgx_commands.cs
- ObjectStateEntryDbDataRecord.cs
- ScriptMethodAttribute.cs
- _Connection.cs
- EntitySqlQueryState.cs
- StylusPointPropertyUnit.cs
- FontWeightConverter.cs
- TimeStampChecker.cs
- TraceHandlerErrorFormatter.cs
- DeploymentExceptionMapper.cs
- SettingsPropertyNotFoundException.cs
- ContentPresenter.cs
- CatalogZoneDesigner.cs
- DataView.cs
- InstanceStore.cs
- AsyncOperation.cs
- AxImporter.cs
- ScriptResourceAttribute.cs
- XmlCharType.cs
- Vector3DKeyFrameCollection.cs
- SwitchExpression.cs
- WindowsPrincipal.cs
- SrgsRule.cs
- XslCompiledTransform.cs
- SQLGuid.cs
- RequestBringIntoViewEventArgs.cs
- WindowsAuthenticationEventArgs.cs
- TypeGeneratedEventArgs.cs
- RectConverter.cs