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
- DataGridViewCellStyleBuilderDialog.cs
- XmlSchemaAll.cs
- ToolStripSystemRenderer.cs
- ConstantExpression.cs
- MergePropertyDescriptor.cs
- ChannelPoolSettings.cs
- DocumentViewerBase.cs
- Material.cs
- IntranetCredentialPolicy.cs
- DocumentViewerConstants.cs
- HotSpotCollection.cs
- TextInfo.cs
- StateMachineWorkflowInstance.cs
- PixelFormat.cs
- _AutoWebProxyScriptWrapper.cs
- ResourceWriter.cs
- ZipArchive.cs
- ClickablePoint.cs
- ResourceContainer.cs
- WindowsScrollBar.cs
- RemotingSurrogateSelector.cs
- ImageBrush.cs
- CommandBindingCollection.cs
- Zone.cs
- Group.cs
- WindowsEditBoxRange.cs
- FilteredAttributeCollection.cs
- ObjectDataSourceDisposingEventArgs.cs
- BatchServiceHost.cs
- WebBrowsableAttribute.cs
- MissingManifestResourceException.cs
- sqlmetadatafactory.cs
- DockProviderWrapper.cs
- BuildDependencySet.cs
- Cursor.cs
- UIElement3DAutomationPeer.cs
- BrowserCapabilitiesFactoryBase.cs
- RegexWorker.cs
- BuildResultCache.cs
- EditorPartDesigner.cs
- DataGridViewTopLeftHeaderCell.cs
- ToolStripButton.cs
- CodeAccessPermission.cs
- _Connection.cs
- FolderLevelBuildProvider.cs
- HttpRuntime.cs
- UriScheme.cs
- EmptyImpersonationContext.cs
- AuthorizationRuleCollection.cs
- EntityModelBuildProvider.cs
- EDesignUtil.cs
- SqlXmlStorage.cs
- ConstraintCollection.cs
- WebDisplayNameAttribute.cs
- DockAndAnchorLayout.cs
- ListDictionary.cs
- LicenseContext.cs
- RequiredFieldValidator.cs
- PackWebRequest.cs
- RMEnrollmentPage2.cs
- ConfigsHelper.cs
- TextTreeRootNode.cs
- PropertyCondition.cs
- Substitution.cs
- Viewport3DAutomationPeer.cs
- NavigationService.cs
- RayMeshGeometry3DHitTestResult.cs
- DisplayNameAttribute.cs
- InstanceDescriptor.cs
- DecoderExceptionFallback.cs
- GridSplitterAutomationPeer.cs
- SpecialFolderEnumConverter.cs
- NumericUpDownAcceleration.cs
- TriggerActionCollection.cs
- DataGridSortCommandEventArgs.cs
- TraceSource.cs
- ParallelTimeline.cs
- ParameterBuilder.cs
- DocumentViewerBaseAutomationPeer.cs
- ControlPropertyNameConverter.cs
- UserPersonalizationStateInfo.cs
- PropertyItem.cs
- EncryptedPackageFilter.cs
- KerberosSecurityTokenAuthenticator.cs
- MachineKeyConverter.cs
- ProtocolReflector.cs
- ApplicationBuildProvider.cs
- Speller.cs
- CodeTypeReference.cs
- PackageRelationship.cs
- DesignOnlyAttribute.cs
- ModelPropertyImpl.cs
- TimerExtension.cs
- GuidelineSet.cs
- CacheRequest.cs
- XomlCompilerParameters.cs
- SystemResourceKey.cs
- XmlValidatingReaderImpl.cs
- SafeLocalAllocation.cs
- CodeConditionStatement.cs