mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
revert to 1.3. I didnt mean to commit that
svn path=/trunk/; revision=9586
This commit is contained in:
parent
73888a7753
commit
08ff887056
1 changed files with 18 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: vmwinst.c,v 1.4 2004/06/01 19:06:50 sedwards Exp $
|
/* $Id: vmwinst.c,v 1.5 2004/06/01 19:08:53 sedwards Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS VMware(r) driver installation utility
|
* PROJECT: ReactOS VMware(r) driver installation utility
|
||||||
|
@ -56,7 +56,24 @@ LONG WINAPI ExceptionHandler(LPEXCEPTION_POINTERS ExceptionInfo)
|
||||||
BOOL
|
BOOL
|
||||||
DetectVMware(int *Version)
|
DetectVMware(int *Version)
|
||||||
{
|
{
|
||||||
|
int magic, ver;
|
||||||
|
|
||||||
|
magic = 0;
|
||||||
|
ver = 0;
|
||||||
|
|
||||||
|
/* Try using a VMware I/O port. If not running in VMware this'll throw an
|
||||||
|
exception! */
|
||||||
|
__asm__ __volatile__("inl %%dx, %%eax"
|
||||||
|
: "=a" (ver), "=b" (magic)
|
||||||
|
: "0" (0x564d5868), "d" (0x5658), "c" (0xa));
|
||||||
|
|
||||||
|
if(magic == 0x564d5868)
|
||||||
|
{
|
||||||
|
*Version = ver;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
|
Loading…
Reference in a new issue