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
- Fonts.cs
- CaseInsensitiveComparer.cs
- XDeferredAxisSource.cs
- EllipticalNodeOperations.cs
- XmlQueryRuntime.cs
- HttpResponse.cs
- EndPoint.cs
- FormsAuthenticationConfiguration.cs
- SystemUdpStatistics.cs
- ISAPIWorkerRequest.cs
- ObjectDataSourceEventArgs.cs
- SchemaComplexType.cs
- SingleResultAttribute.cs
- DataControlLinkButton.cs
- BitmapDecoder.cs
- Pen.cs
- EnumType.cs
- HtmlButton.cs
- RoleGroup.cs
- ValueQuery.cs
- Timer.cs
- ControlParameter.cs
- SqlDataSourceSelectingEventArgs.cs
- DoubleStorage.cs
- DataGridTemplateColumn.cs
- BaseCollection.cs
- WebSysDisplayNameAttribute.cs
- WebPartEditorOkVerb.cs
- OptimalBreakSession.cs
- DocumentSchemaValidator.cs
- DocumentViewerAutomationPeer.cs
- SponsorHelper.cs
- TimeIntervalCollection.cs
- ToolStripItemCollection.cs
- DescendantOverDescendantQuery.cs
- ActivationArguments.cs
- Triplet.cs
- ProfessionalColorTable.cs
- EmbeddedObject.cs
- ForwardPositionQuery.cs
- XPathDocumentNavigator.cs
- DesignerView.xaml.cs
- ServiceDiscoveryBehavior.cs
- AttributeCollection.cs
- UserValidatedEventArgs.cs
- ClientSettingsStore.cs
- ListCollectionView.cs
- Button.cs
- XmlDataSourceView.cs
- ViewBase.cs
- printdlgexmarshaler.cs
- ConfigurationSectionCollection.cs
- tabpagecollectioneditor.cs
- HttpCacheParams.cs
- UserPreferenceChangingEventArgs.cs
- CodeMemberField.cs
- ViewDesigner.cs
- PingOptions.cs
- EntityCollection.cs
- ManipulationDeltaEventArgs.cs
- ProxyWebPartConnectionCollection.cs
- SystemIPv6InterfaceProperties.cs
- VoiceInfo.cs
- XPathNodeIterator.cs
- ConfigPathUtility.cs
- DbMetaDataColumnNames.cs
- RelationshipSet.cs
- Timer.cs
- InstanceDataCollectionCollection.cs
- TextFormatterImp.cs
- ListView.cs
- ConstantExpression.cs
- DockAndAnchorLayout.cs
- TracingConnection.cs
- CachedCompositeFamily.cs
- NameTable.cs
- ProfileParameter.cs
- DataGrid.cs
- GridViewCancelEditEventArgs.cs
- MouseActionValueSerializer.cs
- TextRunTypographyProperties.cs
- DrawListViewSubItemEventArgs.cs
- TextTreeTextElementNode.cs
- SystemMulticastIPAddressInformation.cs
- CurrentChangingEventManager.cs
- TdsParserStateObject.cs
- UInt64Converter.cs
- FloaterBaseParaClient.cs
- ArgumentValue.cs
- MatrixTransform.cs
- DataPagerField.cs
- GridViewSelectEventArgs.cs
- FontCacheLogic.cs
- ObjectTag.cs
- ObjectListFieldsPage.cs
- ListViewDataItem.cs
- TextEffect.cs
- ListSurrogate.cs
- XmlLanguageConverter.cs
- ArraySegment.cs