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
- TemplateBuilder.cs
- XmlBoundElement.cs
- PropertyChangingEventArgs.cs
- ComponentDispatcher.cs
- LongTypeConverter.cs
- FileDialogPermission.cs
- WsdlImporter.cs
- CodeDirectiveCollection.cs
- DrawingCollection.cs
- ColorBlend.cs
- AttributeUsageAttribute.cs
- FloaterParagraph.cs
- OleDbException.cs
- SqlDataSourceCommandParser.cs
- TextBox.cs
- ToolboxItem.cs
- SQLDecimalStorage.cs
- ToolStripItemRenderEventArgs.cs
- DateTimeConverter.cs
- TreeView.cs
- X509SecurityToken.cs
- ImageSource.cs
- ControlUtil.cs
- WorkerRequest.cs
- OleDbErrorCollection.cs
- SerializationInfo.cs
- BaseCodeDomTreeGenerator.cs
- PrefixHandle.cs
- NegationPusher.cs
- NamedPipeTransportSecurityElement.cs
- PopupControlService.cs
- X509RecipientCertificateServiceElement.cs
- FileSystemEventArgs.cs
- EntityDataSourceWrapper.cs
- SQLByte.cs
- GenericWebPart.cs
- IChannel.cs
- DataGridView.cs
- SmtpFailedRecipientException.cs
- WebControlAdapter.cs
- COM2PropertyDescriptor.cs
- AlphabeticalEnumConverter.cs
- NotCondition.cs
- DatePickerAutomationPeer.cs
- LinearQuaternionKeyFrame.cs
- XPathEmptyIterator.cs
- MouseGestureConverter.cs
- SqlInternalConnectionTds.cs
- XamlTreeBuilder.cs
- SamlSubject.cs
- EnumerableRowCollectionExtensions.cs
- EntityDataSourceWizardForm.cs
- RecordsAffectedEventArgs.cs
- HtmlWindow.cs
- BufferedReceiveManager.cs
- BufferedResponseStream.cs
- FileEnumerator.cs
- DataObject.cs
- CellQuery.cs
- MarkupCompiler.cs
- UnaryNode.cs
- XmlSchemaAny.cs
- PageMediaSize.cs
- QueryInterceptorAttribute.cs
- Module.cs
- Size3D.cs
- XamlBuildTaskServices.cs
- NativeRightsManagementAPIsStructures.cs
- QueryOperationResponseOfT.cs
- XsltConvert.cs
- DataMemberAttribute.cs
- ProgressChangedEventArgs.cs
- TriggerActionCollection.cs
- MultiBinding.cs
- NavigationWindowAutomationPeer.cs
- MemberDescriptor.cs
- Util.cs
- BaseParser.cs
- Adorner.cs
- BitStack.cs
- ProcessStartInfo.cs
- ping.cs
- FixedSOMPage.cs
- RecordsAffectedEventArgs.cs
- MemberMaps.cs
- StateMachineHistory.cs
- IsolationInterop.cs
- DataListItem.cs
- COM2ColorConverter.cs
- MeshGeometry3D.cs
- TypeListConverter.cs
- HttpFormatExtensions.cs
- COM2IDispatchConverter.cs
- HttpRequestCacheValidator.cs
- HandlerFactoryWrapper.cs
- ChtmlTextWriter.cs
- WindowVisualStateTracker.cs
- DataControlButton.cs
- PriorityChain.cs
- InkCanvasSelection.cs