Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Threading / AbandonedMutexException.cs / 1305376 / 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;
}
[System.Security.SecuritySafeCritical] // auto-generated
protected AbandonedMutexException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
public Mutex Mutex
{
get {
return m_Mutex;
}
}
public int MutexIndex
{
get{
return m_MutexIndex;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// 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;
}
[System.Security.SecuritySafeCritical] // auto-generated
protected AbandonedMutexException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
public Mutex Mutex
{
get {
return m_Mutex;
}
}
public int MutexIndex
{
get{
return m_MutexIndex;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Point.cs
- BindingNavigator.cs
- MatrixCamera.cs
- WebPermission.cs
- DbInsertCommandTree.cs
- ISSmlParser.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- AudioLevelUpdatedEventArgs.cs
- DropSource.cs
- RedistVersionInfo.cs
- ResourcePermissionBaseEntry.cs
- TemplateBuilder.cs
- OptimisticConcurrencyException.cs
- XmlSchemaException.cs
- Inline.cs
- ScriptingRoleServiceSection.cs
- RenderCapability.cs
- PropertyInformation.cs
- ConfigurationSection.cs
- RoleGroup.cs
- ContentIterators.cs
- TransactionTraceIdentifier.cs
- Base64Encoder.cs
- Timeline.cs
- WebPartAddingEventArgs.cs
- GenericPrincipal.cs
- UserControlParser.cs
- MutexSecurity.cs
- NameTable.cs
- ClrPerspective.cs
- ConstructorBuilder.cs
- SQLByteStorage.cs
- URLIdentityPermission.cs
- CustomAttributeFormatException.cs
- SafeEventLogWriteHandle.cs
- RadioButtonStandardAdapter.cs
- TypefaceMetricsCache.cs
- CodeDomLoader.cs
- StringExpressionSet.cs
- XhtmlTextWriter.cs
- XmlFormatWriterGenerator.cs
- FontInfo.cs
- XmlWrappingReader.cs
- RegexNode.cs
- SortQuery.cs
- ConfigXmlComment.cs
- SystemBrushes.cs
- RelationshipNavigation.cs
- DateTimeFormat.cs
- __FastResourceComparer.cs
- RowToParametersTransformer.cs
- XamlPathDataSerializer.cs
- ParserExtension.cs
- MemberMaps.cs
- PlatformCulture.cs
- DateTimeStorage.cs
- HtmlTableRowCollection.cs
- Profiler.cs
- DataViewManagerListItemTypeDescriptor.cs
- ControlCommandSet.cs
- ImageSourceValueSerializer.cs
- XmlChildNodes.cs
- CalendarKeyboardHelper.cs
- WriteFileContext.cs
- WpfXamlType.cs
- XamlSerializer.cs
- ToolboxBitmapAttribute.cs
- CodeBinaryOperatorExpression.cs
- AttachedAnnotation.cs
- WaitHandleCannotBeOpenedException.cs
- StateItem.cs
- ToolStripRenderEventArgs.cs
- PeerObject.cs
- WsdlWriter.cs
- InheritanceContextHelper.cs
- VirtualPathUtility.cs
- XmlHierarchicalDataSourceView.cs
- ImageKeyConverter.cs
- FixedPageProcessor.cs
- MemoryFailPoint.cs
- NullEntityWrapper.cs
- TimelineClockCollection.cs
- DeleteStoreRequest.cs
- DataBindingList.cs
- DbCommandTree.cs
- PageFunction.cs
- CompositeDataBoundControl.cs
- ViewStateChangedEventArgs.cs
- DoubleUtil.cs
- IIS7UserPrincipal.cs
- Nullable.cs
- WebPartHeaderCloseVerb.cs
- _DisconnectOverlappedAsyncResult.cs
- LinqDataSourceUpdateEventArgs.cs
- EntityClassGenerator.cs
- KeyConstraint.cs
- SqlCacheDependencyDatabaseCollection.cs
- DesignerLoader.cs
- DataServiceResponse.cs
- CodeObject.cs