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
- UnmanagedMarshal.cs
- ConfigurationStrings.cs
- StorageEntityTypeMapping.cs
- DesignerSerializationVisibilityAttribute.cs
- ContainerVisual.cs
- ClientUtils.cs
- DataBindingExpressionBuilder.cs
- DynamicRendererThreadManager.cs
- TextDpi.cs
- NumberSubstitution.cs
- InputLanguageEventArgs.cs
- OleDbConnection.cs
- RadioButtonBaseAdapter.cs
- LineInfo.cs
- FormsAuthenticationUserCollection.cs
- XPathNodePointer.cs
- GridPatternIdentifiers.cs
- AssemblyAssociatedContentFileAttribute.cs
- Compensate.cs
- UriScheme.cs
- EntityDataSourceView.cs
- PriorityBindingExpression.cs
- ParallelTimeline.cs
- StylusCaptureWithinProperty.cs
- LocalizationParserHooks.cs
- BindingObserver.cs
- TextBounds.cs
- HtmlLiteralTextAdapter.cs
- TypeSemantics.cs
- TokenizerHelper.cs
- Sentence.cs
- QilValidationVisitor.cs
- SchemaManager.cs
- GcSettings.cs
- PartialToken.cs
- SourceChangedEventArgs.cs
- ScriptManager.cs
- xmlformatgeneratorstatics.cs
- ComAdminWrapper.cs
- WSFederationHttpBindingCollectionElement.cs
- IsolatedStorageFile.cs
- cryptoapiTransform.cs
- TextBoxLine.cs
- ipaddressinformationcollection.cs
- ApplyImportsAction.cs
- DisposableCollectionWrapper.cs
- userdatakeys.cs
- ReliabilityContractAttribute.cs
- FloaterParagraph.cs
- WebPageTraceListener.cs
- WebServicesDescriptionAttribute.cs
- OutputCacheSettingsSection.cs
- ControlBuilderAttribute.cs
- OracleCommandSet.cs
- System.Data_BID.cs
- GcSettings.cs
- JavaScriptSerializer.cs
- AnnotationComponentManager.cs
- SocketCache.cs
- SystemPens.cs
- PrintDialog.cs
- InstanceKeyView.cs
- WindowsToolbarAsMenu.cs
- _SpnDictionary.cs
- ChannelDispatcher.cs
- TextChange.cs
- XmlUtil.cs
- FacetChecker.cs
- EncoderNLS.cs
- Vector3D.cs
- SqlConnectionString.cs
- CreateUserWizardDesigner.cs
- FilterableAttribute.cs
- DataGridClipboardHelper.cs
- unsafenativemethodstextservices.cs
- SmtpSection.cs
- TypeLoadException.cs
- ImportContext.cs
- ImagingCache.cs
- PropertyChangedEventManager.cs
- ArraySortHelper.cs
- WeakHashtable.cs
- ValueUnavailableException.cs
- WeakReadOnlyCollection.cs
- TypeDescriptor.cs
- WebHostedComPlusServiceHost.cs
- HtmlAnchor.cs
- SystemIPv6InterfaceProperties.cs
- AutomationElementIdentifiers.cs
- WindowClosedEventArgs.cs
- IPGlobalProperties.cs
- OracleString.cs
- SettingsPropertyCollection.cs
- LoadedEvent.cs
- RightsManagementPermission.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- MobileControl.cs
- CalendarModeChangedEventArgs.cs
- HMACSHA384.cs
- HttpHeaderCollection.cs