Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectDataSourceMethodEditor.cs
- WebPermission.cs
- SiteMembershipCondition.cs
- BitmapDownload.cs
- PrintPreviewControl.cs
- StoryFragments.cs
- TypeConverterValueSerializer.cs
- ObjectManager.cs
- DeferredReference.cs
- FrameworkContentElement.cs
- EventLogTraceListener.cs
- InternalResources.cs
- DetailsViewPagerRow.cs
- AdornerHitTestResult.cs
- ListBindingConverter.cs
- CapiSymmetricAlgorithm.cs
- NetStream.cs
- InvalidOleVariantTypeException.cs
- NativeMethods.cs
- Int32AnimationBase.cs
- BindingWorker.cs
- BitmapEffect.cs
- MailDefinition.cs
- CqlLexerHelpers.cs
- TemplatePartAttribute.cs
- MimeTypePropertyAttribute.cs
- SQLBinary.cs
- FragmentNavigationEventArgs.cs
- UniqueConstraint.cs
- DockingAttribute.cs
- WorkflowOperationFault.cs
- TrackingLocation.cs
- LayoutTableCell.cs
- Operand.cs
- TagNameToTypeMapper.cs
- QilGeneratorEnv.cs
- TextDocumentView.cs
- StorageInfo.cs
- AutomationPropertyInfo.cs
- ReadWriteSpinLock.cs
- ListSourceHelper.cs
- TextEvent.cs
- WebSysDisplayNameAttribute.cs
- CommandManager.cs
- FileLoadException.cs
- WebPartCancelEventArgs.cs
- ListItem.cs
- SortExpressionBuilder.cs
- RawMouseInputReport.cs
- ApplicationManager.cs
- TableHeaderCell.cs
- FolderBrowserDialog.cs
- GridItemCollection.cs
- SweepDirectionValidation.cs
- VectorCollectionValueSerializer.cs
- TargetFrameworkAttribute.cs
- InkCanvas.cs
- ProtectedConfigurationSection.cs
- TriggerActionCollection.cs
- RadioButton.cs
- MemoryMappedFileSecurity.cs
- WmfPlaceableFileHeader.cs
- PropertyGrid.cs
- LocatorPartList.cs
- Int64AnimationUsingKeyFrames.cs
- Pen.cs
- MDIWindowDialog.cs
- ListenerUnsafeNativeMethods.cs
- NativeMethods.cs
- MimeMapping.cs
- DropDownButton.cs
- TargetControlTypeCache.cs
- StyleTypedPropertyAttribute.cs
- WindowManager.cs
- Viewport3DAutomationPeer.cs
- WindowShowOrOpenTracker.cs
- RequestCacheManager.cs
- HandleRef.cs
- DataViewManager.cs
- ThemeableAttribute.cs
- LinkedResource.cs
- IndicShape.cs
- CacheMemory.cs
- MetadataCache.cs
- LineSegment.cs
- SafeMemoryMappedFileHandle.cs
- FontInfo.cs
- ContractBase.cs
- NumberEdit.cs
- SchemaType.cs
- VisualStyleRenderer.cs
- DecimalAnimationUsingKeyFrames.cs
- UnsafeNativeMethods.cs
- SparseMemoryStream.cs
- Enumerable.cs
- PackageStore.cs
- PropertyRecord.cs
- OverloadGroupAttribute.cs
- ReadOnlyTernaryTree.cs
- WebServiceHost.cs