VMWARE detection: cannot run the IN instruction in VMware

I'm trying to detect VMWARE OS using the IN instruction to get the VMware version, if in a VMware Guest, then it would can run this privileged instruction. but I failed (cannot run the IN instruction in both the VMware OS and Native OS, and get SIGILL signal,)when I'm using g++ and MinGW to write the code. so I turned to use VC++ 6.0, it worked(ebx was set to 'VMXh').
Is the g++ compiler doing something or other reasons so that the IN instruction failed to be run in the VMware OS?
My host OS is win7 and Guest OS is winxp sp3 with VMware workstation 10.

阅读 2.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进