DllNotFoundException.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. ** Class: DllNotFoundException
  7. **
  8. **
  9. ** Purpose: The exception class for some failed P/Invoke calls.
  10. **
  11. **
  12. =============================================================================*/
  13. using System.Runtime.Serialization;
  14. namespace System
  15. {
  16. [Serializable]
  17. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  18. public class DllNotFoundException : TypeLoadException
  19. {
  20. public DllNotFoundException()
  21. : base(SR.Arg_DllNotFoundException)
  22. {
  23. HResult = HResults.COR_E_DLLNOTFOUND;
  24. }
  25. public DllNotFoundException(string message)
  26. : base(message)
  27. {
  28. HResult = HResults.COR_E_DLLNOTFOUND;
  29. }
  30. public DllNotFoundException(string message, Exception inner)
  31. : base(message, inner)
  32. {
  33. HResult = HResults.COR_E_DLLNOTFOUND;
  34. }
  35. protected DllNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
  36. {
  37. }
  38. }
  39. }