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
- HotSpotCollection.cs
- TabControl.cs
- WorkflowOwnershipException.cs
- QueryHandler.cs
- OutputWindow.cs
- RestHandlerFactory.cs
- CqlIdentifiers.cs
- BaseTemplateBuildProvider.cs
- TextureBrush.cs
- EnumerableRowCollection.cs
- IsolatedStorageFilePermission.cs
- Byte.cs
- DataIdProcessor.cs
- GenericWebPart.cs
- PropertyValueUIItem.cs
- CheckBoxStandardAdapter.cs
- FixedSOMTextRun.cs
- IntSecurity.cs
- UpdateRecord.cs
- DragDeltaEventArgs.cs
- SelectionGlyphBase.cs
- NullReferenceException.cs
- AutoGeneratedFieldProperties.cs
- Page.cs
- DataGridTableStyleMappingNameEditor.cs
- WhitespaceRule.cs
- AlternateView.cs
- InternalConfigHost.cs
- ButtonColumn.cs
- ActivityBindForm.Designer.cs
- DefaultTextStore.cs
- TableRowCollection.cs
- XPathBinder.cs
- SoapFault.cs
- EventArgs.cs
- BaseTemplateParser.cs
- DivideByZeroException.cs
- XmlSchemaComplexContentRestriction.cs
- Span.cs
- TransferMode.cs
- WebUtil.cs
- SqlDependency.cs
- TypeLoadException.cs
- DiagnosticTrace.cs
- BinaryFormatterWriter.cs
- FtpWebRequest.cs
- OleDbParameterCollection.cs
- SizeChangedInfo.cs
- TimeZone.cs
- DataGridViewElement.cs
- ImmComposition.cs
- WebPartZoneCollection.cs
- Int64Animation.cs
- Variable.cs
- WebServiceHandlerFactory.cs
- MarshalDirectiveException.cs
- RequestTimeoutManager.cs
- SerializationEventsCache.cs
- DataListItem.cs
- ActionFrame.cs
- Convert.cs
- HandledMouseEvent.cs
- TextSegment.cs
- DocumentPaginator.cs
- SmtpNtlmAuthenticationModule.cs
- HebrewNumber.cs
- HandleExceptionArgs.cs
- SQLInt32.cs
- TempFiles.cs
- FormViewCommandEventArgs.cs
- CryptographicAttribute.cs
- ScriptingJsonSerializationSection.cs
- IFlowDocumentViewer.cs
- BinarySerializer.cs
- CollectionBase.cs
- SqlProfileProvider.cs
- Brush.cs
- XpsImageSerializationService.cs
- ProviderConnectionPointCollection.cs
- TypedElement.cs
- GPPOINTF.cs
- TemplatingOptionsDialog.cs
- EntityDataSourceViewSchema.cs
- infer.cs
- XmlSchemas.cs
- GacUtil.cs
- BaseInfoTable.cs
- FeatureSupport.cs
- AbstractDataSvcMapFileLoader.cs
- PersistChildrenAttribute.cs
- BasicKeyConstraint.cs
- DetailsViewPageEventArgs.cs
- TemplateBaseAction.cs
- IIS7UserPrincipal.cs
- WebBrowser.cs
- ConfigXmlElement.cs
- SafeRightsManagementPubHandle.cs
- ExceptionHandlerDesigner.cs
- EnumMemberAttribute.cs
- _LocalDataStore.cs