Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / InteropServices / DispatchWrapper.cs / 1305376 / 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 { [System.Security.SecuritySafeCritical] // auto-generated [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
- MachineKeyConverter.cs
- Vector3D.cs
- SchemaImporter.cs
- MdiWindowListItemConverter.cs
- AsyncResult.cs
- ArrayElementGridEntry.cs
- HttpClientChannel.cs
- LexicalChunk.cs
- DecimalAnimation.cs
- AuthorizationRule.cs
- BufferModeSettings.cs
- Highlights.cs
- RegexMatch.cs
- ConfigXmlDocument.cs
- RegexCapture.cs
- WaitHandleCannotBeOpenedException.cs
- MissingMemberException.cs
- FileVersion.cs
- TaskFileService.cs
- TextRenderer.cs
- XmlSchemaSimpleType.cs
- XmlNotation.cs
- SyndicationPerson.cs
- LocalizedNameDescriptionPair.cs
- HTMLTagNameToTypeMapper.cs
- MultiByteCodec.cs
- XDeferredAxisSource.cs
- EventlogProvider.cs
- ConnectionStringSettings.cs
- DbTransaction.cs
- IdentityManager.cs
- BamlTreeMap.cs
- SpecialTypeDataContract.cs
- NumberFormatInfo.cs
- PropertyInfoSet.cs
- Int16AnimationBase.cs
- ClientScriptItem.cs
- DataGridViewComboBoxColumn.cs
- BezierSegment.cs
- ResourceManagerWrapper.cs
- CodeDelegateCreateExpression.cs
- TableLayoutStyleCollection.cs
- StoragePropertyMapping.cs
- PointLight.cs
- ControlBuilderAttribute.cs
- TypeElement.cs
- ContextMenuStrip.cs
- Delegate.cs
- MethodImplAttribute.cs
- ArrayTypeMismatchException.cs
- SkipQueryOptionExpression.cs
- ResolveMatchesApril2005.cs
- IdentityHolder.cs
- ReturnEventArgs.cs
- NodeCounter.cs
- DataControlImageButton.cs
- DirectionalLight.cs
- MembershipPasswordException.cs
- DetailsViewDeletedEventArgs.cs
- TypePresenter.xaml.cs
- CDSCollectionETWBCLProvider.cs
- MetadataFile.cs
- SqlTopReducer.cs
- PeerNameResolver.cs
- PersonalizableTypeEntry.cs
- PackageRelationshipCollection.cs
- NotificationContext.cs
- Transform3DCollection.cs
- Collection.cs
- CompositeScriptReference.cs
- CodeMethodReturnStatement.cs
- SQLBinary.cs
- CompensatableSequenceActivity.cs
- WebBrowsableAttribute.cs
- Base64Encoder.cs
- NullableFloatAverageAggregationOperator.cs
- ColumnMapProcessor.cs
- HiddenField.cs
- ChannelTracker.cs
- ButtonBaseAutomationPeer.cs
- PrimitiveDataContract.cs
- DataGridViewCellCancelEventArgs.cs
- TreeBuilderXamlTranslator.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- XPathSelectionIterator.cs
- HttpResponseInternalWrapper.cs
- DataGridViewCheckBoxColumn.cs
- StickyNoteContentControl.cs
- DoubleCollectionConverter.cs
- Pen.cs
- ConsoleKeyInfo.cs
- CounterCreationDataCollection.cs
- MetadataPropertyAttribute.cs
- Function.cs
- SslStream.cs
- Random.cs
- SubMenuStyle.cs
- XmlElementCollection.cs
- ArglessEventHandlerProxy.cs
- IOException.cs