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
- XPathQilFactory.cs
- SamlAssertion.cs
- TransformationRules.cs
- LinqDataSourceDisposeEventArgs.cs
- DataGridViewComboBoxEditingControl.cs
- RootBuilder.cs
- EventProviderBase.cs
- PowerStatus.cs
- DrawingDrawingContext.cs
- ToolStripItemImageRenderEventArgs.cs
- MailSettingsSection.cs
- GuidConverter.cs
- SrgsElement.cs
- PasswordRecovery.cs
- WebContext.cs
- HwndTarget.cs
- Permission.cs
- ObjectSelectorEditor.cs
- RetrieveVirtualItemEventArgs.cs
- CheckedListBox.cs
- WebBrowser.cs
- SchemaExporter.cs
- NativeMethods.cs
- EntityDataSourceContainerNameItem.cs
- OdbcCommand.cs
- OutputCacheSettings.cs
- EpmHelper.cs
- TrackingWorkflowEventArgs.cs
- FixedSOMFixedBlock.cs
- WebPermission.cs
- TransformConverter.cs
- EventProvider.cs
- ImageEditor.cs
- SqlMethods.cs
- TimestampInformation.cs
- BeginSelectCardRequest.cs
- VerificationAttribute.cs
- SerializationInfoEnumerator.cs
- FileIOPermission.cs
- EntityDataSourceUtil.cs
- SingleTagSectionHandler.cs
- AttachedPropertyBrowsableAttribute.cs
- FileVersionInfo.cs
- StructureChangedEventArgs.cs
- Metadata.cs
- StrokeIntersection.cs
- TextRenderer.cs
- WebPartConnectionsConfigureVerb.cs
- ListParagraph.cs
- DoubleMinMaxAggregationOperator.cs
- SystemIPInterfaceStatistics.cs
- FixedTextContainer.cs
- DataRecordObjectView.cs
- RuleConditionDialog.Designer.cs
- MULTI_QI.cs
- ObjectMemberMapping.cs
- ElementMarkupObject.cs
- RadioButton.cs
- XslException.cs
- ParentQuery.cs
- X509CertificateCollection.cs
- BamlResourceDeserializer.cs
- Win32MouseDevice.cs
- QueryResponse.cs
- XmlSchemaRedefine.cs
- SizeChangedEventArgs.cs
- AppearanceEditorPart.cs
- StringReader.cs
- LayoutInformation.cs
- QilGenerator.cs
- EmptyStringExpandableObjectConverter.cs
- ImageAttributes.cs
- TypeConverterHelper.cs
- QueryStringParameter.cs
- OdbcConnectionFactory.cs
- StrokeCollection.cs
- CompositeControl.cs
- GetParentChain.cs
- QilUnary.cs
- Message.cs
- Splitter.cs
- RuleSetDialog.Designer.cs
- WindowsToolbarItemAsMenuItem.cs
- MailBnfHelper.cs
- LinkedResource.cs
- HttpListener.cs
- ContainerVisual.cs
- baseaxisquery.cs
- DynamicRendererThreadManager.cs
- HttpRawResponse.cs
- DetailsViewModeEventArgs.cs
- TreeNodeStyleCollection.cs
- DataProtectionSecurityStateEncoder.cs
- ImageMapEventArgs.cs
- PagePropertiesChangingEventArgs.cs
- PathFigure.cs
- StylusEditingBehavior.cs
- DropShadowEffect.cs
- WebReferencesBuildProvider.cs
- Label.cs