Bump Microsoft.Windows.CsWin32 from 0.3.235 to 0.3.236 (#1999)

* Bump Microsoft.Windows.CsWin32 from 0.3.235 to 0.3.236

---
updated-dependencies:
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.236
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build compatibility with Microsoft.Windows.CsWin32 0.3.236 (#2000)

* Initial plan

* Fix compatibility with CsWin32 0.3.236 and resource path case sensitivity

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

* Remove unnecessary local variable pData in BatteryGroup.cs

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2025-10-30 23:51:27 +01:00
committed by GitHub
co-authored by PhyxionNL copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Copilot
parent b1b76c3d18
commit cbd3f4b1d2
11 changed files with 53 additions and 45 deletions
@@ -10,6 +10,7 @@ using System.Runtime.InteropServices;
using System.Text;
using LibreHardwareMonitor.Interop;
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.Storage.FileSystem;
using Windows.Win32.System.Ioctl;
using static LibreHardwareMonitor.Interop.AtaSmart;
@@ -59,7 +60,7 @@ internal class WindowsSmart : ISmart
var result = new SENDCMDOUTPARAMS();
return PInvoke.DeviceIoControl(_handle,
return PInvoke.DeviceIoControl((HANDLE)_handle.DangerousGetHandle(),
PInvoke.SMART_SEND_DRIVE_COMMAND,
&parameter,
(uint)sizeof(SENDCMDINPARAMS),
@@ -89,7 +90,7 @@ internal class WindowsSmart : ISmart
int cb = sizeof(SENDCMDOUTPARAMS) + 512; // 512 bytes buffer.
IntPtr buffer = Marshal.AllocHGlobal(cb);
bool isValid = PInvoke.DeviceIoControl(_handle,
bool isValid = PInvoke.DeviceIoControl((HANDLE)_handle.DangerousGetHandle(),
PInvoke.SMART_RCV_DRIVE_DATA,
&parameter,
(uint)sizeof(SENDCMDINPARAMS),
@@ -139,7 +140,7 @@ internal class WindowsSmart : ISmart
int cb = sizeof(SENDCMDOUTPARAMS) + 512; // 2 bytes padding + 512 bytes buffer.
IntPtr buffer = Marshal.AllocHGlobal(cb);
bool isValid = PInvoke.DeviceIoControl(_handle,
bool isValid = PInvoke.DeviceIoControl((HANDLE)_handle.DangerousGetHandle(),
PInvoke.SMART_RCV_DRIVE_DATA,
&parameter,
(uint)sizeof(SENDCMDINPARAMS),
@@ -186,7 +187,7 @@ internal class WindowsSmart : ISmart
int cb = sizeof(SENDCMDOUTPARAMS) + sizeof(IDENTIFY_DEVICE_DATA);
IntPtr buffer = Marshal.AllocHGlobal(cb);
bool valid = PInvoke.DeviceIoControl(_handle,
bool valid = PInvoke.DeviceIoControl((HANDLE)_handle.DangerousGetHandle(),
PInvoke.SMART_RCV_DRIVE_DATA,
&parameter,
(uint)sizeof(SENDCMDINPARAMS),