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
- StreamResourceInfo.cs
- URLAttribute.cs
- TransportListener.cs
- IntellisenseTextBox.designer.cs
- TrackingServices.cs
- BindingCollection.cs
- TextTreeInsertUndoUnit.cs
- ConfigsHelper.cs
- TextRangeBase.cs
- JsonQNameDataContract.cs
- ComAdminInterfaces.cs
- RequiredAttributeAttribute.cs
- PackWebRequestFactory.cs
- RelAssertionDirectKeyIdentifierClause.cs
- ThemeDirectoryCompiler.cs
- ExpressionBuilder.cs
- GridViewEditEventArgs.cs
- RegularExpressionValidator.cs
- BinHexEncoding.cs
- GraphicsContainer.cs
- AssociationTypeEmitter.cs
- AbsoluteQuery.cs
- XmlSerializationReader.cs
- XmlSchemaInfo.cs
- LinkLabelLinkClickedEvent.cs
- ButtonFlatAdapter.cs
- CompiledELinqQueryState.cs
- ResourceReader.cs
- SoapCommonClasses.cs
- DetailsViewUpdatedEventArgs.cs
- SetterBase.cs
- Storyboard.cs
- MetadataSerializer.cs
- TdsParameterSetter.cs
- BrowserDefinition.cs
- ProxyWebPartManager.cs
- AssemblyInfo.cs
- CheckedPointers.cs
- ComponentEvent.cs
- BuildProviderCollection.cs
- PageClientProxyGenerator.cs
- TagNameToTypeMapper.cs
- Visitor.cs
- DbConnectionPool.cs
- ContainerCodeDomSerializer.cs
- DeviceSpecificChoice.cs
- TCPListener.cs
- UriScheme.cs
- XmlILTrace.cs
- ReadOnlyKeyedCollection.cs
- AnnotationResource.cs
- ProviderSettingsCollection.cs
- TextFormatterContext.cs
- SecurityIdentifierElementCollection.cs
- SelectionListDesigner.cs
- IUnknownConstantAttribute.cs
- AccessDataSource.cs
- IndicShape.cs
- ConfigurationElement.cs
- RowToParametersTransformer.cs
- ReadOnlyTernaryTree.cs
- NamespaceCollection.cs
- ErrorHandler.cs
- COM2IProvidePropertyBuilderHandler.cs
- DiagnosticsConfigurationHandler.cs
- StaticExtension.cs
- DigestComparer.cs
- CachingHintValidation.cs
- NotConverter.cs
- AutoGeneratedFieldProperties.cs
- SqlAliaser.cs
- FixedLineResult.cs
- OleDbError.cs
- HighContrastHelper.cs
- TextTreeFixupNode.cs
- CheckBoxBaseAdapter.cs
- MethodRental.cs
- OutputCacheSection.cs
- Int32KeyFrameCollection.cs
- hwndwrapper.cs
- x509store.cs
- PersonalizationStateInfoCollection.cs
- DataRowView.cs
- BitmapEffectInputData.cs
- NameValueCollection.cs
- HostProtectionException.cs
- DllHostedComPlusServiceHost.cs
- QueryCacheManager.cs
- XmlReflectionMember.cs
- Wildcard.cs
- TabControlToolboxItem.cs
- ReadOnlyNameValueCollection.cs
- CqlLexerHelpers.cs
- DocumentApplication.cs
- XmlDocumentType.cs
- RightsManagementEncryptionTransform.cs
- AxWrapperGen.cs
- GridPattern.cs
- BindingMemberInfo.cs
- ExpressionBindingsDialog.cs