Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / Microsoft / Win32 / SafeHandles / SafeThreadHandle.cs / 1305376 / SafeThreadHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafeThreadHandle ** ** ** A wrapper for a thread handle ** ** ===========================================================*/ using System; using System.Security; using System.Diagnostics; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Runtime.ConstrainedExecution; namespace Microsoft.Win32.SafeHandles { [SuppressUnmanagedCodeSecurityAttribute] internal sealed class SafeThreadHandle : SafeHandleZeroOrMinusOneIsInvalid { internal SafeThreadHandle() : base(true) { } internal void InitialSetHandle(IntPtr h){ Debug.Assert(base.IsInvalid, "Safe handle should only be set once"); base.SetHandle(h); } override protected bool ReleaseHandle() { return SafeNativeMethods.CloseHandle(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
- PinnedBufferMemoryStream.cs
- DragEvent.cs
- versioninfo.cs
- SqlWorkflowInstanceStore.cs
- MatrixTransform3D.cs
- MemberNameValidator.cs
- SettingsBindableAttribute.cs
- WindowsFormsHelpers.cs
- AddingNewEventArgs.cs
- storepermissionattribute.cs
- WorkflowServiceHostFactory.cs
- SoapExtensionImporter.cs
- MethodBody.cs
- SRDisplayNameAttribute.cs
- RealProxy.cs
- AllowedAudienceUriElement.cs
- SynchronizedChannelCollection.cs
- SelectionWordBreaker.cs
- Rules.cs
- StrokeDescriptor.cs
- SupportsEventValidationAttribute.cs
- InvokePattern.cs
- EpmSourcePathSegment.cs
- GridItemCollection.cs
- ServiceX509SecurityTokenProvider.cs
- ValidationResult.cs
- ComponentCache.cs
- DigestComparer.cs
- FirewallWrapper.cs
- ProjectionCamera.cs
- ProcessModelInfo.cs
- CodeNamespace.cs
- Thickness.cs
- Token.cs
- SecurityUtils.cs
- EntityDataSourceDesignerHelper.cs
- Point3DConverter.cs
- ObjectDataSourceDisposingEventArgs.cs
- DateTimeConverter2.cs
- SerializationFieldInfo.cs
- TagPrefixAttribute.cs
- SmtpNtlmAuthenticationModule.cs
- GlyphShapingProperties.cs
- XmlNullResolver.cs
- CodeDirectiveCollection.cs
- CodeBinaryOperatorExpression.cs
- BulletDecorator.cs
- EntityChangedParams.cs
- LassoHelper.cs
- SQLDecimal.cs
- CredentialManagerDialog.cs
- XmlNavigatorFilter.cs
- EncryptedData.cs
- NavigationCommands.cs
- UserPreferenceChangingEventArgs.cs
- DataShape.cs
- HttpChannelBindingToken.cs
- ScrollViewerAutomationPeer.cs
- NavigationHelper.cs
- GregorianCalendarHelper.cs
- ViewValidator.cs
- _UriSyntax.cs
- FixUpCollection.cs
- SimpleRecyclingCache.cs
- ProcessModelSection.cs
- LayoutTableCell.cs
- GroupStyle.cs
- DetailsViewUpdatedEventArgs.cs
- RedirectionProxy.cs
- AliasedSlot.cs
- Matrix3DValueSerializer.cs
- GenericXmlSecurityTokenAuthenticator.cs
- X509CertificateInitiatorClientCredential.cs
- Validator.cs
- SortDescriptionCollection.cs
- HealthMonitoringSection.cs
- HtmlTableCellCollection.cs
- ButtonBase.cs
- BigInt.cs
- ValidatedControlConverter.cs
- srgsitem.cs
- SetStoryboardSpeedRatio.cs
- QilLoop.cs
- EmptyElement.cs
- SqlDependencyListener.cs
- OutputCacheModule.cs
- X509RawDataKeyIdentifierClause.cs
- XmlReaderSettings.cs
- DataBindingExpressionBuilder.cs
- TextRange.cs
- MenuTracker.cs
- ViewStateModeByIdAttribute.cs
- TransformerInfoCollection.cs
- BitmapInitialize.cs
- TimersDescriptionAttribute.cs
- UniqueIdentifierService.cs
- LongValidatorAttribute.cs
- InputLangChangeEvent.cs
- HtmlControl.cs
- IRCollection.cs