Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataRecordInternal.cs
- ManagementClass.cs
- CodeStatementCollection.cs
- FixedSOMLineCollection.cs
- _RequestCacheProtocol.cs
- PackageFilter.cs
- FileDialog.cs
- ComponentEvent.cs
- PixelFormat.cs
- SecurityTokenValidationException.cs
- GenericsInstances.cs
- PostBackTrigger.cs
- BrowserPolicyValidator.cs
- IndentTextWriter.cs
- InternalTypeHelper.cs
- ConfigLoader.cs
- ObjectView.cs
- SafeFileHandle.cs
- PersianCalendar.cs
- XmlEncoding.cs
- OperationGenerator.cs
- EllipticalNodeOperations.cs
- ImpersonationOption.cs
- Mapping.cs
- DynamicRouteExpression.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ScrollEventArgs.cs
- ViewStateModeByIdAttribute.cs
- FreezableCollection.cs
- ExeContext.cs
- BindingExpression.cs
- baseaxisquery.cs
- InsufficientMemoryException.cs
- TextViewSelectionProcessor.cs
- TextServicesLoader.cs
- FontUnitConverter.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- SystemGatewayIPAddressInformation.cs
- StrokeNodeData.cs
- XPathNodePointer.cs
- COMException.cs
- EventWaitHandleSecurity.cs
- SoapIncludeAttribute.cs
- ImageFormatConverter.cs
- DetailsViewPagerRow.cs
- TrackingExtract.cs
- IndependentAnimationStorage.cs
- RowCache.cs
- BypassElementCollection.cs
- AuthenticationSection.cs
- followingsibling.cs
- ZipIOModeEnforcingStream.cs
- GroupQuery.cs
- FontDialog.cs
- XmlNodeReader.cs
- FileSystemInfo.cs
- ClientUtils.cs
- DecoderBestFitFallback.cs
- MediaPlayerState.cs
- Vector.cs
- AuthenticationException.cs
- OpenFileDialog.cs
- DesignBindingConverter.cs
- SQLInt16Storage.cs
- TextParaLineResult.cs
- SettingsPropertyNotFoundException.cs
- ReflectionUtil.cs
- GenerateTemporaryTargetAssembly.cs
- Properties.cs
- OdbcReferenceCollection.cs
- SmtpLoginAuthenticationModule.cs
- TextReader.cs
- SiteMapHierarchicalDataSourceView.cs
- TableItemProviderWrapper.cs
- DataObjectEventArgs.cs
- SpoolingTask.cs
- TreeViewAutomationPeer.cs
- SpeechEvent.cs
- DateTimeConstantAttribute.cs
- DbConnectionClosed.cs
- KeySpline.cs
- SqlRetyper.cs
- Brush.cs
- TextDocumentView.cs
- FacetValues.cs
- UdpChannelListener.cs
- SQLDateTimeStorage.cs
- CommonGetThemePartSize.cs
- ArglessEventHandlerProxy.cs
- ProviderUtil.cs
- SqlTypeSystemProvider.cs
- Avt.cs
- CfgParser.cs
- PenCursorManager.cs
- XmlFormatExtensionPointAttribute.cs
- ClientRolePrincipal.cs
- RightsManagementEncryptedStream.cs
- MarginsConverter.cs
- MsdtcWrapper.cs
- ProjectionPathSegment.cs