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
- GroupBox.cs
- EntityDataSourceWrapper.cs
- ExpressionEditorAttribute.cs
- HttpContextWrapper.cs
- SingletonConnectionReader.cs
- ConditionedDesigner.cs
- List.cs
- DataServiceQueryException.cs
- TextShapeableCharacters.cs
- Geometry3D.cs
- hresults.cs
- WSHttpBindingElement.cs
- BrowserDefinitionCollection.cs
- CheckBoxStandardAdapter.cs
- XmlDictionaryWriter.cs
- SRGSCompiler.cs
- ContainerUtilities.cs
- FixedSOMSemanticBox.cs
- BaseParser.cs
- ObjectConverter.cs
- StrongName.cs
- Sql8ExpressionRewriter.cs
- XmlValueConverter.cs
- SqlBuilder.cs
- ServicePointManagerElement.cs
- GridLength.cs
- ExtendedPropertyDescriptor.cs
- SqlGenerator.cs
- ExtensionSimplifierMarkupObject.cs
- COM2TypeInfoProcessor.cs
- ActivityCompletionCallbackWrapper.cs
- ObjectDataSourceFilteringEventArgs.cs
- XPathBuilder.cs
- AssociationSetMetadata.cs
- wgx_sdk_version.cs
- SiteMapNodeCollection.cs
- GenericAuthenticationEventArgs.cs
- SqlConnectionString.cs
- PreProcessInputEventArgs.cs
- OperationDescriptionCollection.cs
- AdornerLayer.cs
- WebPermission.cs
- Vector.cs
- FrameDimension.cs
- SqlInfoMessageEvent.cs
- XPathDocumentIterator.cs
- GradientStopCollection.cs
- Blend.cs
- RSAOAEPKeyExchangeFormatter.cs
- baseaxisquery.cs
- DispatcherOperation.cs
- Attributes.cs
- LicFileLicenseProvider.cs
- QilParameter.cs
- OleDbParameter.cs
- EventSourceCreationData.cs
- uribuilder.cs
- ProviderBase.cs
- CommandLibraryHelper.cs
- shaperfactoryquerycachekey.cs
- NumericUpDownAccelerationCollection.cs
- StringConverter.cs
- WinFormsComponentEditor.cs
- DataGridAddNewRow.cs
- WebPartConnectionsCancelEventArgs.cs
- TextBoxRenderer.cs
- Container.cs
- ContainerUtilities.cs
- ReadWriteObjectLock.cs
- ParagraphResult.cs
- UniqueIdentifierService.cs
- DataIdProcessor.cs
- SapiGrammar.cs
- UnsafeNativeMethods.cs
- InputBindingCollection.cs
- XmlWellformedWriter.cs
- StateDesigner.TransitionInfo.cs
- Assert.cs
- BindingCollectionElement.cs
- NumberEdit.cs
- DBDataPermissionAttribute.cs
- GridLength.cs
- ValidationErrorInfo.cs
- PrivilegeNotHeldException.cs
- CodeValidator.cs
- CookielessHelper.cs
- ObjectDataSourceSelectingEventArgs.cs
- InnerItemCollectionView.cs
- DescendantOverDescendantQuery.cs
- OLEDB_Util.cs
- webeventbuffer.cs
- RequestQueryProcessor.cs
- Panel.cs
- UnsafeNativeMethods.cs
- SynchronizationScope.cs
- PackageRelationship.cs
- SafeThreadHandle.cs
- XmlSiteMapProvider.cs
- SafeHandles.cs
- UpdateTracker.cs