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
- AdjustableArrowCap.cs
- dtdvalidator.cs
- BrowserCapabilitiesCodeGenerator.cs
- ContentElementAutomationPeer.cs
- PageClientProxyGenerator.cs
- X509RecipientCertificateServiceElement.cs
- StringResourceManager.cs
- ContentPlaceHolderDesigner.cs
- OleDbConnection.cs
- MulticastIPAddressInformationCollection.cs
- KeyGesture.cs
- Decoder.cs
- XmlSchemaCompilationSettings.cs
- PenLineCapValidation.cs
- CollectionChangeEventArgs.cs
- ErrorHandler.cs
- SqlDesignerDataSourceView.cs
- EmbossBitmapEffect.cs
- DataGridPreparingCellForEditEventArgs.cs
- NameValueSectionHandler.cs
- VerificationAttribute.cs
- ComponentRenameEvent.cs
- ChangeTracker.cs
- DrawingGroup.cs
- pingexception.cs
- HostProtectionPermission.cs
- UIElementAutomationPeer.cs
- StringOutput.cs
- ExpressionTextBox.xaml.cs
- AssemblyGen.cs
- ReflectPropertyDescriptor.cs
- FileDetails.cs
- FormatStringEditor.cs
- CodeAttributeDeclaration.cs
- FocusChangedEventArgs.cs
- PropertyGrid.cs
- UniqueIdentifierService.cs
- EditBehavior.cs
- SqlInternalConnection.cs
- BinaryObjectReader.cs
- StringFunctions.cs
- XhtmlMobileTextWriter.cs
- PeerIPHelper.cs
- ReadOnlyCollectionBase.cs
- GuidConverter.cs
- ProcessModuleDesigner.cs
- StartUpEventArgs.cs
- Rectangle.cs
- Italic.cs
- SyndicationContent.cs
- CodeGenerationManager.cs
- ProtocolState.cs
- Overlapped.cs
- TableItemProviderWrapper.cs
- ColumnClickEvent.cs
- Storyboard.cs
- CollectionChangedEventManager.cs
- WindowsToolbarItemAsMenuItem.cs
- ReadWriteObjectLock.cs
- SvcMapFileSerializer.cs
- GridViewCellAutomationPeer.cs
- PageOutputColor.cs
- remotingproxy.cs
- SchemaLookupTable.cs
- SystemInfo.cs
- WebPartEditorOkVerb.cs
- VectorCollectionConverter.cs
- Internal.cs
- SafeFindHandle.cs
- TypeReference.cs
- AttributeConverter.cs
- DtcInterfaces.cs
- CodeMemberEvent.cs
- StatusBarDrawItemEvent.cs
- HandlerWithFactory.cs
- NativeMethods.cs
- FlagsAttribute.cs
- RawStylusInput.cs
- RectKeyFrameCollection.cs
- FileInfo.cs
- FieldToken.cs
- DiscriminatorMap.cs
- SortedDictionary.cs
- ModelProperty.cs
- TrackingServices.cs
- ComplexLine.cs
- ProvideValueServiceProvider.cs
- SortQuery.cs
- FeatureSupport.cs
- ComponentGuaranteesAttribute.cs
- CreateUserErrorEventArgs.cs
- AppDomainShutdownMonitor.cs
- SchemaImporter.cs
- LOSFormatter.cs
- AsymmetricAlgorithm.cs
- CellParaClient.cs
- DataGridViewColumn.cs
- MetadataWorkspace.cs
- PathParser.cs
- SpinLock.cs