Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / processwaithandle.cs / 1305376 / processwaithandle.cs
using System; using System.Threading; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; using System.Runtime.Versioning; namespace System.Diagnostics { internal class ProcessWaitHandle : WaitHandle { [ResourceExposure(ResourceScope.None)] [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)] 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
- MailBnfHelper.cs
- XmlSchemaType.cs
- SQLBoolean.cs
- WindowManager.cs
- SoapServerProtocol.cs
- XmlNotation.cs
- ProxyWebPartManager.cs
- _Rfc2616CacheValidators.cs
- SerializationAttributes.cs
- WebPartEditorCancelVerb.cs
- AccessViolationException.cs
- ColumnMap.cs
- SpellerStatusTable.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- Vector.cs
- CodeTypeReference.cs
- XmlNodeWriter.cs
- StandardCommands.cs
- EntityDataSourceStatementEditorForm.cs
- CodeMemberProperty.cs
- SessionStateSection.cs
- OracleEncoding.cs
- XmlDataSourceNodeDescriptor.cs
- Matrix3DStack.cs
- DocumentOrderComparer.cs
- XsdDataContractImporter.cs
- ImageDesigner.cs
- ValueOfAction.cs
- FixedTextSelectionProcessor.cs
- ErrorHandler.cs
- EventManager.cs
- SamlAuthorityBinding.cs
- XmlSchemaException.cs
- MULTI_QI.cs
- TimeManager.cs
- InstanceHandleReference.cs
- GenericEnumConverter.cs
- WebSysDescriptionAttribute.cs
- RequiredFieldValidator.cs
- TableLayoutCellPaintEventArgs.cs
- HyperLinkStyle.cs
- KeyNotFoundException.cs
- RenderingEventArgs.cs
- ArrayElementGridEntry.cs
- DeploymentSectionCache.cs
- Vector3DKeyFrameCollection.cs
- RuntimeIdentifierPropertyAttribute.cs
- PnrpPeerResolverElement.cs
- ProtectedProviderSettings.cs
- SortExpressionBuilder.cs
- DbCommandDefinition.cs
- HtmlControlDesigner.cs
- MultiPropertyDescriptorGridEntry.cs
- MenuCommandService.cs
- WebBaseEventKeyComparer.cs
- Rights.cs
- OperationResponse.cs
- Bind.cs
- ConnectionProviderAttribute.cs
- Errors.cs
- XmlSchemaGroup.cs
- control.ime.cs
- ObjectViewQueryResultData.cs
- ContainerControl.cs
- Clock.cs
- BitmapEffectGroup.cs
- DecryptedHeader.cs
- DataBoundLiteralControl.cs
- OrderedEnumerableRowCollection.cs
- TextEditorCopyPaste.cs
- LayoutInformation.cs
- TaskResultSetter.cs
- _TransmitFileOverlappedAsyncResult.cs
- DbParameterCollection.cs
- SmtpCommands.cs
- SessionEndedEventArgs.cs
- PropertyDescriptors.cs
- RemoteWebConfigurationHostServer.cs
- InternalBufferManager.cs
- BooleanSwitch.cs
- DocumentCollection.cs
- TreeIterator.cs
- TagPrefixInfo.cs
- LocalizabilityAttribute.cs
- IdentityReference.cs
- activationcontext.cs
- SignedXmlDebugLog.cs
- DefaultSection.cs
- MaterialGroup.cs
- HwndSource.cs
- UnsafeNativeMethods.cs
- ObjectAnimationUsingKeyFrames.cs
- CharacterHit.cs
- QueryLifecycle.cs
- ControlTemplate.cs
- SecurityState.cs
- BamlLocalizableResourceKey.cs
- EditableRegion.cs
- BufferedGraphicsContext.cs
- TreeNodeCollectionEditor.cs