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
- EndpointDiscoveryBehavior.cs
- XmlWellformedWriter.cs
- HashAlgorithm.cs
- BindingExpressionBase.cs
- SettingsPropertyNotFoundException.cs
- AssemblyAttributes.cs
- PointHitTestParameters.cs
- StructuralType.cs
- CollectionDataContractAttribute.cs
- Span.cs
- ModelFactory.cs
- XmlSchemaDatatype.cs
- UInt64Storage.cs
- GetParentChain.cs
- PropertyEmitter.cs
- ControlBuilderAttribute.cs
- KeyInfo.cs
- DataGridViewColumnCollection.cs
- RIPEMD160.cs
- TimerEventSubscription.cs
- BinaryReader.cs
- Rule.cs
- DaylightTime.cs
- InstanceKeyCollisionException.cs
- TableParagraph.cs
- HashCryptoHandle.cs
- FtpWebResponse.cs
- InheritedPropertyChangedEventArgs.cs
- RoleServiceManager.cs
- DataStorage.cs
- NameTable.cs
- DataTransferEventArgs.cs
- ContentHostHelper.cs
- WebPartConnectionsCloseVerb.cs
- WebContext.cs
- DataTableNewRowEvent.cs
- ExpressionEditorSheet.cs
- ToolStripRenderEventArgs.cs
- compensatingcollection.cs
- RequestStatusBarUpdateEventArgs.cs
- ResourceReferenceExpressionConverter.cs
- ActiveXSite.cs
- WriteableBitmap.cs
- ErrorHandlingReceiver.cs
- ZoneIdentityPermission.cs
- SocketCache.cs
- WindowsClientCredential.cs
- ClosableStream.cs
- EdmType.cs
- ThemeableAttribute.cs
- ReaderOutput.cs
- ChangeInterceptorAttribute.cs
- AppDomain.cs
- DBCSCodePageEncoding.cs
- CursorEditor.cs
- XmlDataDocument.cs
- WindowsAuthenticationModule.cs
- PreservationFileWriter.cs
- MouseEvent.cs
- AttributeUsageAttribute.cs
- XsdBuildProvider.cs
- StateRuntime.cs
- ImageClickEventArgs.cs
- ClientFormsIdentity.cs
- ProtocolInformationReader.cs
- MsmqIntegrationMessageProperty.cs
- DataGridCellClipboardEventArgs.cs
- SynchronizedChannelCollection.cs
- PasswordDeriveBytes.cs
- FunctionImportMapping.cs
- RefreshPropertiesAttribute.cs
- Utils.cs
- NativeRecognizer.cs
- SubtreeProcessor.cs
- BindingExpression.cs
- VBIdentifierTrimConverter.cs
- URIFormatException.cs
- BaseParagraph.cs
- RawMouseInputReport.cs
- ConfigXmlCDataSection.cs
- CloseCollectionAsyncResult.cs
- InkPresenterAutomationPeer.cs
- NameNode.cs
- DbParameterHelper.cs
- ExpressionBuilder.cs
- WSHttpSecurity.cs
- TreeViewHitTestInfo.cs
- Predicate.cs
- DockingAttribute.cs
- FlagsAttribute.cs
- ConfigurationStrings.cs
- XmlEntityReference.cs
- PropertyPathWorker.cs
- RoleGroup.cs
- CodeAttributeArgumentCollection.cs
- BufferedWebEventProvider.cs
- RubberbandSelector.cs
- ServiceBehaviorElement.cs
- SimpleMailWebEventProvider.cs
- PrePostDescendentsWalker.cs