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
- BadImageFormatException.cs
- LabelLiteral.cs
- ZipIOBlockManager.cs
- Utility.cs
- DesignerVerb.cs
- StructuredTypeEmitter.cs
- ProgressPage.cs
- SqlDataSourceCache.cs
- PathData.cs
- SingleObjectCollection.cs
- ServicesExceptionNotHandledEventArgs.cs
- TableCell.cs
- IntersectQueryOperator.cs
- StateChangeEvent.cs
- UnauthorizedWebPart.cs
- HwndAppCommandInputProvider.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- FormatSettings.cs
- CodeIdentifiers.cs
- DocumentScope.cs
- ActivityAction.cs
- PseudoWebRequest.cs
- ViewManager.cs
- PaintValueEventArgs.cs
- TypedTableHandler.cs
- SchemaRegistration.cs
- HttpProxyTransportBindingElement.cs
- ParameterCollectionEditor.cs
- XmlCompatibilityReader.cs
- HttpCapabilitiesSectionHandler.cs
- FlowLayoutPanel.cs
- EnlistmentTraceIdentifier.cs
- DbParameterCollection.cs
- BindingExpression.cs
- LogReservationCollection.cs
- HMACSHA256.cs
- XmlConvert.cs
- DataBoundLiteralControl.cs
- Delay.cs
- DataGridViewCellCancelEventArgs.cs
- SerialReceived.cs
- XPathBinder.cs
- Marshal.cs
- LayoutTableCell.cs
- X509AsymmetricSecurityKey.cs
- EntityTypeBase.cs
- SelectionRangeConverter.cs
- KeysConverter.cs
- CompositionTarget.cs
- RSAPKCS1KeyExchangeFormatter.cs
- TopClause.cs
- DisplayNameAttribute.cs
- SingleSelectRootGridEntry.cs
- MenuItemStyleCollection.cs
- MembershipPasswordException.cs
- OdbcFactory.cs
- Vector3D.cs
- HybridDictionary.cs
- AdRotator.cs
- UTF8Encoding.cs
- ObjectNavigationPropertyMapping.cs
- PageMediaSize.cs
- HttpRawResponse.cs
- Effect.cs
- OperationFormatStyle.cs
- WindowsListViewGroup.cs
- CodeMethodMap.cs
- ZoneButton.cs
- CorrelationManager.cs
- WebBaseEventKeyComparer.cs
- FormViewDeleteEventArgs.cs
- ClientTargetSection.cs
- TreeIterators.cs
- DataContract.cs
- HttpTransportElement.cs
- ExclusiveHandle.cs
- OracleTimeSpan.cs
- HostedHttpContext.cs
- FeatureSupport.cs
- UpdateCompiler.cs
- Documentation.cs
- PrinterSettings.cs
- OrderByQueryOptionExpression.cs
- UInt64Storage.cs
- InputGestureCollection.cs
- XmlChildEnumerator.cs
- CheckBox.cs
- HostSecurityManager.cs
- VisualProxy.cs
- WebHeaderCollection.cs
- XmlSchemaAttribute.cs
- DefaultHttpHandler.cs
- LinqTreeNodeEvaluator.cs
- SQlBooleanStorage.cs
- SmtpReplyReader.cs
- TreeNodeMouseHoverEvent.cs
- ActionNotSupportedException.cs
- SqlDataSourceDesigner.cs
- HebrewCalendar.cs
- MobileSysDescriptionAttribute.cs