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
- HiddenFieldPageStatePersister.cs
- MobileUserControlDesigner.cs
- CodeDelegateCreateExpression.cs
- EventRouteFactory.cs
- ArgumentsParser.cs
- TrackingValidationObjectDictionary.cs
- FixedPosition.cs
- SqlParameter.cs
- ScriptDescriptor.cs
- WebControl.cs
- CatalogPartDesigner.cs
- CodeIndexerExpression.cs
- Reference.cs
- TreeNodeEventArgs.cs
- SearchForVirtualItemEventArgs.cs
- SendSecurityHeaderElement.cs
- CompositeFontInfo.cs
- DirectionalLight.cs
- ServiceNotStartedException.cs
- ObjectViewListener.cs
- WindowsGraphicsCacheManager.cs
- AsymmetricAlgorithm.cs
- Application.cs
- FocusChangedEventArgs.cs
- ColorKeyFrameCollection.cs
- UserPreferenceChangedEventArgs.cs
- ThreadStateException.cs
- BrowserInteropHelper.cs
- SHA1Managed.cs
- SignerInfo.cs
- CharAnimationUsingKeyFrames.cs
- StreamResourceInfo.cs
- DeclaredTypeValidatorAttribute.cs
- ItemCheckEvent.cs
- NavigationHelper.cs
- RectangleHotSpot.cs
- UriScheme.cs
- DataContext.cs
- RestrictedTransactionalPackage.cs
- AtlasWeb.Designer.cs
- unitconverter.cs
- FormsAuthenticationTicket.cs
- SafeIUnknown.cs
- ManipulationStartingEventArgs.cs
- FrameDimension.cs
- DataRowCollection.cs
- Pens.cs
- XamlContextStack.cs
- HttpModuleAction.cs
- ReliabilityContractAttribute.cs
- LayoutInformation.cs
- RepeaterItem.cs
- ProtectedConfigurationSection.cs
- XmlAttributeCollection.cs
- TraceProvider.cs
- FileSystemInfo.cs
- FontWeights.cs
- ParallelTimeline.cs
- DataGridCell.cs
- CacheHelper.cs
- DrawListViewSubItemEventArgs.cs
- PrePrepareMethodAttribute.cs
- HMACRIPEMD160.cs
- ProxyWebPartManager.cs
- DoubleLink.cs
- FixedSOMLineRanges.cs
- SymmetricSecurityProtocol.cs
- DataTableClearEvent.cs
- VideoDrawing.cs
- XmlEntityReference.cs
- CustomCategoryAttribute.cs
- PrincipalPermission.cs
- TextRangeSerialization.cs
- ScrollChrome.cs
- FamilyMap.cs
- ILGenerator.cs
- RelationshipEnd.cs
- ConfigurationManager.cs
- ByteAnimationBase.cs
- WebPartsPersonalizationAuthorization.cs
- RecognizedWordUnit.cs
- PrtCap_Base.cs
- EntityEntry.cs
- ReflectEventDescriptor.cs
- ConfigurationElementProperty.cs
- ControlDesigner.cs
- SecurityTokenResolver.cs
- Point3DConverter.cs
- URL.cs
- XmlElementAttributes.cs
- FormsAuthenticationCredentials.cs
- MergeFailedEvent.cs
- RestHandlerFactory.cs
- XmlDictionaryReaderQuotas.cs
- NumericUpDownAccelerationCollection.cs
- EventBuilder.cs
- altserialization.cs
- SafeNativeMethods.cs
- HttpRuntimeSection.cs
- SymbolResolver.cs