Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c5e56cd

Browse files
shrahsafern
authored andcommitted
Move DllNotFoundException, EntryPointNotFoundException to CoreLib (#3415)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com> Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent 63d1fad commit c5e56cd

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<Compile Include="$(MSBuildThisFileDirectory)System\Diagnostics\ConditionalAttribute.cs"/>
7575
<Compile Include="$(MSBuildThisFileDirectory)System\Diagnostics\Debug.cs"/>
7676
<Compile Include="$(MSBuildThisFileDirectory)System\DivideByZeroException.cs"/>
77+
<Compile Include="$(MSBuildThisFileDirectory)System\DllNotFoundException.cs"/>
7778
<Compile Include="$(MSBuildThisFileDirectory)System\DuplicateWaitObjectException.cs"/>
7879
<Compile Include="$(MSBuildThisFileDirectory)System\EntryPointNotFoundException.cs"/>
7980
<Compile Include="$(MSBuildThisFileDirectory)System\EventArgs.cs"/>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
/*=============================================================================
6+
**
7+
** Class: DllNotFoundException
8+
**
9+
**
10+
** Purpose: The exception class for some failed P/Invoke calls.
11+
**
12+
**
13+
=============================================================================*/
14+
15+
using System.Runtime.Serialization;
16+
17+
namespace System
18+
{
19+
[Serializable]
20+
public class DllNotFoundException : TypeLoadException
21+
{
22+
public DllNotFoundException()
23+
: base(SR.Arg_DllNotFoundException)
24+
{
25+
HResult = __HResults.COR_E_DLLNOTFOUND;
26+
}
27+
28+
public DllNotFoundException(String message)
29+
: base(message)
30+
{
31+
HResult = __HResults.COR_E_DLLNOTFOUND;
32+
}
33+
34+
public DllNotFoundException(String message, Exception inner)
35+
: base(message, inner)
36+
{
37+
HResult = __HResults.COR_E_DLLNOTFOUND;
38+
}
39+
40+
protected DllNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
41+
{
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)