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
- RankException.cs
- TrustManagerMoreInformation.cs
- SingleKeyFrameCollection.cs
- ObjectDataSource.cs
- Walker.cs
- CollectionViewGroupInternal.cs
- ADMembershipProvider.cs
- EntityUtil.cs
- WebPartConnectionsConnectVerb.cs
- SqlBooleanizer.cs
- InternalConfigSettingsFactory.cs
- ToolStripArrowRenderEventArgs.cs
- WebHttpBindingCollectionElement.cs
- BitmapCodecInfo.cs
- NavigationPropertyEmitter.cs
- EntityDesignerUtils.cs
- CatalogZone.cs
- OracleFactory.cs
- RelationshipNavigation.cs
- TextBoxAutoCompleteSourceConverter.cs
- Viewport3DVisual.cs
- SqlBooleanizer.cs
- EpmTargetTree.cs
- EntitySet.cs
- ObjectContextServiceProvider.cs
- XamlSerializer.cs
- DateTimeConverter.cs
- RepeatBehavior.cs
- StrokeNodeOperations.cs
- PeerNameRecordCollection.cs
- BamlLocalizableResourceKey.cs
- SqlFacetAttribute.cs
- ImageClickEventArgs.cs
- BufferedWebEventProvider.cs
- SQLBytesStorage.cs
- XPathSelfQuery.cs
- ConnectionStringsExpressionBuilder.cs
- SpecularMaterial.cs
- ProcessInputEventArgs.cs
- BindingMAnagerBase.cs
- PixelFormatConverter.cs
- XmlMapping.cs
- ChildChangedEventArgs.cs
- ServicePointManagerElement.cs
- OrderPreservingMergeHelper.cs
- ClientOptions.cs
- PropertyRef.cs
- QilFunction.cs
- ImagingCache.cs
- CustomDictionarySources.cs
- ProviderConnectionPointCollection.cs
- TextRange.cs
- UnsafeNativeMethodsCLR.cs
- ButtonRenderer.cs
- controlskin.cs
- NamedElement.cs
- OutputCacheProfile.cs
- arabicshape.cs
- SiteMapNodeItemEventArgs.cs
- HtmlWindowCollection.cs
- TypeSchema.cs
- RequestDescription.cs
- FixedNode.cs
- ExpressionHelper.cs
- PreservationFileWriter.cs
- SoapException.cs
- ErrorHandler.cs
- Dynamic.cs
- DelegatingConfigHost.cs
- HierarchicalDataTemplate.cs
- AnnotationAuthorChangedEventArgs.cs
- DateTimeFormatInfoScanner.cs
- InternalDispatchObject.cs
- CodeBlockBuilder.cs
- ExeConfigurationFileMap.cs
- StateMachineDesignerPaint.cs
- BrowserCapabilitiesFactory.cs
- AsmxEndpointPickerExtension.cs
- PartialCachingControl.cs
- InheritanceRules.cs
- HeaderLabel.cs
- SecUtil.cs
- LayoutEditorPart.cs
- InputProcessorProfiles.cs
- SerializationAttributes.cs
- DBCSCodePageEncoding.cs
- WindowsSidIdentity.cs
- initElementDictionary.cs
- TrimSurroundingWhitespaceAttribute.cs
- DebugTraceHelper.cs
- PersonalizationDictionary.cs
- FrameworkElement.cs
- InvokerUtil.cs
- MultilineStringConverter.cs
- SqlLiftIndependentRowExpressions.cs
- WeakEventTable.cs
- WindowsIdentity.cs
- QuaternionAnimation.cs
- InputScopeNameConverter.cs
- filewebrequest.cs