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
- CodeExpressionStatement.cs
- DbDeleteCommandTree.cs
- AttributeSetAction.cs
- NativeObjectSecurity.cs
- PropertyMapper.cs
- Polyline.cs
- CopyCodeAction.cs
- SR.cs
- ResourceBinder.cs
- DocumentXPathNavigator.cs
- ProfileEventArgs.cs
- DbCommandTree.cs
- XmlRawWriter.cs
- TransformedBitmap.cs
- Point3D.cs
- FormsIdentity.cs
- CfgParser.cs
- TraceUtils.cs
- VSDExceptions.cs
- SoapReflectionImporter.cs
- XamlHttpHandlerFactory.cs
- TextRangeBase.cs
- ServiceModelPerformanceCounters.cs
- TransformConverter.cs
- HtmlInputControl.cs
- BuildProvider.cs
- RegexCapture.cs
- PlatformNotSupportedException.cs
- WebPartVerbCollection.cs
- KeyMatchBuilder.cs
- LineInfo.cs
- ErrorWebPart.cs
- StorageMappingItemLoader.cs
- TextSpan.cs
- ScaleTransform3D.cs
- TemplateComponentConnector.cs
- AssemblyCache.cs
- RecordBuilder.cs
- FacetChecker.cs
- PartitionedStream.cs
- IntPtr.cs
- HostingMessageProperty.cs
- GregorianCalendar.cs
- AnnotationComponentManager.cs
- ReadOnlyTernaryTree.cs
- DataBindingExpressionBuilder.cs
- ControlUtil.cs
- SystemTcpConnection.cs
- ThicknessConverter.cs
- HttpDictionary.cs
- ArgumentException.cs
- ApplyImportsAction.cs
- IntranetCredentialPolicy.cs
- BindingList.cs
- SchemaImporterExtensionsSection.cs
- PassportAuthentication.cs
- SdlChannelSink.cs
- Double.cs
- ElementMarkupObject.cs
- RemoteCryptoDecryptRequest.cs
- Pens.cs
- CopyNodeSetAction.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- SrgsDocumentParser.cs
- ImmComposition.cs
- MinimizableAttributeTypeConverter.cs
- DeclarativeCatalogPart.cs
- PaginationProgressEventArgs.cs
- DataGridViewAccessibleObject.cs
- StatusBar.cs
- FilteredXmlReader.cs
- XmlIlTypeHelper.cs
- OpenTypeLayout.cs
- ArrayConverter.cs
- _DisconnectOverlappedAsyncResult.cs
- StylusLogic.cs
- Token.cs
- DashStyle.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SignatureHelper.cs
- DTCTransactionManager.cs
- OleDbException.cs
- VersionPair.cs
- RowUpdatedEventArgs.cs
- Accessible.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ProtocolsSection.cs
- ObjectListCommandCollection.cs
- StsCommunicationException.cs
- UnlockInstanceCommand.cs
- VScrollBar.cs
- MatrixCamera.cs
- DataGridViewImageCell.cs
- PropertyTab.cs
- ServiceInstanceProvider.cs
- TimeSpanSecondsConverter.cs
- FixedDocumentSequencePaginator.cs
- TabItemWrapperAutomationPeer.cs
- SoapTypeAttribute.cs
- ProvidersHelper.cs