Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RGB.NET.Devices.CoolerMaster/Native/_CoolerMasterSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static void LoadCMSDK()
#if NET6_0
if (_handle == IntPtr.Zero) throw new RGBDeviceException($"CoolerMaster LoadLibrary failed with error code {Marshal.GetLastPInvokeError()}");
#else
if (_handle == 0) throw new RGBDeviceException($"CoolerMaster LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
if (_handle == 0) throw new RGBDeviceException($"CoolerMaster LoadLibrary failed with error code {Marshal.GetLastSystemError()}");
#endif

_getSDKVersionPointer = (GetSDKVersionPointer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_handle, "GetCM_SDK_DllVer"), typeof(GetSDKVersionPointer));
Expand Down
2 changes: 1 addition & 1 deletion RGB.NET.Devices.Corsair_Legacy/Native/_CUESDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void LoadCUESDK()
#if NET6_0
throw new RGBDeviceException($"Corsair LoadLibrary failed with error code {Marshal.GetLastPInvokeError()}");
#else
throw new RGBDeviceException($"Corsair LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
throw new RGBDeviceException($"Corsair LoadLibrary failed with error code {Marshal.GetLastSystemError()}");
#endif

if (!NativeLibrary.TryGetExport(_handle, "CorsairSetLedsColorsBufferByDeviceIndex", out _corsairSetLedsColorsBufferByDeviceIndexPointer)) throw new RGBDeviceException("Failed to load Corsair function 'CorsairSetLedsColorsBufferByDeviceIndex'");
Expand Down
2 changes: 1 addition & 1 deletion RGB.NET.Devices.Logitech/Native/_LogitechGSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private static void LoadLogitechGSDK()
#if NET6_0
throw new RGBDeviceException($"Logitech LoadLibrary failed with error code {Marshal.GetLastPInvokeError()}");
#else
throw new RGBDeviceException($"Logitech LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
throw new RGBDeviceException($"Logitech LoadLibrary failed with error code {Marshal.GetLastSystemError()}");
#endif

if (!NativeLibrary.TryGetExport(_handle, "LogiLedInit", out _logiLedInitPointer)) throw new RGBDeviceException("Failed to load Logitech function 'LogiLedInit'");
Expand Down
2 changes: 1 addition & 1 deletion RGB.NET.Devices.Msi/Native/_MsiSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private static void LoadMsiSDK()
#if NET6_0
throw new RGBDeviceException($"MSI LoadLibrary failed with error code {Marshal.GetLastPInvokeError()}");
#else
throw new RGBDeviceException($"MSI LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
throw new RGBDeviceException($"MSI LoadLibrary failed with error code {Marshal.GetLastSystemError()}");
#endif

_initializePointer = (InitializePointer)Marshal.GetDelegateForFunctionPointer(NativeLibrary.GetExport(_handle, "MLAPI_Initialize"), typeof(InitializePointer));
Expand Down
2 changes: 1 addition & 1 deletion RGB.NET.Devices.Razer/Native/_RazerSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void LoadRazerSDK()
#if NET6_0
throw new RGBDeviceException($"Razer LoadLibrary failed with error code {Marshal.GetLastPInvokeError()}");
#else
throw new RGBDeviceException($"Razer LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
throw new RGBDeviceException($"Razer LoadLibrary failed with error code {Marshal.GetLastSystemError()}");
#endif

if (!NativeLibrary.TryGetExport(_handle, "Init", out _initPointer)) throw new RGBDeviceException("Failed to load Razer function 'Init'");
Expand Down
2 changes: 1 addition & 1 deletion RGB.NET.Devices.Wooting/Native/_WootingSDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void LoadWootingSDK()
#if NET6_0
throw new RGBDeviceException($"Wooting LoadLibrary failed with error code {Marshal.GetLastPInvokeError()}");
#else
throw new RGBDeviceException($"Wooting LoadLibrary failed with error code {Marshal.GetLastWin32Error()}");
throw new RGBDeviceException($"Wooting LoadLibrary failed with error code {Marshal.GetLastSystemError()}");
#endif

if (!NativeLibrary.TryGetExport(_handle, "wooting_rgb_device_info", out _getDeviceInfoPointer)) throw new RGBDeviceException("Failed to load wooting function 'wooting_rgb_device_info'");
Expand Down
Loading