Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageInfo.cs
- PersistNameAttribute.cs
- XmlBindingWorker.cs
- Pointer.cs
- Geometry.cs
- SupportsEventValidationAttribute.cs
- _LazyAsyncResult.cs
- Vars.cs
- Exception.cs
- XmlUrlEditor.cs
- LeaseManager.cs
- CalendarTable.cs
- DynamicDataExtensions.cs
- CommentGlyph.cs
- EntityDataSourceChangedEventArgs.cs
- InvalidComObjectException.cs
- DetailsViewInsertEventArgs.cs
- IgnoreFileBuildProvider.cs
- FontStretches.cs
- TransformerInfo.cs
- TimersDescriptionAttribute.cs
- DescriptionAttribute.cs
- SHA512.cs
- DtcInterfaces.cs
- Marshal.cs
- UnsafeNativeMethods.cs
- RedistVersionInfo.cs
- OrthographicCamera.cs
- SecurityTokenTypes.cs
- altserialization.cs
- QueryCacheEntry.cs
- TreeViewDataItemAutomationPeer.cs
- XmlPreloadedResolver.cs
- XmlTypeMapping.cs
- XmlSchemaComplexType.cs
- DefaultMemberAttribute.cs
- JsonXmlDataContract.cs
- ModelProperty.cs
- DPCustomTypeDescriptor.cs
- EncodingStreamWrapper.cs
- KerberosSecurityTokenProvider.cs
- RegexEditorDialog.cs
- ConfigXmlAttribute.cs
- ReadOnlyCollectionBase.cs
- CommonGetThemePartSize.cs
- PerformanceCounterManager.cs
- XmlQualifiedName.cs
- cryptoapiTransform.cs
- NopReturnReader.cs
- HttpModule.cs
- __FastResourceComparer.cs
- MetadataItemEmitter.cs
- DataRelation.cs
- WindowsScroll.cs
- FragmentQueryProcessor.cs
- safex509handles.cs
- Policy.cs
- ItemCollection.cs
- UpdateCompiler.cs
- SizeConverter.cs
- FormViewUpdateEventArgs.cs
- ResourceDictionaryCollection.cs
- NullReferenceException.cs
- DataGridViewLayoutData.cs
- TextViewBase.cs
- RegisteredHiddenField.cs
- CipherData.cs
- StsCommunicationException.cs
- TrustLevelCollection.cs
- HatchBrush.cs
- DebugHandleTracker.cs
- Stack.cs
- RowTypeElement.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- MethodCallConverter.cs
- BitmapDownload.cs
- AggregateNode.cs
- AdornerLayer.cs
- SqlUtils.cs
- SaveCardRequest.cs
- CodeIdentifier.cs
- XmlNode.cs
- TextDocumentView.cs
- TransactionFormatter.cs
- TableLayoutColumnStyleCollection.cs
- ObsoleteAttribute.cs
- WebPartDesigner.cs
- AutomationPatternInfo.cs
- RMEnrollmentPage1.cs
- AmbientLight.cs
- KnownBoxes.cs
- Events.cs
- xml.cs
- SafeFileMappingHandle.cs
- NativeMethods.cs
- _SslStream.cs
- TextFormatter.cs
- ImpersonationContext.cs
- ObjectDisposedException.cs
- Quaternion.cs