i code to get CPU ID by VC++, but when i paste it to Qtcreator then it cant run, can you help me convert it , thanks

Qt Code:
  1. //_____________________
  2. unsigned long getCPUID()
  3. {
  4. unsigned long CPU_ID;
  5. __asm
  6. {
  7. mov eax, 80000001h
  8. CPUID
  9. mov CPU_ID, edx
  10. };
  11. return CPU_ID;
  12. }
To copy to clipboard, switch view to plain text mode