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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmiEventSink_DeferedProcessing.cs
- DataGridViewCellStateChangedEventArgs.cs
- SqlMethodCallConverter.cs
- ValidationResult.cs
- MatrixUtil.cs
- XmlILStorageConverter.cs
- ExecutionEngineException.cs
- SmtpFailedRecipientException.cs
- GlobalizationAssembly.cs
- httpserverutility.cs
- DateTimeUtil.cs
- SecurityException.cs
- ListViewSelectEventArgs.cs
- DaylightTime.cs
- CopyCodeAction.cs
- GridViewRowPresenterBase.cs
- StdValidatorsAndConverters.cs
- ToolStripSystemRenderer.cs
- ImmComposition.cs
- AttributeXamlType.cs
- GridViewRow.cs
- DataViewSettingCollection.cs
- ResourceExpressionBuilder.cs
- odbcmetadatacollectionnames.cs
- SqlWorkflowPersistenceService.cs
- IndentedWriter.cs
- PersianCalendar.cs
- WindowsSecurityTokenAuthenticator.cs
- ConsoleKeyInfo.cs
- TimeSpanMinutesConverter.cs
- FixedSOMGroup.cs
- TextBoxDesigner.cs
- DataControlPagerLinkButton.cs
- MailSettingsSection.cs
- EdmItemCollection.cs
- HtmlFormWrapper.cs
- xsdvalidator.cs
- precedingquery.cs
- BinaryUtilClasses.cs
- SafeNativeMethodsOther.cs
- SQLBinary.cs
- AvTrace.cs
- CqlQuery.cs
- CompiledScopeCriteria.cs
- OleDbEnumerator.cs
- Buffer.cs
- streamingZipPartStream.cs
- MaskedTextProvider.cs
- HttpAsyncResult.cs
- XmlMembersMapping.cs
- AssociationEndMember.cs
- Msmq4PoisonHandler.cs
- _OverlappedAsyncResult.cs
- CodeSnippetTypeMember.cs
- DataGrid.cs
- PropertyGridEditorPart.cs
- NamespaceDecl.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- TimeSpanConverter.cs
- ConfigurationStrings.cs
- ObjectDataSourceFilteringEventArgs.cs
- ThousandthOfEmRealDoubles.cs
- DragDropManager.cs
- WinInet.cs
- Message.cs
- PipelineModuleStepContainer.cs
- SafeMILHandle.cs
- RectKeyFrameCollection.cs
- CharacterMetrics.cs
- CryptoApi.cs
- WmpBitmapDecoder.cs
- RemoteCryptoRsaServiceProvider.cs
- HtmlTableRow.cs
- _Rfc2616CacheValidators.cs
- KeyConstraint.cs
- PathGeometry.cs
- TrustLevel.cs
- AssertSection.cs
- SpAudioStreamWrapper.cs
- WebPartConnectionsEventArgs.cs
- DocumentViewer.cs
- AppDomainUnloadedException.cs
- DiscoveryDocumentReference.cs
- MembershipSection.cs
- DataBindingExpressionBuilder.cs
- AxisAngleRotation3D.cs
- NoneExcludedImageIndexConverter.cs
- ObjectDataSourceView.cs
- MenuAutomationPeer.cs
- ColumnMap.cs
- QueryableDataSourceView.cs
- XmlC14NWriter.cs
- NodeLabelEditEvent.cs
- AppSettingsExpressionBuilder.cs
- ViewGenerator.cs
- BufferedStream.cs
- DesignerAdRotatorAdapter.cs
- Internal.cs
- GroupBox.cs
- EventNotify.cs