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
- Ray3DHitTestResult.cs
- StatusBarPanel.cs
- SemanticTag.cs
- NullableLongAverageAggregationOperator.cs
- RequestBringIntoViewEventArgs.cs
- MarkupCompilePass1.cs
- ToolStripDropDownItem.cs
- RelationshipFixer.cs
- XPathMultyIterator.cs
- TextProviderWrapper.cs
- CustomErrorsSection.cs
- NetworkStream.cs
- ContentElementAutomationPeer.cs
- CodeTypeReferenceCollection.cs
- BooleanAnimationUsingKeyFrames.cs
- WpfSharedXamlSchemaContext.cs
- DirectoryInfo.cs
- ToolStripDropTargetManager.cs
- _DynamicWinsockMethods.cs
- AddInIpcChannel.cs
- PointCollection.cs
- PropertyConverter.cs
- CodeObjectCreateExpression.cs
- ExceptionTrace.cs
- Util.cs
- CompoundFileStorageReference.cs
- ScriptingSectionGroup.cs
- UrlAuthorizationModule.cs
- GlyphRunDrawing.cs
- Utilities.cs
- DataSetSchema.cs
- CommentAction.cs
- DiagnosticsConfigurationHandler.cs
- RegisteredExpandoAttribute.cs
- AccessibilityHelperForXpWin2k3.cs
- SelectionItemPatternIdentifiers.cs
- AsymmetricKeyExchangeDeformatter.cs
- SolidBrush.cs
- SqlTriggerAttribute.cs
- DeclarationUpdate.cs
- SynchronizingStream.cs
- TabControlAutomationPeer.cs
- AuthenticatedStream.cs
- AuthenticationService.cs
- Nullable.cs
- Currency.cs
- BitmapMetadataEnumerator.cs
- TabControl.cs
- followingquery.cs
- FeatureAttribute.cs
- UriSection.cs
- GridItem.cs
- _UriSyntax.cs
- C14NUtil.cs
- RegistryPermission.cs
- InteropBitmapSource.cs
- DecimalAnimationBase.cs
- OuterGlowBitmapEffect.cs
- DataGridViewComboBoxEditingControl.cs
- DataGridViewCellPaintingEventArgs.cs
- Byte.cs
- SkewTransform.cs
- SQLDoubleStorage.cs
- SqlStatistics.cs
- ColumnCollection.cs
- BitmapEffect.cs
- WebPartChrome.cs
- OleDbPermission.cs
- SudsParser.cs
- FlowLayout.cs
- GridProviderWrapper.cs
- SettingsAttributes.cs
- codemethodreferenceexpression.cs
- DependencyPropertyAttribute.cs
- dsa.cs
- HttpRequest.cs
- PropertyInformationCollection.cs
- PerformanceCounterLib.cs
- ZipIOExtraFieldPaddingElement.cs
- OleStrCAMarshaler.cs
- LocalizeDesigner.cs
- DataGridColumnCollection.cs
- MetadataItemEmitter.cs
- ProtectedConfigurationSection.cs
- QilInvokeLateBound.cs
- SizeAnimation.cs
- ContentControl.cs
- LexicalChunk.cs
- ScriptHandlerFactory.cs
- CompoundFileIOPermission.cs
- SecurityVersion.cs
- XmlQualifiedName.cs
- DataListItemEventArgs.cs
- GiveFeedbackEventArgs.cs
- AuthenticationModuleElementCollection.cs
- ElementInit.cs
- FilterRepeater.cs
- EditorBrowsableAttribute.cs
- OdbcConnectionPoolProviderInfo.cs
- JsonServiceDocumentSerializer.cs