Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Control.cs
- PropertyGeneratedEventArgs.cs
- SqlCharStream.cs
- ScrollableControl.cs
- BulletDecorator.cs
- Duration.cs
- SoapEnumAttribute.cs
- PathGeometry.cs
- RegexGroup.cs
- WebRequest.cs
- PointCollection.cs
- PrintDialog.cs
- WebScriptMetadataMessage.cs
- SoapCodeExporter.cs
- TabItemWrapperAutomationPeer.cs
- serverconfig.cs
- MultipleViewPattern.cs
- HttpDateParse.cs
- XamlWriter.cs
- TreeViewImageIndexConverter.cs
- IssuanceLicense.cs
- SuppressIldasmAttribute.cs
- XmlExceptionHelper.cs
- HttpContextServiceHost.cs
- HttpRuntimeSection.cs
- PrintingPermissionAttribute.cs
- ThemeableAttribute.cs
- grammarelement.cs
- Vector3DCollection.cs
- NameValueFileSectionHandler.cs
- Instrumentation.cs
- PropertyRecord.cs
- GeneralTransform.cs
- ContextMenuService.cs
- WebPartActionVerb.cs
- DropShadowBitmapEffect.cs
- dbenumerator.cs
- TextElement.cs
- base64Transforms.cs
- FixedTextContainer.cs
- Parameter.cs
- ModelPropertyImpl.cs
- ProcessHostFactoryHelper.cs
- WindowsToolbar.cs
- X509ChainElement.cs
- WindowsListViewGroup.cs
- TextMessageEncodingBindingElement.cs
- HttpClientCertificate.cs
- ValueTypeFixupInfo.cs
- ScriptingScriptResourceHandlerSection.cs
- CorrelationKeyCalculator.cs
- IHttpResponseInternal.cs
- DataGridViewRowEventArgs.cs
- RecommendedAsConfigurableAttribute.cs
- x509utils.cs
- TypeUsageBuilder.cs
- DbProviderManifest.cs
- _Events.cs
- XPathScanner.cs
- CrossContextChannel.cs
- EntityDataSourceQueryBuilder.cs
- ExponentialEase.cs
- GeometryCollection.cs
- TablePattern.cs
- BindingExpressionUncommonField.cs
- ListViewGroup.cs
- HtmlForm.cs
- HtmlImage.cs
- LinqDataSourceInsertEventArgs.cs
- HttpResponseWrapper.cs
- WindowsPrincipal.cs
- SimpleRecyclingCache.cs
- ResourceCategoryAttribute.cs
- ToolStripPanelCell.cs
- BulletChrome.cs
- TemplateControlCodeDomTreeGenerator.cs
- Rect3DValueSerializer.cs
- ListInitExpression.cs
- PassportAuthentication.cs
- securestring.cs
- OrderablePartitioner.cs
- EntityConnection.cs
- ApplicationFileParser.cs
- EnvelopedSignatureTransform.cs
- ValuePattern.cs
- PageCache.cs
- SettingsBindableAttribute.cs
- CodeExpressionCollection.cs
- FixedSOMElement.cs
- Privilege.cs
- PointAnimationUsingPath.cs
- ServiceRoute.cs
- CodeAccessPermission.cs
- DataGridRelationshipRow.cs
- XPathNodeInfoAtom.cs
- PublisherMembershipCondition.cs
- EventMappingSettingsCollection.cs
- CodeNamespaceImportCollection.cs
- NonVisualControlAttribute.cs
- SchemaSetCompiler.cs