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
- ToolStripContainer.cs
- WpfWebRequestHelper.cs
- UIElement3DAutomationPeer.cs
- ReadOnlyObservableCollection.cs
- MouseActionValueSerializer.cs
- newinstructionaction.cs
- UInt32.cs
- SQLChars.cs
- LinkedResourceCollection.cs
- UnsafeCollabNativeMethods.cs
- GC.cs
- SqlProfileProvider.cs
- ToolboxItem.cs
- StyleModeStack.cs
- Select.cs
- SqlCacheDependencyDatabase.cs
- CryptoApi.cs
- GroupLabel.cs
- TypeUtil.cs
- RemoveStoryboard.cs
- isolationinterop.cs
- Authorization.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- UInt64Storage.cs
- CompilationRelaxations.cs
- SpellCheck.cs
- LinqDataSourceView.cs
- TextServicesDisplayAttribute.cs
- ConfigurationPropertyAttribute.cs
- Attributes.cs
- SectionXmlInfo.cs
- XmlAttributeProperties.cs
- SslSecurityTokenParameters.cs
- ProfessionalColorTable.cs
- CrossAppDomainChannel.cs
- VisualBasicValue.cs
- FirstMatchCodeGroup.cs
- PolicyStatement.cs
- PingReply.cs
- RelationshipConstraintValidator.cs
- StylusButtonEventArgs.cs
- HtmlToClrEventProxy.cs
- MethodToken.cs
- MatrixCamera.cs
- SmiRequestExecutor.cs
- RenderingBiasValidation.cs
- LambdaValue.cs
- ConnectionInterfaceCollection.cs
- RestHandler.cs
- StringReader.cs
- DefaultShape.cs
- CharacterHit.cs
- FieldBuilder.cs
- SystemBrushes.cs
- ScalarType.cs
- ListViewItemEventArgs.cs
- ReflectionUtil.cs
- DynamicPropertyHolder.cs
- ChangePassword.cs
- ResourceDictionary.cs
- HandlerBase.cs
- ServiceCredentialsElement.cs
- InheritanceAttribute.cs
- Number.cs
- WCFBuildProvider.cs
- SoapIncludeAttribute.cs
- OracleString.cs
- _TLSstream.cs
- ipaddressinformationcollection.cs
- SchemaType.cs
- CfgParser.cs
- OpCopier.cs
- CapabilitiesAssignment.cs
- XhtmlConformanceSection.cs
- EmptyArray.cs
- ConfigurationManagerHelper.cs
- SMSvcHost.cs
- ChangePassword.cs
- CodeAttributeArgument.cs
- XComponentModel.cs
- DigitShape.cs
- ListViewSortEventArgs.cs
- BitmapDecoder.cs
- ClientRolePrincipal.cs
- MultiBinding.cs
- CultureMapper.cs
- CookieProtection.cs
- ISAPIWorkerRequest.cs
- CompoundFileReference.cs
- MessageQueueInstaller.cs
- SecurityUtils.cs
- ComplexObject.cs
- WmlLabelAdapter.cs
- DocumentPage.cs
- DiagnosticTrace.cs
- ViewStateModeByIdAttribute.cs
- ServiceSecurityAuditBehavior.cs
- CommandHelpers.cs
- DeflateStream.cs
- PropertyItemInternal.cs