Files
ReLibreHardwareMonitor/LibreHardwareMonitorLib/NativeMethods.txt
T
David ReneltandPhyxionNL a792c26891 Add intel vram sensors (#2077)
* Add Intel Arc VRAM sensors support

- Implement BDF-based device matching for Intel discrete GPUs
- Add VRAM sensors (total, used, free, load percentage)
- Use D3D device enumeration with fallback logic
- Enable Windows-specific VRAM monitoring for Intel Arc GPUs
- Fix device identification to distinguish between multiple identical GPUs

Resolves issue where both Intel Arc GPUs showed identical VRAM values.
Now each GPU displays unique, accurate memory usage statistics.

* Add defensive validation to GetBdfFromDeviceIdentifier

- Add null/empty check for deviceIdentifier parameter
- Return false explicitly when LastIndexOf('#') returns -1
- Add DEVPROPTYPE.DEVPROP_TYPE_UINT32 validation after property queries
- Use sizeof(uint) instead of hardcoded 4 for buffer sizes
- Apply PCI spec bit masks (5-bit device, 3-bit function)
- Add bus range validation (0-255)

* Revert to Windows DEVPKEY_Device_Address spec masks

Use 0xFFFF masks as per Windows documentation instead of PCI spec
bit widths. The Windows API uses full 16-bit fields for device and
function numbers.

* Update IntelDiscreteGpu.cs

* Update NativeMethods.txt

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-11-28 21:54:04 +01:00

52 lines
1.1 KiB
Plaintext

CM_Get_Device_Interface_List_Size
CM_Get_Device_Interface_List
GUID_DISPLAY_DEVICE_ARRIVAL
NtQuerySystemInformation
SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
STATUS_INFO_LENGTH_MISMATCH
STATUS_SUCCESS
D3DKMTCloseAdapter
D3DKMTOpenAdapterFromDeviceName
D3DKMTQueryAdapterInfo
D3DKMTQueryStatistics
D3DKMT_ADAPTERTYPE
D3DKMT_SEGMENTSIZEINFO
D3DKMT_NODEMETADATA
D3DKMT_QUERYSTATISTICS_NODE_INFORMATION
SetupDiDestroyDeviceInfoList
SetupDiGetDeviceInterfaceDetail
SetupDiEnumDeviceInterfaces
SetupDiGetClassDevs
SP_DEVICE_INTERFACE_DATA
SP_DEVICE_INTERFACE_DETAIL_DATA_W
GUID_DEVICE_BATTERY
WIN32_ERROR
HRESULT_FROM_WIN32
GlobalMemoryStatusEx
GetCurrentThread
GetActiveProcessorGroupCount
GROUP_AFFINITY
SetThreadGroupAffinity
EnumSystemFirmwareTables
GetSystemFirmwareTable
DISK_PERFORMANCE
BATTERY_QUERY_INFORMATION
BATTERY_INFORMATION
BATTERY_SYSTEM_BATTERY
BATTERY_STATUS
BATTERY_WAIT_STATUS
CreateFile
VirtualFree
VirtualAlloc
DeviceIoControl
IOCTL_*
LoadLibrary
FreeLibrary
GetProcAddress
BATTERY_UNKNOWN_*
CM_Locate_DevNode
CM_Get_DevNode_Property
CM_LOCATE_DEVNODE_FLAGS
DEVPKEY_Device_BusNumber
DEVPKEY_Device_Address