Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / Log / System / IO / Log / SmuggledIUnknown.cs / 1 / SmuggledIUnknown.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IO.Log { using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Remoting.Services; internal sealed class SmuggledIUnknown : SafeHandle { internal SmuggledIUnknown() : base(IntPtr.Zero, true) { } internal SmuggledIUnknown(object unknown) : this() { RuntimeHelpers.PrepareConstrainedRegions(); try { } finally { base.handle = Marshal.GetIUnknownForObject(unknown); } } public override bool IsInvalid { get { return (IsClosed || (IntPtr.Zero == base.handle)); } } public object Smuggle() { object comObject; RuntimeHelpers.PrepareConstrainedRegions(); try { } finally { comObject = EnterpriseServicesHelper.WrapIUnknownWithComObject(base.handle); GC.KeepAlive(this); } return comObject; } override protected bool ReleaseHandle() { if (base.handle != IntPtr.Zero) { Marshal.Release(base.handle); base.handle = IntPtr.Zero; } return true; } } } // 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
- ItemCollection.cs
- RoutedEventArgs.cs
- XamlToRtfParser.cs
- WebResourceUtil.cs
- ObjectDataSource.cs
- ProcessProtocolHandler.cs
- XmlSerializerNamespaces.cs
- NetTcpBindingCollectionElement.cs
- ExpressionLink.cs
- DataExpression.cs
- DataBindingCollectionConverter.cs
- TypeGeneratedEventArgs.cs
- WebPartCatalogCloseVerb.cs
- PeerFlooder.cs
- EncodingNLS.cs
- DoWhileDesigner.xaml.cs
- _ProxyRegBlob.cs
- GenericRootAutomationPeer.cs
- Content.cs
- WebPartTransformerAttribute.cs
- DependencyPropertyDescriptor.cs
- RemotingConfigParser.cs
- StringFreezingAttribute.cs
- ResourcesGenerator.cs
- ServiceModelSectionGroup.cs
- OleDbConnection.cs
- CheckBoxField.cs
- WebPartExportVerb.cs
- RequiredArgumentAttribute.cs
- CompiledQueryCacheEntry.cs
- Events.cs
- OleDbConnection.cs
- DbQueryCommandTree.cs
- PolicyException.cs
- DropShadowBitmapEffect.cs
- formatstringdialog.cs
- DBConnectionString.cs
- TreeView.cs
- HTMLTextWriter.cs
- RC2.cs
- XmlSchemaSimpleType.cs
- CollectionMarkupSerializer.cs
- NotConverter.cs
- EdgeProfileValidation.cs
- Enum.cs
- WeakRefEnumerator.cs
- ipaddressinformationcollection.cs
- RequestSecurityTokenSerializer.cs
- DataMemberFieldConverter.cs
- ResourcePermissionBaseEntry.cs
- FtpWebRequest.cs
- HttpFileCollection.cs
- FreeFormDesigner.cs
- DeferredSelectedIndexReference.cs
- ListArgumentProvider.cs
- DataGridViewRowConverter.cs
- SqlTypeConverter.cs
- ContextMenuAutomationPeer.cs
- DataGridViewControlCollection.cs
- MappingMetadataHelper.cs
- ExpressionTable.cs
- XPathDocument.cs
- MasterPageBuildProvider.cs
- DisplayInformation.cs
- BulletChrome.cs
- ZoneButton.cs
- regiisutil.cs
- serverconfig.cs
- UnauthorizedWebPart.cs
- XmlElementList.cs
- ListSortDescription.cs
- ContentPlaceHolder.cs
- HitTestFilterBehavior.cs
- InternalMappingException.cs
- Predicate.cs
- HwndSource.cs
- PoisonMessageException.cs
- TemplateNameScope.cs
- StrokeCollectionConverter.cs
- PointLightBase.cs
- XmlStreamStore.cs
- HttpCapabilitiesEvaluator.cs
- DurableInstanceManager.cs
- SelectionRangeConverter.cs
- OrderingQueryOperator.cs
- TargetConverter.cs
- QueryAccessibilityHelpEvent.cs
- CommandBinding.cs
- TraceListener.cs
- controlskin.cs
- InternalBase.cs
- ArrangedElement.cs
- FreeIndexList.cs
- BrowserDefinitionCollection.cs
- DeferredElementTreeState.cs
- DataTableMapping.cs
- MissingSatelliteAssemblyException.cs
- TreePrinter.cs
- SqlReferenceCollection.cs
- ExceptionHandlers.cs