How to get nvidia Device ID

Hello I need to make an implementation of hwid bans for lab, how can I get Device Id using c ++/masm
For example, I get the cpuID by calling the cpuid instruction…
May I ask for example code not using winapi getting nvidia deviceID

I am afraid I have no idea what “hwid bans” refers to. Can you clarify what you mean by “Device Id”? Generally speaking, hardware-specific information can be retrieved via NVML (NVIDIA Management Library), which serves as the basis for the nvidia-smi utility. The NVML documentation is here:

https://docs.nvidia.com/deploy/nvml-api/index.html

I am guessing what you are looking for is the universally unique identifier associated with each GPU, which you would retrieve by calling nvmlDeviceGetUUID().

Let me ask you plz, how, in theory, a cheater would try to change the device id. I suppose that in addition to modifying the VBIOS, you could hook nvml.dll and pass false values (I could not find an example of the code of a working spoofer to understand how it works). Attempts to extract the asm instruction code using ida failed ((Please explain if possible how Nvidia Device Id spoofers work… If exist (excluding hypervisors)…