Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MonikerUtility.cs
- Journaling.cs
- IsolationInterop.cs
- HttpsChannelFactory.cs
- SafeNativeMethods.cs
- ExcludePathInfo.cs
- SafeArrayRankMismatchException.cs
- IsolatedStorage.cs
- DataGridSortingEventArgs.cs
- WriterOutput.cs
- Translator.cs
- CodeExporter.cs
- MessageBodyDescription.cs
- DataGridViewCellConverter.cs
- DataGridViewIntLinkedList.cs
- CharConverter.cs
- NavigateEvent.cs
- CorrelationKey.cs
- StringToken.cs
- XslUrlEditor.cs
- _AuthenticationState.cs
- RequestResizeEvent.cs
- DynamicPropertyHolder.cs
- CustomAttributeBuilder.cs
- WebPartConnectionCollection.cs
- ChildTable.cs
- HwndPanningFeedback.cs
- ToolStripMenuItem.cs
- PeerEndPoint.cs
- GeneratedCodeAttribute.cs
- MatchAttribute.cs
- LoadWorkflowByInstanceKeyCommand.cs
- SemanticResultValue.cs
- SqlStream.cs
- Connector.cs
- DateTimeOffsetStorage.cs
- CompositeTypefaceMetrics.cs
- UrlMappingsSection.cs
- BitmapSourceSafeMILHandle.cs
- GuidConverter.cs
- EmptyControlCollection.cs
- LoginName.cs
- recordstatescratchpad.cs
- WebConfigurationFileMap.cs
- RC2.cs
- IDQuery.cs
- DataViewManager.cs
- Visual3D.cs
- RestHandler.cs
- OutputCacheEntry.cs
- coordinatorscratchpad.cs
- RegexGroupCollection.cs
- SynchronizationContext.cs
- FormatterServices.cs
- FacetDescriptionElement.cs
- ResolveCriteriaApril2005.cs
- SecurityDescriptor.cs
- SystemException.cs
- MenuScrollingVisibilityConverter.cs
- RepeaterItem.cs
- ToolStripControlHost.cs
- UMPAttributes.cs
- MessageQueueCriteria.cs
- xmlfixedPageInfo.cs
- WindowsSpinner.cs
- ToolStripItem.cs
- DynamicPropertyHolder.cs
- ProfileBuildProvider.cs
- ExceptionRoutedEventArgs.cs
- CodeDirectoryCompiler.cs
- WorkflowPageSetupDialog.cs
- LinkedResourceCollection.cs
- StringBuilder.cs
- Debug.cs
- ProviderSettingsCollection.cs
- ClrPerspective.cs
- XmlDataDocument.cs
- SwitchAttribute.cs
- DocumentApplicationJournalEntry.cs
- StreamGeometryContext.cs
- ToolStripItemClickedEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- NavigationHelper.cs
- XPathParser.cs
- ComNativeDescriptor.cs
- NavigationProperty.cs
- ObjectView.cs
- ProfileSettingsCollection.cs
- DesignerActionPanel.cs
- CompareValidator.cs
- CreateUserWizardDesigner.cs
- odbcmetadatacolumnnames.cs
- EnvironmentPermission.cs
- WsdlImporterElement.cs
- ScriptingRoleServiceSection.cs
- WebPartDeleteVerb.cs
- DataGrid.cs
- ClientUtils.cs
- DateTimeFormatInfo.cs
- KeyValueConfigurationElement.cs