Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / Log / System / IO / Log / CoTaskMemHandle.cs / 1 / 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.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)]
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TokenBasedSet.cs
- CqlIdentifiers.cs
- ArraySet.cs
- CaseInsensitiveHashCodeProvider.cs
- AssemblyCollection.cs
- WindowsButton.cs
- DatatypeImplementation.cs
- DataKeyCollection.cs
- ToolStripArrowRenderEventArgs.cs
- FixedSOMPageConstructor.cs
- MD5.cs
- BuildManager.cs
- SqlFunctionAttribute.cs
- BuildProviderCollection.cs
- XmlSchemaSimpleTypeList.cs
- DBDataPermission.cs
- WMIInterop.cs
- StreamWriter.cs
- TextChange.cs
- SmtpMail.cs
- HttpCapabilitiesEvaluator.cs
- JsonObjectDataContract.cs
- autovalidator.cs
- DataContract.cs
- Hex.cs
- CurrentChangedEventManager.cs
- ThreadExceptionDialog.cs
- Drawing.cs
- RtfControls.cs
- TextServicesManager.cs
- ValueType.cs
- TagPrefixAttribute.cs
- ElapsedEventArgs.cs
- MergablePropertyAttribute.cs
- CodeSnippetStatement.cs
- ParenthesizePropertyNameAttribute.cs
- SchemaComplexType.cs
- SchemaElementDecl.cs
- NaturalLanguageHyphenator.cs
- SizeAnimationUsingKeyFrames.cs
- ObjectDataSourceWizardForm.cs
- CodeTypeDeclaration.cs
- InfoCardRSACryptoProvider.cs
- SqlTransaction.cs
- ReadOnlyDictionary.cs
- InstanceStoreQueryResult.cs
- StreamUpdate.cs
- IdentityReference.cs
- ToolStripSplitButton.cs
- CodeGeneratorOptions.cs
- StatusStrip.cs
- MsmqChannelListenerBase.cs
- XmlCharCheckingReader.cs
- COSERVERINFO.cs
- FloaterParagraph.cs
- _DomainName.cs
- InvalidBodyAccessException.cs
- Assembly.cs
- MimeWriter.cs
- DSASignatureFormatter.cs
- DbConnectionInternal.cs
- SAPICategories.cs
- AssemblyResourceLoader.cs
- HttpModulesSection.cs
- LinkConverter.cs
- DispatcherOperation.cs
- DataSourceHelper.cs
- MgmtConfigurationRecord.cs
- ResourceFallbackManager.cs
- Container.cs
- LongValidator.cs
- ContainerUIElement3D.cs
- FormParameter.cs
- ObjectDataSourceSelectingEventArgs.cs
- Page.cs
- Attributes.cs
- Ticks.cs
- SqlInternalConnectionSmi.cs
- ServicePoint.cs
- QuaternionAnimation.cs
- SchemaTypeEmitter.cs
- StickyNoteContentControl.cs
- SemanticResultValue.cs
- XsdDateTime.cs
- WindowInteractionStateTracker.cs
- itemelement.cs
- RuntimeArgumentHandle.cs
- UnionExpr.cs
- RoleServiceManager.cs
- Suspend.cs
- XamlParser.cs
- TypeLibConverter.cs
- EditorPartCollection.cs
- TransactionManager.cs
- CatchDesigner.xaml.cs
- WizardPanelChangingEventArgs.cs
- ScriptReferenceBase.cs
- AppDomainManager.cs
- MetabaseServerConfig.cs
- ControlBindingsCollection.cs