我想从GPU获得显存。我使用WMI - Win32_VideoController类,属性AdapterRAM。它以字节为单位返回值,因此我将其转换为MB:
int gpuRAM_MB = (gpuAdapterRAM.uintVal) / (1024) / (1024);当我尝试将值转换为GB时,它返回3 GB (在其他软件中,如AIDA64,它返回4 GB):
int gpuRAM_GB = (gpuAdapterRAM.uintVal) / (1024) / (1024) / (1024);我的应用:

AIDA64:

问题是如何将其转换为GB?提前谢谢。
https://stackoverflow.com/questions/41376894
复制相似问题