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
- FormsIdentity.cs
- SplitterCancelEvent.cs
- XmlSchemaInclude.cs
- BamlLocalizableResourceKey.cs
- SafeReversePInvokeHandle.cs
- DataGridViewSelectedCellCollection.cs
- CalculatedColumn.cs
- RegisteredScript.cs
- KeyBinding.cs
- WebPartActionVerb.cs
- OleDbMetaDataFactory.cs
- DataGridViewToolTip.cs
- Matrix3D.cs
- Peer.cs
- SubclassTypeValidator.cs
- NegotiationTokenAuthenticatorState.cs
- TraceContextEventArgs.cs
- EmptyCollection.cs
- oledbconnectionstring.cs
- MimeMultiPart.cs
- DockProviderWrapper.cs
- IndentedWriter.cs
- DelegatingTypeDescriptionProvider.cs
- PageBuildProvider.cs
- WindowsTreeView.cs
- Drawing.cs
- Registry.cs
- TagMapCollection.cs
- LexicalChunk.cs
- DatePickerDateValidationErrorEventArgs.cs
- SetStoryboardSpeedRatio.cs
- entityreference_tresulttype.cs
- HttpDebugHandler.cs
- Comparer.cs
- CodeGenerator.cs
- PagerSettings.cs
- SimpleBitVector32.cs
- Section.cs
- TemplateControl.cs
- ManipulationDeltaEventArgs.cs
- ProxySimple.cs
- FtpWebResponse.cs
- AdvancedBindingPropertyDescriptor.cs
- TextEffectResolver.cs
- SystemGatewayIPAddressInformation.cs
- AutomationProperties.cs
- GraphicsContext.cs
- ClientScriptManager.cs
- ProxyFragment.cs
- PageCodeDomTreeGenerator.cs
- DBSqlParserColumn.cs
- SegmentInfo.cs
- DynamicValueConverter.cs
- ProcessInputEventArgs.cs
- BinaryMessageEncodingElement.cs
- SqlProviderServices.cs
- TaskbarItemInfo.cs
- DataGridCellItemAutomationPeer.cs
- BaseDataBoundControl.cs
- Journaling.cs
- _SingleItemRequestCache.cs
- AutomationEventArgs.cs
- TraceContextRecord.cs
- TransformerTypeCollection.cs
- cookiecollection.cs
- AspNetHostingPermission.cs
- Int32CollectionConverter.cs
- XmlStreamNodeWriter.cs
- IsolatedStoragePermission.cs
- Dump.cs
- Main.cs
- CannotUnloadAppDomainException.cs
- LinkedResource.cs
- _SslSessionsCache.cs
- PropertyInformationCollection.cs
- AspNetSynchronizationContext.cs
- LogSwitch.cs
- Point3DValueSerializer.cs
- Pair.cs
- AtlasWeb.Designer.cs
- CorrelationService.cs
- MessageQueueInstaller.cs
- ControlParameter.cs
- XhtmlBasicLabelAdapter.cs
- MSHTMLHost.cs
- WebBrowserDocumentCompletedEventHandler.cs
- Binding.cs
- MeshGeometry3D.cs
- KnownBoxes.cs
- SystemException.cs
- TableCell.cs
- AutomationElementCollection.cs
- QilInvoke.cs
- util.cs
- DictionaryEntry.cs
- DataListItemEventArgs.cs
- CompilerHelpers.cs
- MemberMemberBinding.cs
- FtpWebRequest.cs
- ActivityBuilderHelper.cs