Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Log / System / IO / Log / CoTaskMemHandle.cs / 1305376 / CoTaskMemHandle.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 CoTaskMemHandle : SafeHandle { public CoTaskMemHandle() : base(IntPtr.Zero, true) { } public override bool IsInvalid { get { return IsClosed || this.handle == IntPtr.Zero; } } [DllImport("ole32.dll"), SuppressUnmanagedCodeSecurity, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [ResourceExposure(ResourceScope.None)] private static extern void CoTaskMemFree(IntPtr ptr); override protected bool ReleaseHandle() { CoTaskMemFree(this.handle); return true; } } } // 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
- DecoderReplacementFallback.cs
- MessageRpc.cs
- IndexedGlyphRun.cs
- ConfigsHelper.cs
- ApplicationSecurityInfo.cs
- Vector3DCollectionConverter.cs
- DataReceivedEventArgs.cs
- QilChoice.cs
- PackagePart.cs
- MenuItemBinding.cs
- HandoffBehavior.cs
- XmlAggregates.cs
- _HeaderInfo.cs
- ToolStripDropDownButton.cs
- ColumnPropertiesGroup.cs
- KeySplineConverter.cs
- AbandonedMutexException.cs
- DesignerVerbToolStripMenuItem.cs
- AbstractSvcMapFileLoader.cs
- XmlElementAttribute.cs
- PointCollectionConverter.cs
- MappingItemCollection.cs
- SkipQueryOptionExpression.cs
- RefType.cs
- ReadOnlyDataSource.cs
- EpmCustomContentDeSerializer.cs
- DesignRelation.cs
- LinqTreeNodeEvaluator.cs
- DataGridViewCellStyleChangedEventArgs.cs
- AncestorChangedEventArgs.cs
- FontFamilyIdentifier.cs
- Int64AnimationBase.cs
- BuilderPropertyEntry.cs
- FixedFindEngine.cs
- LOSFormatter.cs
- Speller.cs
- BindingContext.cs
- HttpDictionary.cs
- RelatedPropertyManager.cs
- PrintDocument.cs
- BrowserCapabilitiesFactory.cs
- EventDescriptor.cs
- _ListenerAsyncResult.cs
- PhoneCallDesigner.cs
- InlineUIContainer.cs
- RectangleGeometry.cs
- XmlWhitespace.cs
- SequenceDesigner.xaml.cs
- SendMailErrorEventArgs.cs
- TextViewDesigner.cs
- OleDbParameterCollection.cs
- CollectionTraceRecord.cs
- DataControlPagerLinkButton.cs
- GridViewAutomationPeer.cs
- WebServiceEnumData.cs
- CodeSubDirectoriesCollection.cs
- DynamicFilter.cs
- datacache.cs
- EntityDataReader.cs
- ConfigurationStrings.cs
- ListBindingHelper.cs
- DesignBinding.cs
- ObjectDataSourceFilteringEventArgs.cs
- NamespaceQuery.cs
- PerfService.cs
- HttpUnhandledOperationInvoker.cs
- FigureHelper.cs
- CellParagraph.cs
- HtmlControl.cs
- ExecutorLocksHeldException.cs
- Size3DValueSerializer.cs
- RangeBase.cs
- QuaternionAnimation.cs
- TableStyle.cs
- CodeIterationStatement.cs
- TypeListConverter.cs
- Set.cs
- OdbcParameter.cs
- XmlSchemaException.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ContainerUIElement3D.cs
- ellipse.cs
- ToggleButtonAutomationPeer.cs
- CompiledQuery.cs
- CompiledELinqQueryState.cs
- SemanticAnalyzer.cs
- ComMethodElementCollection.cs
- HtmlTernaryTree.cs
- TypeDescriptionProvider.cs
- AspProxy.cs
- BackEase.cs
- figurelengthconverter.cs
- HistoryEventArgs.cs
- WeakRefEnumerator.cs
- PaperSource.cs
- LocalizableAttribute.cs
- Version.cs
- OutputScopeManager.cs
- EditingMode.cs
- Bold.cs