Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Threading / AbandonedMutexException.cs / 1 / AbandonedMutexException.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
//
// AbandonedMutexException
// Thrown when a wait completes because one or more mutexes was abandoned.
// AbandonedMutexs indicate serious error in user code or machine state.
////////////////////////////////////////////////////////////////////////////////
namespace System.Threading {
using System;
using System.Runtime.Serialization;
using System.Threading;
using System.Runtime.InteropServices;
[Serializable()]
[ComVisibleAttribute(false)]
public class AbandonedMutexException : SystemException {
private int m_MutexIndex = -1;
private Mutex m_Mutex = null;
public AbandonedMutexException()
: base(Environment.GetResourceString("Threading.AbandonedMutexException")) {
SetErrorCode(__HResults.COR_E_ABANDONEDMUTEX);
}
public AbandonedMutexException(String message)
: base(message) {
SetErrorCode(__HResults.COR_E_ABANDONEDMUTEX);
}
public AbandonedMutexException(String message, Exception inner )
: base(message, inner) {
SetErrorCode(__HResults.COR_E_ABANDONEDMUTEX);
}
public AbandonedMutexException(int location, WaitHandle handle)
: base(Environment.GetResourceString("Threading.AbandonedMutexException")) {
SetErrorCode(__HResults.COR_E_ABANDONEDMUTEX);
SetupException(location,handle);
}
public AbandonedMutexException(String message,int location, WaitHandle handle)
: base(message) {
SetErrorCode(__HResults.COR_E_ABANDONEDMUTEX);
SetupException(location,handle);
}
public AbandonedMutexException(String message, Exception inner,int location, WaitHandle handle )
: base(message, inner) {
SetErrorCode(__HResults.COR_E_ABANDONEDMUTEX);
SetupException(location,handle);
}
private void SetupException(int location, WaitHandle handle)
{
m_MutexIndex = location;
if(handle != null)
m_Mutex = handle as Mutex;
}
protected AbandonedMutexException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
public Mutex Mutex
{
get {
return m_Mutex;
}
}
public int MutexIndex
{
get{
return m_MutexIndex;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MulticastOption.cs
- SessionParameter.cs
- ObjectDataSource.cs
- ColumnHeaderConverter.cs
- SmtpNetworkElement.cs
- ExpandSegment.cs
- ListViewItem.cs
- IDispatchConstantAttribute.cs
- WebPartConnectionsConnectVerb.cs
- DisplayNameAttribute.cs
- DragStartedEventArgs.cs
- Helpers.cs
- Function.cs
- MenuBase.cs
- UDPClient.cs
- IgnoreSectionHandler.cs
- SingleResultAttribute.cs
- SmiSettersStream.cs
- FieldInfo.cs
- ColorConvertedBitmap.cs
- PropertyGridEditorPart.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- EmptyEnumerator.cs
- DownloadProgressEventArgs.cs
- SortDescription.cs
- DbConnectionHelper.cs
- TriggerAction.cs
- SQLMembershipProvider.cs
- DataPointer.cs
- RequestQueryParser.cs
- ImagingCache.cs
- CacheModeValueSerializer.cs
- RichTextBoxDesigner.cs
- AttributeQuery.cs
- InputBindingCollection.cs
- ClientSettings.cs
- TextContainer.cs
- FormViewPageEventArgs.cs
- Trigger.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- XpsTokenContext.cs
- SizeChangedInfo.cs
- FamilyTypefaceCollection.cs
- SessionStateContainer.cs
- Assert.cs
- ExtendedProperty.cs
- CompilerError.cs
- OneToOneMappingSerializer.cs
- MaskPropertyEditor.cs
- AdCreatedEventArgs.cs
- SystemKeyConverter.cs
- ProviderConnectionPointCollection.cs
- EventLogHandle.cs
- Win32Native.cs
- QuadraticBezierSegment.cs
- NativeMethods.cs
- SystemInformation.cs
- TypedTableBase.cs
- EdmMember.cs
- DaylightTime.cs
- CompilerScope.cs
- ResourceProviderFactory.cs
- DependencyPropertyKey.cs
- DataGridViewDataConnection.cs
- ItemContainerProviderWrapper.cs
- TransportManager.cs
- SqlTriggerAttribute.cs
- ObjectListDataBindEventArgs.cs
- MetadataExporter.cs
- DesignerActionListCollection.cs
- CompileLiteralTextParser.cs
- SafeNativeMethodsMilCoreApi.cs
- OdbcParameterCollection.cs
- WindowInteractionStateTracker.cs
- StyleXamlParser.cs
- RadialGradientBrush.cs
- SafeTimerHandle.cs
- XPathException.cs
- ColumnWidthChangedEvent.cs
- WebPartCloseVerb.cs
- ConfigurationConverterBase.cs
- PropertyMap.cs
- Rotation3D.cs
- DeclarativeCatalogPartDesigner.cs
- KeySpline.cs
- PersonalizationProviderHelper.cs
- TextSelectionHelper.cs
- SchemaImporterExtension.cs
- DesignerDataView.cs
- wgx_exports.cs
- ComponentChangingEvent.cs
- GenericEnumerator.cs
- ObjectMemberMapping.cs
- TextRangeEditLists.cs
- ProfileManager.cs
- DateTimeOffset.cs
- Control.cs
- AssociationEndMember.cs
- BrowserTree.cs
- PartialTrustHelpers.cs