From f7d71bf15863349050f0b1480dc84413979643ed Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 27 Aug 2003 02:57:32 +0000 Subject: [PATCH] Converted remaining 16-bit functions to the new varargs mechanism. --- dlls/kernel/krnl386.exe.spec | 6 +- dlls/kernel/wowthunk.c | 117 +++++++++++++++++------------------ 2 files changed, 60 insertions(+), 63 deletions(-) diff --git a/dlls/kernel/krnl386.exe.spec b/dlls/kernel/krnl386.exe.spec index 4706ae32f10..29795e92906 100644 --- a/dlls/kernel/krnl386.exe.spec +++ b/dlls/kernel/krnl386.exe.spec @@ -403,7 +403,7 @@ # 500-544 are WinNT extensions; some are also available in Win95 -500 pascal WOW16Call(word word word) WOW16Call +500 varargs WOW16Call(word word word) WOW16Call 501 stub KDDBGOUT # Both NT/95 (?) 502 stub WOWGETNEXTVDMCOMMAND 503 stub WOWREGISTERSHELLWINDOWHANDLE @@ -422,8 +422,8 @@ 514 pascal FreeLibrary32W(long) FreeLibrary32W16 # Both NT/95 515 pascal GetProcAddress32W(long str) GetProcAddress32W16 # Both NT/95 516 pascal GetVDMPointer32W(segptr word) GetVDMPointer32W16 # Both NT/95 -517 pascal CallProc32W() CallProc32W16 # Both NT/95 -518 pascal _CallProcEx32W() CallProcEx32W16 # Both NT/95 +517 varargs CallProc32W(long long long) CallProc32W16 # Both NT/95 +518 varargs _CallProcEx32W(long long long) CallProcEx32W16 # Both NT/95 519 stub EXITKERNELTHUNK # the __MOD_ variables are WORD datareferences, the current values are invented. 520 equate __MOD_KERNEL 4200 diff --git a/dlls/kernel/wowthunk.c b/dlls/kernel/wowthunk.c index c2b7b3cf3ea..ee382f715e0 100644 --- a/dlls/kernel/wowthunk.c +++ b/dlls/kernel/wowthunk.c @@ -55,9 +55,6 @@ DWORD WINAPI FreeLibrary32W16(DWORD); #define CPEX_DEST_STDCALL 0x00000000L #define CPEX_DEST_CDECL 0x80000000L -DWORD WINAPI CallProcExW16(VOID); -DWORD WINAPI CallProcEx32W16(VOID); - /* thunk for 16-bit CreateThread */ struct thread_args { @@ -634,48 +631,13 @@ DWORD WINAPI FreeLibrary32W16( DWORD hLibModule ) /********************************************************************** * WOW_CallProc32W */ -static DWORD WOW_CallProc32W16( BOOL Ex ) +static DWORD WOW_CallProc32W16( FARPROC proc32, DWORD nrofargs, DWORD *args ) { - DWORD nrofargs, argconvmask; - FARPROC proc32; - DWORD *args, ret; + DWORD ret; DWORD mutex_count; - VA_LIST16 valist; - unsigned int i; - int aix; ReleaseThunkLock( &mutex_count ); - VA_START16( valist ); - nrofargs = VA_ARG16( valist, DWORD ); - argconvmask = VA_ARG16( valist, DWORD ); - proc32 = VA_ARG16( valist, FARPROC ); - TRACE("(%ld,%ld,%p, Ex%d args[",nrofargs,argconvmask,proc32,Ex); - args = (DWORD*)HeapAlloc( GetProcessHeap(), 0, sizeof(DWORD)*nrofargs ); - if(args == NULL) proc32 = NULL; /* maybe we should WARN here? */ - /* CallProcEx doesn't need its args reversed */ - for (i=0;i