Commit 6c8147b1 authored by Alexandre Julliard's avatar Alexandre Julliard

Allow the implementation of the VxDCall entry points to be moved to

separate VxD dlls. Moved VMM code to a separate dll, and removed the registry calls to get rid of the code duplication with advapi32.
parent feaad968
......@@ -1591,6 +1591,7 @@ dlls/uuid/Makefile
dlls/uxtheme/Makefile
dlls/vdhcp.vxd/Makefile
dlls/version/Makefile
dlls/vmm.vxd/Makefile
dlls/vnb.vxd/Makefile
dlls/vnetbios.vxd/Makefile
dlls/vtdapi.vxd/Makefile
......
......@@ -115,6 +115,7 @@ BASEDIRS = \
uxtheme \
vdhcp.vxd \
version \
vmm.vxd \
vnb.vxd \
vnetbios.vxd \
vtdapi.vxd \
......@@ -330,6 +331,7 @@ SYMLINKS = \
uxtheme.dll$(DLLEXT) \
vdhcp.vxd$(DLLEXT) \
version.dll$(DLLEXT) \
vmm.vxd$(DLLEXT) \
vnb.vxd$(DLLEXT) \
vnetbios.vxd$(DLLEXT) \
vtdapi.vxd$(DLLEXT) \
......@@ -759,6 +761,9 @@ version.dll$(DLLEXT): version/version.dll$(DLLEXT)
ver.dll$(DLLEXT) : version.dll$(DLLEXT)
$(RM) $@ && $(LN_S) version.dll$(DLLEXT) $@
vmm.vxd$(DLLEXT): vmm.vxd/vmm.vxd$(DLLEXT)
$(RM) $@ && $(LN_S) vmm.vxd/vmm.vxd$(DLLEXT) $@
vnb.vxd$(DLLEXT): vnb.vxd/vnb.vxd$(DLLEXT)
$(RM) $@ && $(LN_S) vnb.vxd/vnb.vxd$(DLLEXT) $@
......@@ -1780,6 +1785,7 @@ user/user32.dll$(DLLEXT): user
uxtheme/uxtheme.dll$(DLLEXT): uxtheme
vdhcp.vxd/vdhcp.vxd$(DLLEXT): vdhcp.vxd
version/version.dll$(DLLEXT): version
vmm.vxd/vmm.vxd$(DLLEXT): vmm.vxd
vnb.vxd/vnb.vxd$(DLLEXT): vnb.vxd
vnetbios.vxd/vnetbios.vxd$(DLLEXT): vnetbios.vxd
vtdapi.vxd/vtdapi.vxd$(DLLEXT): vtdapi.vxd
......
Makefile
vmm.vxd.dbg.c
vmm.vxd.spec.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = vmm.vxd
IMPORTS = kernel32 ntdll
C_SRCS = \
vmm.c
@MAKE_DLL_RULES@
### Dependencies:
@ stdcall VxDCall(long ptr) VMM_VxDCall
......@@ -31,6 +31,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(vxd);
extern void WINAPI CallBuiltinHandler( CONTEXT86 *context, BYTE intnum ); /* from winedos */
/* Pop a DWORD from the 32-bit stack */
static inline DWORD stack32_pop( CONTEXT86 *context )
{
DWORD ret = *(DWORD *)context->Esp;
context->Esp += sizeof(DWORD);
return ret;
}
static void DIOCRegs_2_CONTEXT( DIOC_REGISTERS *pIn, CONTEXT86 *pCxt )
{
......@@ -150,3 +157,55 @@ BOOL WINAPI VWIN32_DeviceIoControl(DWORD dwIoControlCode,
return FALSE;
}
}
/***********************************************************************
* VxDCall (VWIN32.VXD.@)
*
* Service numbers taken from page 448 of Pietrek's "Windows 95 System
* Programming Secrets". Parameters from experimentation on real Win98.
*
*/
DWORD WINAPI VWIN32_VxDCall( DWORD service, CONTEXT86 *context )
{
switch ( LOWORD(service) )
{
case 0x0000: /* GetVersion */
{
DWORD vers = GetVersion();
return (LOBYTE(vers) << 8) | HIBYTE(vers);
}
case 0x0020: /* Get VMCPD Version */
{
DWORD parm = stack32_pop(context);
FIXME("Get VMCPD Version(%08lx): partial stub!\n", parm);
/* FIXME: This is what Win98 returns, it may
* not be correct in all situations.
* It makes Bleem! happy though.
*/
return 0x0405;
}
case 0x0029: /* Int31/DPMI dispatch */
{
DWORD callnum = stack32_pop(context);
DWORD parm = stack32_pop(context);
TRACE("Int31/DPMI dispatch(%08lx)\n", callnum);
context->Eax = callnum;
context->Ecx = parm;
CallBuiltinHandler( context, 0x31 );
return LOWORD(context->Eax);
}
case 0x002a: /* Int41 dispatch - parm = int41 service number */
{
DWORD callnum = stack32_pop(context);
return callnum; /* FIXME: should really call INT_Int41Handler() */
}
default:
FIXME("Unknown service %08lx\n", service);
return 0xffffffff;
}
}
@ stdcall DeviceIoControl(long ptr long ptr long ptr ptr) VWIN32_DeviceIoControl
@ stdcall VxDCall(long ptr) VWIN32_VxDCall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment