Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Point3DCollection.cs
- SoapAttributes.cs
- QueryContinueDragEvent.cs
- ImageBrush.cs
- SqlServices.cs
- AVElementHelper.cs
- SponsorHelper.cs
- _emptywebproxy.cs
- webclient.cs
- BuildProvider.cs
- BlurEffect.cs
- OleStrCAMarshaler.cs
- prompt.cs
- xmlsaver.cs
- SafeThreadHandle.cs
- ThreadStateException.cs
- CodeAttributeArgumentCollection.cs
- XMLDiffLoader.cs
- TCPListener.cs
- PropertyOverridesTypeEditor.cs
- MissingMethodException.cs
- ConfigurationElementCollection.cs
- CellParaClient.cs
- DataSourceHelper.cs
- XmlSchemaCollection.cs
- SecurityContextKeyIdentifierClause.cs
- ReceiveErrorHandling.cs
- Helpers.cs
- WebHeaderCollection.cs
- Point3D.cs
- ManagementDateTime.cs
- FixedPageStructure.cs
- WindowsComboBox.cs
- BufferedWebEventProvider.cs
- DataGridPageChangedEventArgs.cs
- VectorAnimation.cs
- AutoGeneratedFieldProperties.cs
- CheckBoxField.cs
- ColumnMapVisitor.cs
- BindingNavigator.cs
- Attributes.cs
- SQlBooleanStorage.cs
- Helper.cs
- Lock.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ComponentEditorForm.cs
- DbExpressionVisitor_TResultType.cs
- PassportAuthenticationModule.cs
- PeerObject.cs
- DataGridViewDataConnection.cs
- ServiceProviders.cs
- MembershipPasswordException.cs
- FrugalMap.cs
- SqlFlattener.cs
- ToolStripItemDataObject.cs
- DataServiceStreamResponse.cs
- UpdateManifestForBrowserApplication.cs
- UserControlBuildProvider.cs
- LayoutDump.cs
- ToolStripContentPanel.cs
- DPCustomTypeDescriptor.cs
- ListItemConverter.cs
- CharacterHit.cs
- DesignerActionMethodItem.cs
- ConfigXmlCDataSection.cs
- Rect.cs
- SQLBytes.cs
- ClientType.cs
- SqlMetaData.cs
- CreateUserWizardStep.cs
- TdsParameterSetter.cs
- Helpers.cs
- IIS7WorkerRequest.cs
- ControlDesigner.cs
- PagesChangedEventArgs.cs
- NumericUpDown.cs
- ProxyElement.cs
- CssTextWriter.cs
- Point3DConverter.cs
- SchemaTableOptionalColumn.cs
- Guid.cs
- NegationPusher.cs
- WebRequestModuleElement.cs
- XmlSchemaObjectCollection.cs
- DoubleAnimationBase.cs
- ClientFormsIdentity.cs
- TimeStampChecker.cs
- ObjectQueryState.cs
- PropertyChangedEventArgs.cs
- Point3D.cs
- SignedXmlDebugLog.cs
- Facet.cs
- ReaderWriterLockWrapper.cs
- DebugInfoGenerator.cs
- SizeAnimationUsingKeyFrames.cs
- WebPartsPersonalization.cs
- DescendantQuery.cs
- DomNameTable.cs
- Misc.cs
- XmlElementList.cs