Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StorageComplexTypeMapping.cs
- XsdSchemaFileEditor.cs
- Visual3D.cs
- BaseValidator.cs
- SystemIPInterfaceStatistics.cs
- DBSqlParserTableCollection.cs
- ContextToken.cs
- PassportAuthenticationEventArgs.cs
- CustomErrorCollection.cs
- Conditional.cs
- XslTransform.cs
- PrintDocument.cs
- RsaKeyIdentifierClause.cs
- HtmlTableRowCollection.cs
- messageonlyhwndwrapper.cs
- JsonWriterDelegator.cs
- FunctionNode.cs
- ConfigurationManagerInternal.cs
- PasswordRecoveryDesigner.cs
- NavigationWindowAutomationPeer.cs
- FilterElement.cs
- ResponseBodyWriter.cs
- StrongNameMembershipCondition.cs
- MediaTimeline.cs
- Thickness.cs
- TreeViewImageIndexConverter.cs
- TextAdaptor.cs
- RijndaelCryptoServiceProvider.cs
- IUnknownConstantAttribute.cs
- DbModificationClause.cs
- DataSetViewSchema.cs
- GlyphingCache.cs
- XmlSchemaDocumentation.cs
- FlowDocumentFormatter.cs
- storepermissionattribute.cs
- SecurityElement.cs
- UnitySerializationHolder.cs
- InputScope.cs
- Matrix3D.cs
- ListViewGroupCollectionEditor.cs
- DrawItemEvent.cs
- PrintController.cs
- Splitter.cs
- ADRoleFactoryConfiguration.cs
- RecommendedAsConfigurableAttribute.cs
- OutgoingWebRequestContext.cs
- DocumentSequence.cs
- XmlSerializableWriter.cs
- ExtensionSimplifierMarkupObject.cs
- OptionUsage.cs
- ClientScriptManager.cs
- TextTreeRootTextBlock.cs
- AuthenticationServiceManager.cs
- ExpandCollapsePattern.cs
- PrivateFontCollection.cs
- Column.cs
- TextFormattingConverter.cs
- KerberosReceiverSecurityToken.cs
- TimeIntervalCollection.cs
- _LazyAsyncResult.cs
- SqlRemoveConstantOrderBy.cs
- WindowsListViewGroup.cs
- KeysConverter.cs
- AuthenticatedStream.cs
- ManifestSignatureInformation.cs
- CredentialCache.cs
- CustomErrorsSectionWrapper.cs
- XmlDataDocument.cs
- NetPeerTcpBinding.cs
- XmlNavigatorFilter.cs
- ContextMenuStrip.cs
- DataBindingCollectionConverter.cs
- indexingfiltermarshaler.cs
- SubMenuStyleCollection.cs
- DefaultBinder.cs
- CreateCardRequest.cs
- ContentFilePart.cs
- CurrentChangingEventManager.cs
- OleDbFactory.cs
- TypeContext.cs
- BinaryFormatterWriter.cs
- Control.cs
- CompiledQuery.cs
- ListViewInsertEventArgs.cs
- DataObjectPastingEventArgs.cs
- AuthenticationModuleElementCollection.cs
- relpropertyhelper.cs
- WebResponse.cs
- SubqueryRules.cs
- MonthCalendar.cs
- PasswordTextContainer.cs
- Rfc2898DeriveBytes.cs
- EntityModelSchemaGenerator.cs
- RadioButtonFlatAdapter.cs
- XmlChoiceIdentifierAttribute.cs
- TransactionScope.cs
- PartitionResolver.cs
- QilChoice.cs
- WizardPanelChangingEventArgs.cs
- AppSettings.cs