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:
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
@@ -9,6 +9,7 @@ using System.IO;
|
||||
using System.Management;
|
||||
using System.Runtime.InteropServices;
|
||||
using Windows.Win32;
|
||||
using Windows.Win32.Foundation;
|
||||
using Windows.Win32.Storage.FileSystem;
|
||||
using Windows.Win32.System.Ioctl;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
@@ -33,7 +34,7 @@ internal static class WindowsStorage
|
||||
var query = new STORAGE_PROPERTY_QUERY { PropertyId = STORAGE_PROPERTY_ID.StorageDeviceProperty, QueryType = STORAGE_QUERY_TYPE.PropertyStandardQuery };
|
||||
STORAGE_DESCRIPTOR_HEADER result = new();
|
||||
|
||||
if (!PInvoke.DeviceIoControl(handle, PInvoke.IOCTL_STORAGE_QUERY_PROPERTY, &query, (uint)sizeof(STORAGE_PROPERTY_QUERY), &result, (uint)sizeof(STORAGE_DESCRIPTOR_HEADER), null, null))
|
||||
if (!PInvoke.DeviceIoControl((HANDLE)handle.DangerousGetHandle(), PInvoke.IOCTL_STORAGE_QUERY_PROPERTY, &query, (uint)sizeof(STORAGE_PROPERTY_QUERY), &result, (uint)sizeof(STORAGE_DESCRIPTOR_HEADER), null, null))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -42,7 +43,7 @@ internal static class WindowsStorage
|
||||
|
||||
try
|
||||
{
|
||||
return PInvoke.DeviceIoControl(handle, PInvoke.IOCTL_STORAGE_QUERY_PROPERTY, &query, (uint)sizeof(STORAGE_PROPERTY_QUERY), (void*)descriptorPtr, result.Size, null, null)
|
||||
return PInvoke.DeviceIoControl((HANDLE)handle.DangerousGetHandle(), PInvoke.IOCTL_STORAGE_QUERY_PROPERTY, &query, (uint)sizeof(STORAGE_PROPERTY_QUERY), (void*)descriptorPtr, result.Size, null, null)
|
||||
? new StorageInfo((int)driveIndex, descriptorPtr)
|
||||
: null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user