Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Runtime / InteropServices / ExternalException.cs / 1 / ExternalException.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: ExternalException
**
**
** Purpose: Exception base class for all errors from Interop or Structured
** Exception Handling code.
**
**
=============================================================================*/
namespace System.Runtime.InteropServices {
using System;
using System.Runtime.Serialization;
// Base exception for COM Interop errors &; Structured Exception Handler
// exceptions.
//
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable()] public class ExternalException : SystemException {
public ExternalException()
: base(Environment.GetResourceString("Arg_ExternalException")) {
SetErrorCode(__HResults.E_FAIL);
}
public ExternalException(String message)
: base(message) {
SetErrorCode(__HResults.E_FAIL);
}
public ExternalException(String message, Exception inner)
: base(message, inner) {
SetErrorCode(__HResults.E_FAIL);
}
public ExternalException(String message,int errorCode)
: base(message) {
SetErrorCode(errorCode);
}
protected ExternalException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
public virtual int ErrorCode {
get { return HResult; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*==============================================================================
**
** Class: ExternalException
**
**
** Purpose: Exception base class for all errors from Interop or Structured
** Exception Handling code.
**
**
=============================================================================*/
namespace System.Runtime.InteropServices {
using System;
using System.Runtime.Serialization;
// Base exception for COM Interop errors &; Structured Exception Handler
// exceptions.
//
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable()] public class ExternalException : SystemException {
public ExternalException()
: base(Environment.GetResourceString("Arg_ExternalException")) {
SetErrorCode(__HResults.E_FAIL);
}
public ExternalException(String message)
: base(message) {
SetErrorCode(__HResults.E_FAIL);
}
public ExternalException(String message, Exception inner)
: base(message, inner) {
SetErrorCode(__HResults.E_FAIL);
}
public ExternalException(String message,int errorCode)
: base(message) {
SetErrorCode(errorCode);
}
protected ExternalException(SerializationInfo info, StreamingContext context) : base(info, context) {
}
public virtual int ErrorCode {
get { return HResult; }
}
}
}
// 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
- SchemaDeclBase.cs
- SmiRequestExecutor.cs
- OutputBuffer.cs
- LinkLabel.cs
- CodeVariableReferenceExpression.cs
- KeyPressEvent.cs
- DependencyObject.cs
- WebServiceHostFactory.cs
- TextSegment.cs
- Attributes.cs
- ResponseStream.cs
- HtmlInputImage.cs
- Model3DGroup.cs
- CombinedGeometry.cs
- HybridDictionary.cs
- SecurityContext.cs
- ContextMarshalException.cs
- XmlWhitespace.cs
- FixedSOMTextRun.cs
- DNS.cs
- WindowsFormsSynchronizationContext.cs
- CrossSiteScriptingValidation.cs
- GridViewPageEventArgs.cs
- CustomLineCap.cs
- LZCodec.cs
- TcpSocketManager.cs
- OperationCanceledException.cs
- XmlCompatibilityReader.cs
- SerialPinChanges.cs
- ByteStreamGeometryContext.cs
- HitTestParameters.cs
- WmlPageAdapter.cs
- CompositeDesignerAccessibleObject.cs
- InitializingNewItemEventArgs.cs
- util.cs
- EventDescriptor.cs
- NullableConverter.cs
- Application.cs
- ObjectDataSourceStatusEventArgs.cs
- NativeRightsManagementAPIsStructures.cs
- WebControlAdapter.cs
- DispatcherHooks.cs
- BindingContext.cs
- OuterGlowBitmapEffect.cs
- ParentQuery.cs
- SmiMetaDataProperty.cs
- LayoutTable.cs
- SqlCacheDependencyDatabase.cs
- EditorPartCollection.cs
- OrderedDictionary.cs
- Suspend.cs
- DataSourceView.cs
- WindowsSlider.cs
- TextBoxAutoCompleteSourceConverter.cs
- WebPartManagerDesigner.cs
- WebPartConnectionsEventArgs.cs
- SQLBinary.cs
- HttpCachePolicyElement.cs
- RouteParametersHelper.cs
- BrowserPolicyValidator.cs
- ImageFormatConverter.cs
- SpeechAudioFormatInfo.cs
- WhitespaceRuleReader.cs
- ZipIOFileItemStream.cs
- TypeConverterValueSerializer.cs
- ClientSponsor.cs
- DataServiceStreamProviderWrapper.cs
- securitymgrsite.cs
- DataGridViewButtonColumn.cs
- WebPart.cs
- AnimationException.cs
- IdentityNotMappedException.cs
- SubMenuStyle.cs
- WrappedDispatcherException.cs
- ObjectItemCachedAssemblyLoader.cs
- DataGridDesigner.cs
- RegistrySecurity.cs
- DetailsViewDeletedEventArgs.cs
- _ListenerAsyncResult.cs
- CancellationToken.cs
- CodeTypeDeclarationCollection.cs
- TypeConverterMarkupExtension.cs
- ScrollChrome.cs
- NativeActivityMetadata.cs
- NodeFunctions.cs
- WebResourceUtil.cs
- ScrollChangedEventArgs.cs
- SimpleApplicationHost.cs
- EmptyImpersonationContext.cs
- Converter.cs
- WsiProfilesElementCollection.cs
- Context.cs
- LocalizationParserHooks.cs
- DataBindingHandlerAttribute.cs
- ViewKeyConstraint.cs
- PageParserFilter.cs
- TextClipboardData.cs
- CorrelationService.cs
- ResourceReferenceKeyNotFoundException.cs
- Track.cs