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
- RegexWorker.cs
- dataprotectionpermission.cs
- TextBlockAutomationPeer.cs
- StructuredCompositeActivityDesigner.cs
- InvalidateEvent.cs
- ExtensionSimplifierMarkupObject.cs
- RowType.cs
- HierarchicalDataBoundControl.cs
- LicenseContext.cs
- DataGridViewSelectedRowCollection.cs
- Vector3dCollection.cs
- ValidatedControlConverter.cs
- Exceptions.cs
- WebBrowserEvent.cs
- UncommonField.cs
- ArrayElementGridEntry.cs
- SortableBindingList.cs
- CriticalHandle.cs
- ADRoleFactoryConfiguration.cs
- CanonicalXml.cs
- ObjectDataSourceMethodEventArgs.cs
- OrderByQueryOptionExpression.cs
- HttpApplicationFactory.cs
- ParseElement.cs
- TextCharacters.cs
- CodeVariableDeclarationStatement.cs
- RedistVersionInfo.cs
- Sentence.cs
- Crc32.cs
- OpenFileDialog.cs
- DataColumnChangeEvent.cs
- ExpandableObjectConverter.cs
- EventDescriptor.cs
- AttributeData.cs
- EventListenerClientSide.cs
- ProfilePropertyNameValidator.cs
- GeometryModel3D.cs
- ObjectResult.cs
- Normalization.cs
- CultureInfoConverter.cs
- GenerateScriptTypeAttribute.cs
- DependencyObjectCodeDomSerializer.cs
- wgx_sdk_version.cs
- RowVisual.cs
- CreateWorkflowOwnerCommand.cs
- ComponentGlyph.cs
- PublisherMembershipCondition.cs
- TextRunCacheImp.cs
- StylusDevice.cs
- SafeProcessHandle.cs
- HttpCacheParams.cs
- BlockCollection.cs
- SpeakProgressEventArgs.cs
- GiveFeedbackEvent.cs
- SQLDoubleStorage.cs
- CombinedGeometry.cs
- ClrProviderManifest.cs
- ArgumentsParser.cs
- PolicyLevel.cs
- ISCIIEncoding.cs
- Ref.cs
- NativeMethods.cs
- FamilyTypefaceCollection.cs
- SchemaNotation.cs
- LoginView.cs
- DataTable.cs
- HtmlInputFile.cs
- _NetRes.cs
- BufferAllocator.cs
- RoleService.cs
- TextBoxAutoCompleteSourceConverter.cs
- RunClient.cs
- ResourceExpressionEditor.cs
- ClientSideQueueItem.cs
- DataGridTable.cs
- ResourceSetExpression.cs
- Int32KeyFrameCollection.cs
- GraphicsPath.cs
- IPPacketInformation.cs
- EntityProviderServices.cs
- StorageFunctionMapping.cs
- CompiledRegexRunnerFactory.cs
- DataServiceRequestArgs.cs
- CodeExpressionCollection.cs
- TransformerTypeCollection.cs
- CompiledQuery.cs
- SqlCacheDependencyDatabase.cs
- TraceSection.cs
- InvalidCommandTreeException.cs
- DuplexClientBase.cs
- SiteIdentityPermission.cs
- BooleanExpr.cs
- MediaCommands.cs
- DocumentViewerConstants.cs
- _OverlappedAsyncResult.cs
- CompositeScriptReferenceEventArgs.cs
- TextWriter.cs
- StyleTypedPropertyAttribute.cs
- Header.cs
- DataGridViewRow.cs