From: Pali Rohár pali@kernel.org
VxDCall vwin32 service id 0x0010 provides int21 dispatch functionality and VxDCall vwin32 service id 0x002a provides int41 dispatch functionality.
All of these vwin32 services together with existing service id 0x0029 (for int31/dpmi functionality) have same API, first VxDCall() argument is value for EAX register and second argument is value for ECX register.
VxDCall vwin32 service id 0x0010 is used by applications in Andrew Schulman's book Unauthorized Windows 95. For example by CHGDIR for getting PSP.
Signed-off-by: Pali Rohár pali@kernel.org --- dlls/vwin32.vxd/vwin32.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/dlls/vwin32.vxd/vwin32.c b/dlls/vwin32.vxd/vwin32.c index 38a3694127b..e176010baf4 100644 --- a/dlls/vwin32.vxd/vwin32.c +++ b/dlls/vwin32.vxd/vwin32.c @@ -199,23 +199,38 @@ DWORD WINAPI VWIN32_VxDCall( DWORD service, CONTEXT *context ) */ return 0x0405; } + case 0x0010: /* Int21 dispatch */ case 0x0029: /* Int31/DPMI dispatch */ + case 0x002a: /* Int41 dispatch */ { - DWORD callnum = stack32_pop(context); - DWORD parm = stack32_pop(context); + BYTE intnum = 0; + + context->Eax = stack32_pop( context ); + context->Ecx = stack32_pop( context ); + + switch ( LOWORD( service ) ) + { + case 0x0010: /* Int21 dispatch */ + intnum = 0x21; + break; + case 0x0029: /* Int31/DPMI dispatch */ + intnum = 0x31; + break; + case 0x002a: /* Int41 dispatch */ + intnum = 0x41; + break; + }
- TRACE("Int31/DPMI dispatch(%08lx)\n", callnum); + TRACE( "Int%x dispatch: " + "eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, " + "edx=0x%08lx, esi=0x%08lx, edi=0x%08lx\n", + intnum, + context->Eax, context->Ebx, context->Ecx, + context->Edx, context->Esi, context->Edi );
- context->Eax = callnum; - context->Ecx = parm; - __wine_call_int_handler16( 0x31, context ); + __wine_call_int_handler16( intnum, context ); 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;