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
- DiscoveryRequestHandler.cs
- HostSecurityManager.cs
- NotCondition.cs
- CapabilitiesUse.cs
- HttpHandlersSection.cs
- MulticastNotSupportedException.cs
- CryptoKeySecurity.cs
- hwndwrapper.cs
- TypeReference.cs
- ChangeBlockUndoRecord.cs
- PasswordTextContainer.cs
- TemplateBindingExpression.cs
- ListSurrogate.cs
- XmlSchemaAnnotated.cs
- HostProtectionException.cs
- QualifiedCellIdBoolean.cs
- IndexedEnumerable.cs
- FuncCompletionCallbackWrapper.cs
- TabControl.cs
- TextEditorMouse.cs
- UrlMappingCollection.cs
- WebContext.cs
- SimpleWorkerRequest.cs
- MgmtConfigurationRecord.cs
- _ConnectStream.cs
- CompoundFileStorageReference.cs
- ModelEditingScope.cs
- XmlSchemaDocumentation.cs
- RepeatBehavior.cs
- Animatable.cs
- InternalCache.cs
- ExplicitDiscriminatorMap.cs
- Exceptions.cs
- RedistVersionInfo.cs
- MenuItemStyleCollectionEditor.cs
- SchemaImporter.cs
- AnnotationMap.cs
- GeometryDrawing.cs
- securitycriticaldataformultiplegetandset.cs
- Line.cs
- ResourceProperty.cs
- LocalValueEnumerator.cs
- OneToOneMappingSerializer.cs
- PenThreadPool.cs
- Vector3D.cs
- CharAnimationUsingKeyFrames.cs
- SelectionEditor.cs
- loginstatus.cs
- ListManagerBindingsCollection.cs
- ButtonChrome.cs
- DataTemplateKey.cs
- SpecularMaterial.cs
- HostedController.cs
- RuntimeUtils.cs
- MouseButtonEventArgs.cs
- XhtmlBasicFormAdapter.cs
- NoneExcludedImageIndexConverter.cs
- OperandQuery.cs
- SHA512Managed.cs
- CopyAction.cs
- CharacterMetrics.cs
- SchemaNotation.cs
- XPathCompiler.cs
- CapacityStreamGeometryContext.cs
- InputBinder.cs
- SortDescription.cs
- WebZoneDesigner.cs
- UidManager.cs
- IconConverter.cs
- WindowsFormsLinkLabel.cs
- GatewayDefinition.cs
- ToolStripLocationCancelEventArgs.cs
- SerializationSectionGroup.cs
- XmlEncodedRawTextWriter.cs
- ScaleTransform3D.cs
- OutKeywords.cs
- nulltextcontainer.cs
- TemplateControlCodeDomTreeGenerator.cs
- cookieexception.cs
- GZipStream.cs
- TableCellAutomationPeer.cs
- Classification.cs
- RtfToXamlLexer.cs
- ControlAdapter.cs
- X509WindowsSecurityToken.cs
- GeneralTransform2DTo3D.cs
- LogLogRecordEnumerator.cs
- OdbcStatementHandle.cs
- backend.cs
- PageCanvasSize.cs
- ContainerFilterService.cs
- AbstractExpressions.cs
- MailMessage.cs
- ActivityDesignerHelper.cs
- FlowNode.cs
- ViewCellSlot.cs
- SimpleTableProvider.cs
- DataServiceBuildProvider.cs
- ListBoxItem.cs
- PerfService.cs