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
- Operand.cs
- PropertyChangedEventArgs.cs
- HitTestWithPointDrawingContextWalker.cs
- DateTimeConverter2.cs
- configsystem.cs
- PathSegmentCollection.cs
- ArraySegment.cs
- GridLength.cs
- XmlSchemaSimpleTypeUnion.cs
- Win32Exception.cs
- LogRestartAreaEnumerator.cs
- XmlAutoDetectWriter.cs
- CodeDomLocalizationProvider.cs
- ResourceSet.cs
- Validator.cs
- SafeSecurityHelper.cs
- PropertyNames.cs
- OutputCacheSection.cs
- PaperSource.cs
- DetailsViewDeletedEventArgs.cs
- AdornerPresentationContext.cs
- EditorZoneDesigner.cs
- RuntimeResourceSet.cs
- AuthenticationException.cs
- UrlPath.cs
- ListBindingConverter.cs
- PeerOutputChannel.cs
- BypassElement.cs
- ReadOnlyDataSourceView.cs
- DispatcherHookEventArgs.cs
- Region.cs
- StandardOleMarshalObject.cs
- MessageQueueKey.cs
- DoubleCollectionConverter.cs
- InvokeGenerator.cs
- EncryptedPackage.cs
- LambdaCompiler.Binary.cs
- MimeMapping.cs
- AutomationPatternInfo.cs
- VisualBasic.cs
- RTLAwareMessageBox.cs
- HyperLinkStyle.cs
- GeneralTransform2DTo3D.cs
- RtfControls.cs
- COM2IDispatchConverter.cs
- StylusPointDescription.cs
- ListChangedEventArgs.cs
- ContainerSelectorBehavior.cs
- ProfileGroupSettings.cs
- DocumentPaginator.cs
- FontResourceCache.cs
- DiffuseMaterial.cs
- UriParserTemplates.cs
- StreamUpgradeInitiator.cs
- SiteMapHierarchicalDataSourceView.cs
- TextServicesManager.cs
- InvokeHandlers.cs
- SqlExpander.cs
- RoleGroup.cs
- VectorKeyFrameCollection.cs
- DependencyPropertyValueSerializer.cs
- EdmPropertyAttribute.cs
- SequentialUshortCollection.cs
- xmlfixedPageInfo.cs
- CodeDelegateInvokeExpression.cs
- ReadOnlyDataSourceView.cs
- ConstraintStruct.cs
- CellLabel.cs
- IsolatedStorage.cs
- TypeUsageBuilder.cs
- WindowsFont.cs
- XslException.cs
- SiteMap.cs
- ContextBase.cs
- EventSetter.cs
- BroadcastEventHelper.cs
- Root.cs
- ArglessEventHandlerProxy.cs
- DataSourceXmlElementAttribute.cs
- FixedElement.cs
- VarRefManager.cs
- DataGridViewCheckBoxColumn.cs
- validationstate.cs
- HttpHandlerAction.cs
- AlphaSortedEnumConverter.cs
- CustomSignedXml.cs
- ProxyDataContractResolver.cs
- CommandLineParser.cs
- SqlDataSourceCommandParser.cs
- RuntimeConfigurationRecord.cs
- PrimitiveCodeDomSerializer.cs
- TraceContextEventArgs.cs
- AnnotationStore.cs
- CapiSafeHandles.cs
- GatewayDefinition.cs
- Task.cs
- TagNameToTypeMapper.cs
- Single.cs
- MimeXmlImporter.cs
- EventLog.cs