Migrate WinUSBNet code to a standalone project dependency

This commit is contained in:
Gustave Monce
2025-11-01 09:28:08 +01:00
parent 1cc7a5cee4
commit 058cde0d91
25 changed files with 659 additions and 15 deletions
+42
View File
@@ -0,0 +1,42 @@
/* WinUSBNet library
* (C) 2010 Thomas Bleeker (www.madwizard.org)
*
* Licensed under the MIT license, see license.txt or:
* http://www.opensource.org/licenses/mit-license.php
*/
using System;
namespace MadWizard.WinUSBNet
{
/// <summary>
/// Exception used by WinUSBNet to indicate errors. This is the
/// main exception to catch when using the library.
/// </summary>
public class USBException : Exception
{
/// <summary>
/// Constructs a new USBException with the given message
/// </summary>
/// <param name="message">The message describing the exception</param>
public USBException(string message)
: base(message)
{
}
/// <summary>
/// Constructs a new USBException with the given message and underlying exception
/// that caused the USBException.
/// </summary>
/// <param name="message">The message describing the exception</param>
/// <param name="innerException">The underlying exception causing the USBException</param>
public USBException(string message, Exception innerException)
: base(message, innerException)
{
}
public USBException() : base()
{
}
}
}