Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Log / System / IO / Log / SafeMarshalContext.cs / 1305376 / SafeMarshalContext.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IO.Log { using System; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.Security; internal sealed class SafeMarshalContext : SafeHandle { public SafeMarshalContext() : base(IntPtr.Zero, true) { } public override bool IsInvalid { get { return IsClosed || this.handle == IntPtr.Zero; } } [DllImport("clfsw32.dll"), SuppressUnmanagedCodeSecurity, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [ResourceExposure(ResourceScope.None)] private static extern bool DeleteLogMarshallingArea(IntPtr ptr); override protected bool ReleaseHandle() { return DeleteLogMarshallingArea(this.handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IO.Log { using System; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.Security; internal sealed class SafeMarshalContext : SafeHandle { public SafeMarshalContext() : base(IntPtr.Zero, true) { } public override bool IsInvalid { get { return IsClosed || this.handle == IntPtr.Zero; } } [DllImport("clfsw32.dll"), SuppressUnmanagedCodeSecurity, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [ResourceExposure(ResourceScope.None)] private static extern bool DeleteLogMarshallingArea(IntPtr ptr); override protected bool ReleaseHandle() { return DeleteLogMarshallingArea(this.handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Effect.cs
- CalendarTable.cs
- PolicyManager.cs
- TrustManager.cs
- BrowserCapabilitiesCodeGenerator.cs
- FormatterServices.cs
- HierarchicalDataSourceConverter.cs
- XXXOnTypeBuilderInstantiation.cs
- HttpHandler.cs
- NegotiateStream.cs
- DefaultPropertyAttribute.cs
- ChtmlFormAdapter.cs
- HttpGetServerProtocol.cs
- EntityDataSourceEntityTypeFilterItem.cs
- BasePattern.cs
- ECDsaCng.cs
- NativeCppClassAttribute.cs
- ThreadStaticAttribute.cs
- SynchronizedInputPattern.cs
- CacheMemory.cs
- QuotedStringFormatReader.cs
- CheckedPointers.cs
- StringUtil.cs
- AuthenticateEventArgs.cs
- UnsettableComboBox.cs
- PeerObject.cs
- PageTheme.cs
- DesignerActionVerbItem.cs
- NetCodeGroup.cs
- XmlSchemaFacet.cs
- BamlLocalizableResource.cs
- WorkflowRuntimeSection.cs
- ImageMetadata.cs
- SecurityElement.cs
- RegisterInfo.cs
- DataGridViewCellParsingEventArgs.cs
- DispatcherOperation.cs
- HttpClientProtocol.cs
- DataServiceStreamProviderWrapper.cs
- CanonicalFontFamilyReference.cs
- MetadataHelper.cs
- DesignerSerializationOptionsAttribute.cs
- TextEditorThreadLocalStore.cs
- SiteMap.cs
- PropertyMapper.cs
- JsonReaderDelegator.cs
- SafeThreadHandle.cs
- CultureMapper.cs
- LinkLabel.cs
- DataMemberConverter.cs
- MoveSizeWinEventHandler.cs
- ReflectionTypeLoadException.cs
- PrintEvent.cs
- SchemaElementDecl.cs
- DataObject.cs
- LocalizationParserHooks.cs
- Identifier.cs
- FacetDescriptionElement.cs
- WindowsStatic.cs
- Context.cs
- MgmtResManager.cs
- SspiWrapper.cs
- StylusOverProperty.cs
- StyleTypedPropertyAttribute.cs
- Model3DGroup.cs
- ManipulationInertiaStartingEventArgs.cs
- IdentifierService.cs
- ZeroOpNode.cs
- HttpConfigurationContext.cs
- DispatcherExceptionFilterEventArgs.cs
- StatusBarAutomationPeer.cs
- Calendar.cs
- SystemIPGlobalProperties.cs
- Run.cs
- OciHandle.cs
- FeatureAttribute.cs
- UserPersonalizationStateInfo.cs
- SqlCommandSet.cs
- NativeCompoundFileAPIs.cs
- StyleSheetRefUrlEditor.cs
- AnimationClockResource.cs
- TextSelection.cs
- Delegate.cs
- InvalidProgramException.cs
- Assert.cs
- AttributeUsageAttribute.cs
- HtmlTextArea.cs
- FloaterParaClient.cs
- ColorConvertedBitmapExtension.cs
- FileDocument.cs
- PropertyNames.cs
- DocumentCollection.cs
- FloaterParagraph.cs
- AsnEncodedData.cs
- DiscoveryVersion.cs
- SqlDependencyListener.cs
- CacheModeValueSerializer.cs
- SiteMapDataSource.cs
- Switch.cs
- TextBox.cs