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
- ExeConfigurationFileMap.cs
- ListSourceHelper.cs
- BindableTemplateBuilder.cs
- Aes.cs
- TextCompositionManager.cs
- SubclassTypeValidator.cs
- OperandQuery.cs
- BamlTreeUpdater.cs
- TextTreeInsertUndoUnit.cs
- InternalDispatchObject.cs
- ApplicationProxyInternal.cs
- Journaling.cs
- XpsS0ValidatingLoader.cs
- WindowsGraphics2.cs
- ErrorStyle.cs
- XpsResourceDictionary.cs
- CustomErrorsSectionWrapper.cs
- EntitySqlQueryCacheEntry.cs
- ISFTagAndGuidCache.cs
- MethodBody.cs
- CompModSwitches.cs
- ContextMenu.cs
- FileUtil.cs
- NativeMethods.cs
- StaticTextPointer.cs
- PackageRelationship.cs
- SqlStatistics.cs
- RepeatInfo.cs
- SafeCertificateContext.cs
- AuthenticationSection.cs
- DataGridViewSelectedCellCollection.cs
- ProfileSettingsCollection.cs
- ToolStripRenderer.cs
- TraceListeners.cs
- GridViewSortEventArgs.cs
- AnnotationResourceChangedEventArgs.cs
- _ShellExpression.cs
- InvokeProviderWrapper.cs
- XPathNodeList.cs
- StubHelpers.cs
- PageBuildProvider.cs
- DesignUtil.cs
- SQLDecimalStorage.cs
- MetadataElement.cs
- MemberDescriptor.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- HttpClientCertificate.cs
- ContactManager.cs
- ListViewDeletedEventArgs.cs
- StorageEntityTypeMapping.cs
- HttpException.cs
- PolicyReader.cs
- IHttpResponseInternal.cs
- UInt16Storage.cs
- CustomAttribute.cs
- SQLMoneyStorage.cs
- CollectionType.cs
- DetailsViewModeEventArgs.cs
- DependencyObject.cs
- MimeTypeMapper.cs
- WebEventCodes.cs
- LabelDesigner.cs
- CheckBoxList.cs
- EventEntry.cs
- IfJoinedCondition.cs
- SystemResourceHost.cs
- WindowsStatusBar.cs
- NameValueFileSectionHandler.cs
- UIElementHelper.cs
- CommandSet.cs
- KeySplineConverter.cs
- DataControlFieldHeaderCell.cs
- HtmlTable.cs
- ETagAttribute.cs
- PageCodeDomTreeGenerator.cs
- ImplicitInputBrush.cs
- RepeatInfo.cs
- XmlSchemaAttributeGroupRef.cs
- _NativeSSPI.cs
- RelationshipNavigation.cs
- DropShadowEffect.cs
- VoiceSynthesis.cs
- FreezableOperations.cs
- PageTheme.cs
- StringUtil.cs
- IndentedTextWriter.cs
- MetadataArtifactLoaderResource.cs
- TypeHelpers.cs
- WindowsAltTab.cs
- SetStateDesigner.cs
- SqlClientPermission.cs
- DataServiceRequest.cs
- GcHandle.cs
- SignatureToken.cs
- SwitchLevelAttribute.cs
- CompilerTypeWithParams.cs
- TimeoutValidationAttribute.cs
- RegisteredExpandoAttribute.cs
- CreatingCookieEventArgs.cs
- BitmapFrameDecode.cs