krnl386: Explicitly fetch the service argument in VxDCall.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-07-25 11:51:18 +02:00
parent 5b71091b43
commit c5a35d898f
5 changed files with 36 additions and 37 deletions

View File

@ -8,15 +8,15 @@
# - code generated by the MS Thunk Compiler
# - symbols exported by the Oct 94 beta version of kernel32.dll
1 stdcall -noname -i386 -private -register VxDCall0(long) krnl386.exe16.VxDCall0
2 stdcall -noname -i386 -private -register VxDCall1(long) krnl386.exe16.VxDCall1
3 stdcall -noname -i386 -private -register VxDCall2(long) krnl386.exe16.VxDCall2
4 stdcall -noname -i386 -private -register VxDCall3(long) krnl386.exe16.VxDCall3
5 stdcall -noname -i386 -private -register VxDCall4(long) krnl386.exe16.VxDCall4
6 stdcall -noname -i386 -private -register VxDCall5(long) krnl386.exe16.VxDCall5
7 stdcall -noname -i386 -private -register VxDCall6(long) krnl386.exe16.VxDCall6
8 stdcall -noname -i386 -private -register VxDCall7(long) krnl386.exe16.VxDCall7
9 stdcall -noname -i386 -private -register VxDCall8(long) krnl386.exe16.VxDCall8
1 stdcall -noname -i386 -private -register VxDCall0() krnl386.exe16.VxDCall0
2 stdcall -noname -i386 -private -register VxDCall1() krnl386.exe16.VxDCall1
3 stdcall -noname -i386 -private -register VxDCall2() krnl386.exe16.VxDCall2
4 stdcall -noname -i386 -private -register VxDCall3() krnl386.exe16.VxDCall3
5 stdcall -noname -i386 -private -register VxDCall4() krnl386.exe16.VxDCall4
6 stdcall -noname -i386 -private -register VxDCall5() krnl386.exe16.VxDCall5
7 stdcall -noname -i386 -private -register VxDCall6() krnl386.exe16.VxDCall6
8 stdcall -noname -i386 -private -register VxDCall7() krnl386.exe16.VxDCall7
9 stdcall -noname -i386 -private -register VxDCall8() krnl386.exe16.VxDCall8
10 stdcall -noname -i386 -private k32CharToOemA(str ptr) krnl386.exe16.k32CharToOemA
11 stdcall -noname -i386 -private k32CharToOemBuffA(str ptr long) krnl386.exe16.k32CharToOemBuffA
12 stdcall -noname -i386 -private k32OemToCharA(ptr ptr) krnl386.exe16.k32OemToCharA

View File

@ -283,6 +283,21 @@ static inline struct kernel_thread_data *kernel_get_thread_data(void)
return (struct kernel_thread_data *)NtCurrentTeb()->SystemReserved1;
}
/* Push a DWORD on the 32-bit stack */
static inline void stack32_push( CONTEXT *context, DWORD val )
{
context->Esp -= sizeof(DWORD);
*(DWORD *)context->Esp = val;
}
/* Pop a DWORD from the 32-bit stack */
static inline DWORD stack32_pop( CONTEXT *context )
{
DWORD ret = *(DWORD *)context->Esp;
context->Esp += sizeof(DWORD);
return ret;
}
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
__ASM_GLOBAL_FUNC( name, \
".byte 0x68\n\t" /* pushl $__regs_func */ \

View File

@ -549,15 +549,15 @@
################################################################
# 32-bit version of the various 16-bit functions exported by kernel32
#
@ stdcall -arch=win32 -register VxDCall0(long) VxDCall
@ stdcall -arch=win32 -register VxDCall1(long) VxDCall
@ stdcall -arch=win32 -register VxDCall2(long) VxDCall
@ stdcall -arch=win32 -register VxDCall3(long) VxDCall
@ stdcall -arch=win32 -register VxDCall4(long) VxDCall
@ stdcall -arch=win32 -register VxDCall5(long) VxDCall
@ stdcall -arch=win32 -register VxDCall6(long) VxDCall
@ stdcall -arch=win32 -register VxDCall7(long) VxDCall
@ stdcall -arch=win32 -register VxDCall8(long) VxDCall
@ stdcall -arch=win32 -register VxDCall0() VxDCall
@ stdcall -arch=win32 -register VxDCall1() VxDCall
@ stdcall -arch=win32 -register VxDCall2() VxDCall
@ stdcall -arch=win32 -register VxDCall3() VxDCall
@ stdcall -arch=win32 -register VxDCall4() VxDCall
@ stdcall -arch=win32 -register VxDCall5() VxDCall
@ stdcall -arch=win32 -register VxDCall6() VxDCall
@ stdcall -arch=win32 -register VxDCall7() VxDCall
@ stdcall -arch=win32 -register VxDCall8() VxDCall
@ stdcall -arch=win32 k32CharToOemA(str ptr)
@ stdcall -arch=win32 k32CharToOemBuffA(str ptr long)
@ stdcall -arch=win32 k32OemToCharA(ptr ptr)

View File

@ -153,21 +153,6 @@ extern void FT_PrologPrime(void);
extern void QT_Thunk(void);
extern void QT_ThunkPrime(void);
/* Push a DWORD on the 32-bit stack */
static inline void stack32_push( CONTEXT *context, DWORD val )
{
context->Esp -= sizeof(DWORD);
*(DWORD *)context->Esp = val;
}
/* Pop a DWORD from the 32-bit stack */
static inline DWORD stack32_pop( CONTEXT *context )
{
DWORD ret = *(DWORD *)context->Esp;
context->Esp += sizeof(DWORD);
return ret;
}
/***********************************************************************
* *
* Win95 internal thunks *

View File

@ -286,10 +286,11 @@ done:
* VxDCall7 (KERNEL32.8)
* VxDCall8 (KERNEL32.9)
*/
void WINAPI DECLSPEC_HIDDEN __regs_VxDCall( DWORD service, CONTEXT *context )
void WINAPI DECLSPEC_HIDDEN __regs_VxDCall( CONTEXT *context )
{
unsigned int i;
VxDCallProc proc = NULL;
DWORD service = stack32_pop( context );
RtlEnterCriticalSection( &vxd_section );
for (i = 0; i < NB_VXD_SERVICES; i++)
@ -312,9 +313,7 @@ void WINAPI DECLSPEC_HIDDEN __regs_VxDCall( DWORD service, CONTEXT *context )
context->Eax = 0xffffffff; /* FIXME */
}
}
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( VxDCall, 1 )
#endif
DEFINE_REGS_ENTRYPOINT( VxDCall, 0 )
/***********************************************************************