Code:
/ FX-1434 / FX-1434 / 1.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
- ManagementEventArgs.cs
- DocumentStream.cs
- SQLInt32.cs
- DateTimeFormatInfoScanner.cs
- CustomAttributeBuilder.cs
- AxisAngleRotation3D.cs
- HwndHost.cs
- ActivityWithResultValueSerializer.cs
- ImageList.cs
- HttpServerVarsCollection.cs
- IPipelineRuntime.cs
- ToolStripSystemRenderer.cs
- DateTimeParse.cs
- OverrideMode.cs
- SurrogateDataContract.cs
- ByteStack.cs
- LogPolicy.cs
- StringExpressionSet.cs
- ILGenerator.cs
- Converter.cs
- ScalarType.cs
- SwitchLevelAttribute.cs
- SqlGenerator.cs
- SQLDouble.cs
- PropertyFilterAttribute.cs
- HotCommands.cs
- IntellisenseTextBox.cs
- LifetimeMonitor.cs
- MeshGeometry3D.cs
- DataListItemCollection.cs
- TimeoutValidationAttribute.cs
- NetPeerTcpBindingElement.cs
- StringValidator.cs
- CounterSample.cs
- SQLInt32Storage.cs
- CurrentTimeZone.cs
- SimpleColumnProvider.cs
- WindowsPrincipal.cs
- HitTestFilterBehavior.cs
- ImageMapEventArgs.cs
- ObjectNavigationPropertyMapping.cs
- DataPagerFieldItem.cs
- FloaterParagraph.cs
- Interlocked.cs
- SubpageParaClient.cs
- TimeoutConverter.cs
- LoginCancelEventArgs.cs
- QueryCacheEntry.cs
- ItemList.cs
- DbDataReader.cs
- DataGridViewButtonCell.cs
- Query.cs
- Quaternion.cs
- IWorkflowDebuggerService.cs
- BindingMAnagerBase.cs
- EntryPointNotFoundException.cs
- CssStyleCollection.cs
- TransformPattern.cs
- XmlObjectSerializerWriteContext.cs
- MenuTracker.cs
- Matrix.cs
- ComponentResourceKey.cs
- AsymmetricKeyExchangeFormatter.cs
- ObjectTag.cs
- SspiHelper.cs
- UpDownEvent.cs
- AllMembershipCondition.cs
- WebServiceMethodData.cs
- MatchAttribute.cs
- BaseComponentEditor.cs
- StorageInfo.cs
- XmlSchemaInclude.cs
- MethodCallConverter.cs
- CatalogZoneDesigner.cs
- AsynchronousChannel.cs
- SerializerDescriptor.cs
- RestHandlerFactory.cs
- TreeNodeBinding.cs
- CollectionDataContract.cs
- AlgoModule.cs
- SecurityState.cs
- ReaderOutput.cs
- validationstate.cs
- TypeSemantics.cs
- ItemChangedEventArgs.cs
- FontStyles.cs
- XhtmlBasicValidatorAdapter.cs
- AccessibleObject.cs
- DataGridViewTopRowAccessibleObject.cs
- StylusButton.cs
- PostBackTrigger.cs
- SByteStorage.cs
- TransactionFlowElement.cs
- PackWebResponse.cs
- ColorMatrix.cs
- ImageClickEventArgs.cs
- PathSegment.cs
- HttpNamespaceReservationInstallComponent.cs
- PrintControllerWithStatusDialog.cs
- PolyLineSegment.cs