Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaSimpleContentExtension.cs
- DbParameterHelper.cs
- ReadOnlyDictionary.cs
- DataControlFieldsEditor.cs
- SafeCryptoHandles.cs
- BooleanProjectedSlot.cs
- HttpProfileGroupBase.cs
- ToolBar.cs
- TranslateTransform.cs
- StyleCollection.cs
- ExcludeFromCodeCoverageAttribute.cs
- XmlSchemaGroupRef.cs
- UnsafeNativeMethods.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- DropShadowBitmapEffect.cs
- FamilyMap.cs
- AccessViolationException.cs
- AlphabeticalEnumConverter.cs
- ServiceCredentialsSecurityTokenManager.cs
- WebPartZoneBaseDesigner.cs
- ParseNumbers.cs
- ReadOnlyNameValueCollection.cs
- ScaleTransform.cs
- OdbcConnectionStringbuilder.cs
- DragAssistanceManager.cs
- wmiprovider.cs
- Currency.cs
- DependentList.cs
- ProfileSection.cs
- RewritingValidator.cs
- DocumentXmlWriter.cs
- CreationContext.cs
- PropertiesTab.cs
- ScrollPatternIdentifiers.cs
- MsmqTransportElement.cs
- EntryIndex.cs
- HttpCapabilitiesSectionHandler.cs
- SqlBulkCopy.cs
- Timer.cs
- MapPathBasedVirtualPathProvider.cs
- CompoundFileIOPermission.cs
- SemaphoreFullException.cs
- BuildProviderCollection.cs
- HMACSHA256.cs
- ADMembershipProvider.cs
- EventlogProvider.cs
- MessageBox.cs
- CLRBindingWorker.cs
- WeakRefEnumerator.cs
- ADConnectionHelper.cs
- BinaryEditor.cs
- SmtpFailedRecipientException.cs
- ProfileGroupSettings.cs
- TcpConnectionPoolSettingsElement.cs
- PropertyGeneratedEventArgs.cs
- StylusShape.cs
- CompiledRegexRunnerFactory.cs
- CodeSubDirectory.cs
- BindStream.cs
- BamlLocalizer.cs
- LinearQuaternionKeyFrame.cs
- JsonServiceDocumentSerializer.cs
- Stylus.cs
- Material.cs
- URLString.cs
- EntityDataSourceViewSchema.cs
- PersonalizationStateQuery.cs
- IndexerNameAttribute.cs
- ThemeDirectoryCompiler.cs
- GenericPrincipal.cs
- TimeSpanHelper.cs
- WeakEventManager.cs
- BamlLocalizabilityResolver.cs
- PreDigestedSignedInfo.cs
- ListViewDataItem.cs
- StorageScalarPropertyMapping.cs
- DrawingContextDrawingContextWalker.cs
- DataGridViewCellStyle.cs
- NotImplementedException.cs
- TextParentUndoUnit.cs
- APCustomTypeDescriptor.cs
- JournalEntryListConverter.cs
- CmsInterop.cs
- RelationshipEnd.cs
- FullTextLine.cs
- DataContext.cs
- TypeListConverter.cs
- IntegerValidatorAttribute.cs
- MenuEventArgs.cs
- RepeatButtonAutomationPeer.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- JoinTreeSlot.cs
- XmlWriterDelegator.cs
- XmlHierarchyData.cs
- WebPartEventArgs.cs
- RenderData.cs
- LineServicesCallbacks.cs
- XmlSchemaAppInfo.cs
- ReadWriteSpinLock.cs
- ContentValidator.cs