Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Services / Monitoring / system / Diagnosticts / processwaithandle.cs / 1 / processwaithandle.cs
using System; using System.Threading; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; namespace System.Diagnostics { internal class ProcessWaitHandle : WaitHandle { internal ProcessWaitHandle( SafeProcessHandle processHandle): base() { SafeWaitHandle waitHandle = null; bool succeeded = NativeMethods.DuplicateHandle( new HandleRef(this, NativeMethods.GetCurrentProcess()), processHandle, new HandleRef(this, NativeMethods.GetCurrentProcess()), out waitHandle, 0, false, NativeMethods.DUPLICATE_SAME_ACCESS); if (!succeeded) { Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); } this.SafeWaitHandle = waitHandle; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Threading; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; namespace System.Diagnostics { internal class ProcessWaitHandle : WaitHandle { internal ProcessWaitHandle( SafeProcessHandle processHandle): base() { SafeWaitHandle waitHandle = null; bool succeeded = NativeMethods.DuplicateHandle( new HandleRef(this, NativeMethods.GetCurrentProcess()), processHandle, new HandleRef(this, NativeMethods.GetCurrentProcess()), out waitHandle, 0, false, NativeMethods.DUPLICATE_SAME_ACCESS); if (!succeeded) { Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); } this.SafeWaitHandle = waitHandle; } } } // 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
- HandlerFactoryCache.cs
- UnsafeNativeMethods.cs
- XPathParser.cs
- SpecialTypeDataContract.cs
- LassoSelectionBehavior.cs
- FrameDimension.cs
- Directory.cs
- MethodExpr.cs
- SvcMapFileLoader.cs
- HttpListenerPrefixCollection.cs
- DataTrigger.cs
- HelpInfo.cs
- StrokeCollection2.cs
- Viewport2DVisual3D.cs
- TextOptions.cs
- DateBoldEvent.cs
- _Rfc2616CacheValidators.cs
- OlePropertyStructs.cs
- TypeSchema.cs
- FloaterParaClient.cs
- FontSourceCollection.cs
- OdbcException.cs
- TextRenderer.cs
- WindowsMenu.cs
- UInt32.cs
- HttpRequest.cs
- DataMisalignedException.cs
- cryptoapiTransform.cs
- DBDataPermission.cs
- GroupBox.cs
- SerializationFieldInfo.cs
- DebugViewWriter.cs
- GlyphShapingProperties.cs
- precedingsibling.cs
- DefaultValueConverter.cs
- XPathSelfQuery.cs
- clipboard.cs
- UrlMapping.cs
- TransformerInfoCollection.cs
- RoleGroup.cs
- MetadataArtifactLoader.cs
- RoleManagerSection.cs
- LifetimeServices.cs
- TrackingQueryElement.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- SourceItem.cs
- _LocalDataStoreMgr.cs
- Pair.cs
- OutputCacheSection.cs
- HttpListenerException.cs
- GeneralTransform3DCollection.cs
- BatchWriter.cs
- GreaterThan.cs
- AuthorizationContext.cs
- DataStorage.cs
- ServiceContractViewControl.Designer.cs
- FontResourceCache.cs
- InstanceDataCollectionCollection.cs
- SHA512Managed.cs
- BuildResultCache.cs
- EventRecordWrittenEventArgs.cs
- SlipBehavior.cs
- MailBnfHelper.cs
- RuleSettings.cs
- PresentationSource.cs
- DependencyObjectValidator.cs
- MouseEventArgs.cs
- ComplexLine.cs
- DocumentViewerConstants.cs
- Expression.cs
- Section.cs
- RadioButtonFlatAdapter.cs
- ToolStripKeyboardHandlingService.cs
- ImageCodecInfo.cs
- Cursors.cs
- FormViewPagerRow.cs
- Win32Native.cs
- WebRequestModulesSection.cs
- FrameworkElement.cs
- ClientType.cs
- SafeRightsManagementQueryHandle.cs
- XsdDateTime.cs
- GridItemPattern.cs
- BindingNavigator.cs
- OleDbError.cs
- WebBrowserContainer.cs
- TrackingDataItemValue.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- QuaternionIndependentAnimationStorage.cs
- XmlSchemaAnnotated.cs
- DbConnectionPoolIdentity.cs
- DataTrigger.cs
- TemplateControl.cs
- EventLogTraceListener.cs
- RankException.cs
- BufferBuilder.cs
- ClassImporter.cs
- UmAlQuraCalendar.cs
- ActivationService.cs
- RbTree.cs