Using Assembly with a wondows desktop Qt project
Hi all, I'm using Qt5.2 on a Windows 7 x64 platform (MinGW) and I'm writing a program that needs to be hard coded it to a processor ID. From what I've found, Qt does not have support for accessing the processor information and so it must be done manually (correct me if I'm wrong). I just can't seem to find any documentation explaining how to run assembly commands within Qt. I've started with this:
asm volatile(//asm code)
I read that this was the specific format for MinGW, but it seems that the compiler doesn't accept any of the assembly code I enter. These have been my references for accessing the information, and for using the asm code:
Can someone shed some light? Thanks!!
The syntax is correct, why you need asm is more the question. I tried this:
in a constructor and in a C included file, both lines do not give compile errors.
I never heard of anyone combining C++ and asm before ;-)
I'm using it for a small, basic copy protection. The people getting this program are smart enough to change a mac address, but not smart enough to decompile and crack a program. So I want to retrieve the CPU serial number for verification. Those links gave me the answer but I was having trouble utilizing the asm with gcc. apparently it's a little different...