mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
replace Marshal.GetLastWin32Error() after dll load failures with Marshal.GetLastSystemError()
This commit is contained in:
1 parent
13f3dde185
commit
00eec7ab80
6 files changed
+6
-6
No files matched your search
@@ -40,7 +40,7 @@ internal static class _CUESDK
|
||||
#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'");
|
||||
|
||||
Reference in new issue
Block a user