mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Compare commits
3 Commits
b39188474f
...
5fbf716a87
| Author | SHA1 | Date | |
|---|---|---|---|
| 5fbf716a87 | |||
| b300ac8451 | |||
| 68c5990ccd |
@ -22,7 +22,7 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#region Events
|
#region Events
|
||||||
|
|
||||||
public event EventHandler<Exception>? Exception;
|
public event EventHandler<ExceptionEventArgs>? Exception;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -54,10 +54,15 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
IsInitialized = true;
|
IsInitialized = true;
|
||||||
}
|
}
|
||||||
|
catch (DeviceProviderException)
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
throw;
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
Throw(ex);
|
Throw(ex, true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,13 +71,23 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
protected virtual IEnumerable<IRGBDevice> GetLoadedDevices(RGBDeviceType loadFilter)
|
protected virtual IEnumerable<IRGBDevice> GetLoadedDevices(RGBDeviceType loadFilter)
|
||||||
{
|
{
|
||||||
|
List<IRGBDevice> devices = new();
|
||||||
foreach (IRGBDevice device in LoadDevices())
|
foreach (IRGBDevice device in LoadDevices())
|
||||||
{
|
{
|
||||||
if (loadFilter.HasFlag(device.DeviceInfo.DeviceType))
|
try
|
||||||
yield return device;
|
{
|
||||||
else
|
if (loadFilter.HasFlag(device.DeviceInfo.DeviceType))
|
||||||
device.Dispose();
|
devices.Add(device);
|
||||||
|
else
|
||||||
|
device.Dispose();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Throw(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void InitializeSDK();
|
protected abstract void InitializeSDK();
|
||||||
@ -98,15 +113,16 @@ namespace RGB.NET.Core
|
|||||||
IsInitialized = false;
|
IsInitialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Throw(Exception ex)
|
protected virtual void Throw(Exception ex, bool isCritical = false)
|
||||||
{
|
{
|
||||||
try { OnException(ex); } catch { /* we don't want to throw due to bad event handlers */ }
|
ExceptionEventArgs args = new(ex, isCritical, ThrowsExceptions);
|
||||||
|
try { OnException(args); } catch { /* we don't want to throw due to bad event handlers */ }
|
||||||
|
|
||||||
if (ThrowsExceptions)
|
if (args.Throw)
|
||||||
throw ex;
|
throw new DeviceProviderException(ex, isCritical);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnException(Exception ex) => Exception?.Invoke(this, ex);
|
protected virtual void OnException(ExceptionEventArgs args) => Exception?.Invoke(this, args);
|
||||||
|
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,7 +27,7 @@ namespace RGB.NET.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when an exception is thrown in the device provider
|
/// Occurs when an exception is thrown in the device provider
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<Exception>? Exception;
|
event EventHandler<ExceptionEventArgs>? Exception;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,10 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Exception Exception { get; }
|
public Exception Exception { get; }
|
||||||
|
|
||||||
|
public bool IsCritical { get; }
|
||||||
|
|
||||||
|
public bool Throw { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
@ -27,9 +31,11 @@ namespace RGB.NET.Core
|
|||||||
/// Initializes a new instance of the <see cref="T:RGB.NET.Core.ExceptionEventArgs" /> class.
|
/// Initializes a new instance of the <see cref="T:RGB.NET.Core.ExceptionEventArgs" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="exception">The <see cref="T:System.Exception" /> which is responsible for the event-call.</param>
|
/// <param name="exception">The <see cref="T:System.Exception" /> which is responsible for the event-call.</param>
|
||||||
public ExceptionEventArgs(Exception exception)
|
public ExceptionEventArgs(Exception exception, bool isCritical = false, bool @throw = false)
|
||||||
{
|
{
|
||||||
this.Exception = exception;
|
this.Exception = exception;
|
||||||
|
this.IsCritical = isCritical;
|
||||||
|
this.Throw = @throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
23
RGB.NET.Core/Exceptions/DeviceProviderException.cs
Normal file
23
RGB.NET.Core/Exceptions/DeviceProviderException.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace RGB.NET.Core
|
||||||
|
{
|
||||||
|
public class DeviceProviderException : ApplicationException
|
||||||
|
{
|
||||||
|
#region Properties & Fields
|
||||||
|
|
||||||
|
private bool IsCritical { get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructors
|
||||||
|
|
||||||
|
public DeviceProviderException(Exception? innerException, bool isCritical)
|
||||||
|
: base(innerException?.Message, innerException)
|
||||||
|
{
|
||||||
|
this.IsCritical = isCritical;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -56,7 +56,7 @@ namespace RGB.NET.Devices.CoolerMaster
|
|||||||
protected override void InitializeSDK()
|
protected override void InitializeSDK()
|
||||||
{
|
{
|
||||||
_CoolerMasterSDK.Reload();
|
_CoolerMasterSDK.Reload();
|
||||||
if (_CoolerMasterSDK.GetSDKVersion() <= 0) Throw(new RGBDeviceException("Failed to initialize CoolerMaster-SDK"));
|
if (_CoolerMasterSDK.GetSDKVersion() <= 0) Throw(new RGBDeviceException("Failed to initialize CoolerMaster-SDK"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<IRGBDevice> LoadDevices()
|
protected override IEnumerable<IRGBDevice> LoadDevices()
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace RGB.NET.Devices.CoolerMaster.Native
|
|||||||
#region Libary Management
|
#region Libary Management
|
||||||
|
|
||||||
private static IntPtr _dllHandle = IntPtr.Zero;
|
private static IntPtr _dllHandle = IntPtr.Zero;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reloads the SDK.
|
/// Reloads the SDK.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -41,6 +41,7 @@ namespace RGB.NET.Devices.CoolerMaster.Native
|
|||||||
if (dllPath == null) throw new RGBDeviceException($"Can't find the CoolerMaster-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
if (dllPath == null) throw new RGBDeviceException($"Can't find the CoolerMaster-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
||||||
|
|
||||||
_dllHandle = LoadLibrary(dllPath);
|
_dllHandle = LoadLibrary(dllPath);
|
||||||
|
if (_dllHandle == IntPtr.Zero) throw new RGBDeviceException($"CoolerMaster LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
|
||||||
|
|
||||||
_getSDKVersionPointer = (GetSDKVersionPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "GetCM_SDK_DllVer"), typeof(GetSDKVersionPointer));
|
_getSDKVersionPointer = (GetSDKVersionPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "GetCM_SDK_DllVer"), typeof(GetSDKVersionPointer));
|
||||||
_setControlDevicenPointer = (SetControlDevicePointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "SetControlDevice"), typeof(SetControlDevicePointer));
|
_setControlDevicenPointer = (SetControlDevicePointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "SetControlDevice"), typeof(SetControlDevicePointer));
|
||||||
|
|||||||
@ -71,16 +71,16 @@ namespace RGB.NET.Devices.Corsair
|
|||||||
|
|
||||||
CorsairError error = LastError;
|
CorsairError error = LastError;
|
||||||
if (error != CorsairError.Success)
|
if (error != CorsairError.Success)
|
||||||
Throw(new CUEException(error));
|
Throw(new CUEException(error), true);
|
||||||
|
|
||||||
if (ProtocolDetails.BreakingChanges)
|
if (ProtocolDetails.BreakingChanges)
|
||||||
Throw(new RGBDeviceException("The SDK currently used isn't compatible with the installed version of CUE.\r\n"
|
Throw(new RGBDeviceException("The SDK currently used isn't compatible with the installed version of CUE.\r\n"
|
||||||
+ $"CUE-Version: {ProtocolDetails.ServerVersion} (Protocol {ProtocolDetails.ServerProtocolVersion})\r\n"
|
+ $"CUE-Version: {ProtocolDetails.ServerVersion} (Protocol {ProtocolDetails.ServerProtocolVersion})\r\n"
|
||||||
+ $"SDK-Version: {ProtocolDetails.SdkVersion} (Protocol {ProtocolDetails.SdkProtocolVersion})"));
|
+ $"SDK-Version: {ProtocolDetails.SdkVersion} (Protocol {ProtocolDetails.SdkProtocolVersion})"), true);
|
||||||
|
|
||||||
// DarthAffe 02.02.2021: 127 is iCUE
|
// DarthAffe 02.02.2021: 127 is iCUE
|
||||||
if (!_CUESDK.CorsairSetLayerPriority(128))
|
if (!_CUESDK.CorsairSetLayerPriority(128))
|
||||||
Throw(new CUEException(LastError));
|
Throw(new CUEException(LastError), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@ -36,6 +36,7 @@ namespace RGB.NET.Devices.Corsair.Native
|
|||||||
if (dllPath == null) throw new RGBDeviceException($"Can't find the CUE-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
if (dllPath == null) throw new RGBDeviceException($"Can't find the CUE-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
||||||
|
|
||||||
_dllHandle = LoadLibrary(dllPath);
|
_dllHandle = LoadLibrary(dllPath);
|
||||||
|
if (_dllHandle == IntPtr.Zero) throw new RGBDeviceException($"Corsair LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
|
||||||
|
|
||||||
_corsairSetLedsColorsBufferByDeviceIndexPointer = (CorsairSetLedsColorsBufferByDeviceIndexPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairSetLedsColorsBufferByDeviceIndex"), typeof(CorsairSetLedsColorsBufferByDeviceIndexPointer));
|
_corsairSetLedsColorsBufferByDeviceIndexPointer = (CorsairSetLedsColorsBufferByDeviceIndexPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairSetLedsColorsBufferByDeviceIndex"), typeof(CorsairSetLedsColorsBufferByDeviceIndexPointer));
|
||||||
_corsairSetLedsColorsFlushBufferPointer = (CorsairSetLedsColorsFlushBufferPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairSetLedsColorsFlushBuffer"), typeof(CorsairSetLedsColorsFlushBufferPointer));
|
_corsairSetLedsColorsFlushBufferPointer = (CorsairSetLedsColorsFlushBufferPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "CorsairSetLedsColorsFlushBuffer"), typeof(CorsairSetLedsColorsFlushBufferPointer));
|
||||||
|
|||||||
@ -124,7 +124,7 @@ namespace RGB.NET.Devices.Logitech
|
|||||||
_perKeyUpdateQueue = new LogitechPerKeyUpdateQueue(GetUpdateTrigger());
|
_perKeyUpdateQueue = new LogitechPerKeyUpdateQueue(GetUpdateTrigger());
|
||||||
|
|
||||||
_LogitechGSDK.Reload();
|
_LogitechGSDK.Reload();
|
||||||
if (!_LogitechGSDK.LogiLedInit()) Throw(new RGBDeviceException("Failed to initialize Logitech-SDK."));
|
if (!_LogitechGSDK.LogiLedInit()) Throw(new RGBDeviceException("Failed to initialize Logitech-SDK."), true);
|
||||||
|
|
||||||
_LogitechGSDK.LogiLedSaveCurrentLighting();
|
_LogitechGSDK.LogiLedSaveCurrentLighting();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,7 @@ namespace RGB.NET.Devices.Logitech.Native
|
|||||||
if (dllPath == null) throw new RGBDeviceException($"Can't find the Logitech-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
if (dllPath == null) throw new RGBDeviceException($"Can't find the Logitech-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
||||||
|
|
||||||
_dllHandle = LoadLibrary(dllPath);
|
_dllHandle = LoadLibrary(dllPath);
|
||||||
|
if (_dllHandle == IntPtr.Zero) throw new RGBDeviceException($"Logitech LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
|
||||||
|
|
||||||
_logiLedInitPointer = (LogiLedInitPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedInit"), typeof(LogiLedInitPointer));
|
_logiLedInitPointer = (LogiLedInitPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedInit"), typeof(LogiLedInitPointer));
|
||||||
_logiLedShutdownPointer = (LogiLedShutdownPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedShutdown"), typeof(LogiLedShutdownPointer));
|
_logiLedShutdownPointer = (LogiLedShutdownPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "LogiLedShutdown"), typeof(LogiLedShutdownPointer));
|
||||||
|
|||||||
@ -59,14 +59,14 @@ namespace RGB.NET.Devices.Msi
|
|||||||
|
|
||||||
int errorCode;
|
int errorCode;
|
||||||
if ((errorCode = _MsiSDK.Initialize()) != 0)
|
if ((errorCode = _MsiSDK.Initialize()) != 0)
|
||||||
ThrowMsiError(errorCode);
|
ThrowMsiError(errorCode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<IRGBDevice> LoadDevices()
|
protected override IEnumerable<IRGBDevice> LoadDevices()
|
||||||
{
|
{
|
||||||
int errorCode;
|
int errorCode;
|
||||||
if ((errorCode = _MsiSDK.GetDeviceInfo(out string[] deviceTypes, out int[] ledCounts)) != 0)
|
if ((errorCode = _MsiSDK.GetDeviceInfo(out string[] deviceTypes, out int[] ledCounts)) != 0)
|
||||||
ThrowMsiError(errorCode);
|
ThrowMsiError(errorCode, true);
|
||||||
|
|
||||||
for (int i = 0; i < deviceTypes.Length; i++)
|
for (int i = 0; i < deviceTypes.Length; i++)
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ namespace RGB.NET.Devices.Msi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ThrowMsiError(int errorCode) => Throw(new MysticLightException(errorCode, _MsiSDK.GetErrorMessage(errorCode)));
|
private void ThrowMsiError(int errorCode, bool isCritical = false) => Throw(new MysticLightException(errorCode, _MsiSDK.GetErrorMessage(errorCode)), isCritical);
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
|
|||||||
@ -38,6 +38,7 @@ namespace RGB.NET.Devices.Msi.Native
|
|||||||
SetDllDirectory(Path.GetDirectoryName(Path.GetFullPath(dllPath))!);
|
SetDllDirectory(Path.GetDirectoryName(Path.GetFullPath(dllPath))!);
|
||||||
|
|
||||||
_dllHandle = LoadLibrary(dllPath);
|
_dllHandle = LoadLibrary(dllPath);
|
||||||
|
if (_dllHandle == IntPtr.Zero) throw new RGBDeviceException($"MSI LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
|
||||||
|
|
||||||
_initializePointer = (InitializePointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "MLAPI_Initialize"), typeof(InitializePointer));
|
_initializePointer = (InitializePointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "MLAPI_Initialize"), typeof(InitializePointer));
|
||||||
_getDeviceInfoPointer = (GetDeviceInfoPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "MLAPI_GetDeviceInfo"), typeof(GetDeviceInfoPointer));
|
_getDeviceInfoPointer = (GetDeviceInfoPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "MLAPI_GetDeviceInfo"), typeof(GetDeviceInfoPointer));
|
||||||
|
|||||||
@ -36,6 +36,7 @@ namespace RGB.NET.Devices.Razer.Native
|
|||||||
if (dllPath == null) throw new RGBDeviceException($"Can't find the Razer-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
if (dllPath == null) throw new RGBDeviceException($"Can't find the Razer-SDK at one of the expected locations:\r\n '{string.Join("\r\n", possiblePathList.Select(Path.GetFullPath))}'");
|
||||||
|
|
||||||
_dllHandle = LoadLibrary(dllPath);
|
_dllHandle = LoadLibrary(dllPath);
|
||||||
|
if (_dllHandle == IntPtr.Zero) throw new RGBDeviceException($"Razer LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
|
||||||
|
|
||||||
_initPointer = (InitPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "Init"), typeof(InitPointer));
|
_initPointer = (InitPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "Init"), typeof(InitPointer));
|
||||||
_unInitPointer = (UnInitPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "UnInit"), typeof(UnInitPointer));
|
_unInitPointer = (UnInitPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "UnInit"), typeof(UnInitPointer));
|
||||||
|
|||||||
@ -218,7 +218,7 @@ namespace RGB.NET.Devices.Razer
|
|||||||
|
|
||||||
RazerError error;
|
RazerError error;
|
||||||
if (((error = _RazerSDK.Init()) != RazerError.Success) && Enum.IsDefined(typeof(RazerError), error)) //HACK DarthAffe 08.02.2018: The x86-SDK seems to have a problem here ...
|
if (((error = _RazerSDK.Init()) != RazerError.Success) && Enum.IsDefined(typeof(RazerError), error)) //HACK DarthAffe 08.02.2018: The x86-SDK seems to have a problem here ...
|
||||||
ThrowRazerError(error);
|
ThrowRazerError(error, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<IRGBDevice> GetLoadedDevices(RGBDeviceType loadFilter)
|
protected override IEnumerable<IRGBDevice> GetLoadedDevices(RGBDeviceType loadFilter)
|
||||||
@ -265,7 +265,7 @@ namespace RGB.NET.Devices.Razer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ThrowRazerError(RazerError errorCode) => throw new RazerException(errorCode);
|
private void ThrowRazerError(RazerError errorCode, bool isCritical) => Throw(new RazerException(errorCode), isCritical);
|
||||||
|
|
||||||
private void TryUnInit()
|
private void TryUnInit()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,6 +38,7 @@ namespace RGB.NET.Devices.Wooting.Native
|
|||||||
SetDllDirectory(Path.GetDirectoryName(Path.GetFullPath(dllPath))!);
|
SetDllDirectory(Path.GetDirectoryName(Path.GetFullPath(dllPath))!);
|
||||||
|
|
||||||
_dllHandle = LoadLibrary(dllPath);
|
_dllHandle = LoadLibrary(dllPath);
|
||||||
|
if (_dllHandle == IntPtr.Zero) throw new RGBDeviceException($"Wooting LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
|
||||||
|
|
||||||
_getDeviceInfoPointer = (GetDeviceInfoPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "wooting_rgb_device_info"), typeof(GetDeviceInfoPointer));
|
_getDeviceInfoPointer = (GetDeviceInfoPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "wooting_rgb_device_info"), typeof(GetDeviceInfoPointer));
|
||||||
_keyboardConnectedPointer = (KeyboardConnectedPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "wooting_rgb_kbd_connected"), typeof(KeyboardConnectedPointer));
|
_keyboardConnectedPointer = (KeyboardConnectedPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_dllHandle, "wooting_rgb_kbd_connected"), typeof(KeyboardConnectedPointer));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user