Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Image.cs
- WebConfigurationHostFileChange.cs
- CacheAxisQuery.cs
- XmlSerializerFactory.cs
- SecurityRuntime.cs
- KeyTime.cs
- entitydatasourceentitysetnameconverter.cs
- DesignBindingPropertyDescriptor.cs
- LabelEditEvent.cs
- SqlBuffer.cs
- DragDropManager.cs
- SamlAuthorizationDecisionClaimResource.cs
- WindowsTreeView.cs
- DataKey.cs
- DesignerCategoryAttribute.cs
- VScrollProperties.cs
- OpenTypeMethods.cs
- Button.cs
- ToggleButtonAutomationPeer.cs
- Brushes.cs
- smtpconnection.cs
- ExceptionRoutedEventArgs.cs
- ControlPaint.cs
- Message.cs
- FixedHighlight.cs
- SafeNativeMethods.cs
- Metadata.cs
- MimeWriter.cs
- EndCreateSecurityTokenRequest.cs
- HandleRef.cs
- CustomWebEventKey.cs
- BreakRecordTable.cs
- FrameworkPropertyMetadata.cs
- WebPartTransformerAttribute.cs
- InternalMappingException.cs
- SqlFunctionAttribute.cs
- _RequestCacheProtocol.cs
- _FtpControlStream.cs
- CustomValidator.cs
- Baml2006KeyRecord.cs
- ApplicationProxyInternal.cs
- BufferAllocator.cs
- Interlocked.cs
- XmlSchemaSimpleContentExtension.cs
- DataGridViewCellStyleChangedEventArgs.cs
- PolygonHotSpot.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- HttpTransportSecurity.cs
- Compiler.cs
- TextEditorLists.cs
- AppDomainFactory.cs
- KeyedPriorityQueue.cs
- MappingModelBuildProvider.cs
- WorkflowOperationInvoker.cs
- SmtpDigestAuthenticationModule.cs
- BitmapVisualManager.cs
- InputBindingCollection.cs
- SessionIDManager.cs
- MessageEnumerator.cs
- RequiredFieldValidator.cs
- CoreSwitches.cs
- Timeline.cs
- DesignerAutoFormatStyle.cs
- Parameter.cs
- LinkLabel.cs
- SoapInteropTypes.cs
- NegotiationTokenAuthenticatorState.cs
- AsnEncodedData.cs
- EdmComplexPropertyAttribute.cs
- DataObjectSettingDataEventArgs.cs
- PolyLineSegment.cs
- SerTrace.cs
- __Filters.cs
- PageAsyncTask.cs
- ValueSerializerAttribute.cs
- MiniLockedBorderGlyph.cs
- FontUnitConverter.cs
- indexingfiltermarshaler.cs
- LinqDataSourceDeleteEventArgs.cs
- RootBuilder.cs
- DefaultPrintController.cs
- ByteArrayHelperWithString.cs
- MemberMaps.cs
- QueryLifecycle.cs
- HandlerWithFactory.cs
- AudioFormatConverter.cs
- OpenFileDialog.cs
- ClientScriptManager.cs
- SqlDesignerDataSourceView.cs
- XamlClipboardData.cs
- ExternalException.cs
- TraversalRequest.cs
- UpDownEvent.cs
- BridgeDataRecord.cs
- TiffBitmapDecoder.cs
- PrintPreviewDialog.cs
- StrokeCollectionDefaultValueFactory.cs
- ReplyChannelAcceptor.cs
- IPGlobalProperties.cs
- QueryStringParameter.cs