Replaced most uses of the auto-generated glue code by explicit calls

to WOWCallback16Ex.
This commit is contained in:
Alexandre Julliard 2003-02-27 21:09:45 +00:00
parent 84c48b957b
commit 7e92c9af7b
34 changed files with 334 additions and 203 deletions

View File

@ -44,6 +44,7 @@
#include "winbase.h"
#include "winnt.h"
#include "wownt32.h"
#include "win.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
@ -1270,9 +1271,6 @@ static void EDIT_CalcLineWidth_SL(EDITSTATE *es)
* the string under examination (we can decide this for ourselves).
*
*/
/* ### start build ### */
extern WORD CALLBACK EDIT_CallTo16_word_lwww(EDITWORDBREAKPROC16,SEGPTR,WORD,WORD,WORD);
/* ### stop build ### */
static INT EDIT_CallWordBreakProc(EDITSTATE *es, INT start, INT index, INT count, INT action)
{
INT ret, iWndsLocks;
@ -1285,13 +1283,20 @@ static INT EDIT_CallWordBreakProc(EDITSTATE *es, INT start, INT index, INT count
HGLOBAL16 hglob16;
SEGPTR segptr;
INT countA;
WORD args[5];
DWORD result;
countA = WideCharToMultiByte(CP_ACP, 0, es->text + start, count, NULL, 0, NULL, NULL);
hglob16 = GlobalAlloc16(GMEM_MOVEABLE | GMEM_ZEROINIT, countA);
segptr = K32WOWGlobalLock16(hglob16);
WideCharToMultiByte(CP_ACP, 0, es->text + start, count, MapSL(segptr), countA, NULL, NULL);
ret = (INT)EDIT_CallTo16_word_lwww(es->word_break_proc16,
segptr, index, countA, action);
args[4] = SELECTOROF(segptr);
args[3] = OFFSETOF(segptr);
args[2] = index;
args[1] = countA;
args[0] = action;
WOWCallback16Ex((DWORD)es->word_break_proc16, WCB16_PASCAL, sizeof(args), args, &result);
ret = LOWORD(result);
GlobalUnlock16(hglob16);
GlobalFree16(hglob16);
}

View File

@ -2,7 +2,6 @@ Makefile
dispdib.spec.c
gdi.exe.spec.c
gdi32.dll.dbg.c
gdi32.dll.glue.c
gdi32.spec.c
gdi32.spec.def
version.res

View File

@ -62,8 +62,6 @@ C_SRCS16 = \
RC_SRCS = version.rc
RC_SRCS16 = version16.rc
EXTRA_OBJS = $(MODULE).glue.o
SUBDIRS = tests
EXTRASUBDIRS = \

View File

@ -30,11 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
#define HGDIOBJ_32(handle16) ((HGDIOBJ)(ULONG_PTR)(handle16))
#define HGDIOBJ_16(handle32) ((HGDIOBJ16)(ULONG_PTR)(handle32))
/* ### start build ### */
extern WORD CALLBACK GDI_CallTo16_word_ll(FARPROC16,LONG,LONG);
extern WORD CALLBACK GDI_CallTo16_word_wwl(FARPROC16,WORD,WORD,LONG);
/* ### stop build ### */
struct callback16_info
{
FARPROC16 proc;
@ -45,7 +40,13 @@ struct callback16_info
static void CALLBACK linedda_callback( INT x, INT y, LPARAM param )
{
const struct callback16_info *info = (struct callback16_info *)param;
GDI_CallTo16_word_wwl( info->proc, x, y, info->param );
WORD args[4];
args[3] = x;
args[2] = y;
args[1] = HIWORD(info->param);
args[0] = LOWORD(info->param);
WOWCallback16Ex( (DWORD)info->proc, WCB16_PASCAL, sizeof(args), args, NULL );
}
/* callback for EnumObjects16 */
@ -55,16 +56,21 @@ static INT CALLBACK enum_pens_callback( void *ptr, LPARAM param )
LOGPEN *pen = ptr;
LOGPEN16 pen16;
SEGPTR segptr;
INT ret;
DWORD ret;
WORD args[4];
pen16.lopnStyle = pen->lopnStyle;
pen16.lopnWidth.x = pen->lopnWidth.x;
pen16.lopnWidth.y = pen->lopnWidth.y;
pen16.lopnColor = pen->lopnColor;
segptr = MapLS( &pen16 );
ret = GDI_CallTo16_word_ll( info->proc, segptr, info->param );
args[3] = SELECTOROF(segptr);
args[2] = OFFSETOF(segptr);
args[1] = HIWORD(info->param);
args[0] = LOWORD(info->param);
WOWCallback16Ex( (DWORD)info->proc, WCB16_PASCAL, sizeof(args), args, &ret );
UnMapLS( segptr );
return ret;
return LOWORD(ret);
}
/* callback for EnumObjects16 */
@ -74,13 +80,18 @@ static INT CALLBACK enum_brushes_callback( void *ptr, LPARAM param )
LOGBRUSH *brush = ptr;
LOGBRUSH16 brush16;
SEGPTR segptr;
INT ret;
DWORD ret;
WORD args[4];
brush16.lbStyle = brush->lbStyle;
brush16.lbColor = brush->lbColor;
brush16.lbHatch = brush->lbHatch;
segptr = MapLS( &brush16 );
ret = GDI_CallTo16_word_ll( info->proc, segptr, info->param );
args[3] = SELECTOROF(segptr);
args[2] = OFFSETOF(segptr);
args[1] = HIWORD(info->param);
args[0] = LOWORD(info->param);
WOWCallback16Ex( (DWORD)info->proc, WCB16_PASCAL, sizeof(args), args, &ret );
UnMapLS( segptr );
return ret;
}

View File

@ -214,9 +214,6 @@ BOOL16 WINAPI QueryAbort16(HDC16 hdc16, INT16 reserved)
return ret;
}
/* ### start build ### */
extern WORD CALLBACK PRTDRV_CallTo16_word_ww(FARPROC16,WORD,WORD);
/* ### stop build ### */
/**********************************************************************
* call_abort_proc16
@ -229,7 +226,16 @@ static BOOL CALLBACK call_abort_proc16( HDC hdc, INT code )
if (!dc) return FALSE;
proc16 = dc->pAbortProc16;
GDI_ReleaseObj( hdc );
if (proc16) return PRTDRV_CallTo16_word_ww( (FARPROC16)proc16, HDC_16(hdc), code );
if (proc16)
{
WORD args[2];
DWORD ret;
args[1] = HDC_16(hdc);
args[0] = code;
WOWCallback16Ex( (DWORD)proc16, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret);
}
return TRUE;
}

View File

@ -2,7 +2,6 @@ Makefile
comm.spec.c
kernel.res
kernel32.dll.dbg.c
kernel32.dll.glue.c
kernel32.spec.c
kernel32.spec.def
krnl386.exe.spec.c

View File

@ -41,8 +41,6 @@ RC_SRCS16 = \
MC_SRCS = \
messages/winerr_enu.mc
EXTRA_OBJS = $(MODULE).glue.o
SUBDIRS = tests
EXTRASUBDIRS = messages nls

View File

@ -20,6 +20,7 @@
#include "wine/winbase16.h"
#include "winternl.h"
#include "wownt32.h"
#include "module.h"
#include "wine/debug.h"
@ -73,9 +74,6 @@ BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
VOID WINAPI UTUnRegister( HMODULE hModule );
/* ### start build ### */
extern LONG CALLBACK UTTHUNK_CallTo16_long_ll(FARPROC16,LONG,LONG);
/* ### stop build ### */
/****************************************************************************
* UTGlue16 (KERNEL.666) (KERNEL Wine-specific export)
@ -108,6 +106,7 @@ static DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefin
SEGPTR segBuff, *segptrList = NULL;
INT i, nList = 0;
DWORD retv;
WORD args[4];
/* Convert arguments to SEGPTRs */
@ -133,7 +132,11 @@ static DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefin
/* Call 16-bit routine */
retv = UTTHUNK_CallTo16_long_ll( target, segBuff, dwUserDefined );
args[3] = SELECTOROF(segBuff);
args[2] = OFFSETOF(segBuff);
args[1] = HIWORD(dwUserDefined);
args[0] = LOWORD(dwUserDefined);
WOWCallback16Ex( (DWORD)target, WCB16_PASCAL, sizeof(args), args, &retv );
/* Free temporary selectors */
@ -264,16 +267,21 @@ BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
{
SEGPTR callback = MapLS( &ut->ut16 );
SEGPTR segBuff = MapLS( lpBuff );
WORD args[4];
DWORD ret;
if ( !UTTHUNK_CallTo16_long_ll( init16, callback, segBuff ) )
{
args[3] = SELECTOROF(callback);
args[2] = OFFSETOF(callback);
args[1] = SELECTOROF(segBuff);
args[0] = OFFSETOF(segBuff);
WOWCallback16Ex( (DWORD)init16, WCB16_PASCAL, sizeof(args), args, &ret );
UnMapLS( segBuff );
UnMapLS( callback );
if (!ret)
{
UTUnRegister( hModule );
return FALSE;
}
UnMapLS( segBuff );
UnMapLS( callback );
}
/* Return 32-bit thunk */

View File

@ -1,6 +1,5 @@
Makefile
msvfw32.dll.dbg.c
msvfw32.dll.glue.c
msvfw32.spec.c
msvfw32.spec.def
msvideo.spec.c

View File

@ -17,8 +17,6 @@ C_SRCS = \
C_SRCS16 = \
msvideo16.c
EXTRA_OBJS16 = $(MODULE).glue.o
@MAKE_DLL_RULES@
### Dependencies:

View File

@ -31,9 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvideo);
/* ### start build ### */
extern LONG CALLBACK MSVIDEO_CallTo16_long_lwwll(FARPROC16, LONG, WORD, WORD, LONG, LONG);
/* ### stop build ### */
/***********************************************************************
* DrawDibOpen [MSVIDEO.102]
@ -682,6 +679,7 @@ static LRESULT CALLBACK IC_Callback3216(HIC hic, HDRVR hdrv, UINT msg, DWORD l
{
WINE_HIC* whic;
LRESULT ret = 0;
WORD args[8];
whic = MSVIDEO_GetHicPtr(hic);
if (whic)
@ -692,9 +690,16 @@ static LRESULT CALLBACK IC_Callback3216(HIC hic, HDRVR hdrv, UINT msg, DWORD l
lp2 = (DWORD)MapLS((void*)lp2);
break;
}
args[7] = HIWORD(hic);
args[6] = LOWORD(hic);
args[5] = HDRVR_16(whic->hdrv);
args[4] = msg;
args[3] = HIWORD(lp1);
args[2] = LOWORD(lp1);
args[1] = HIWORD(lp2);
args[0] = LOWORD(lp2);
WOWCallback16Ex( (DWORD)whic->driverproc16, WCB16_PASCAL, sizeof(args), args, &ret );
ret = MSVIDEO_CallTo16_long_lwwll((FARPROC16)whic->driverproc16,
HIC_16(hic), HDRVR_16(whic->hdrv), msg, lp1, lp2);
switch (msg)
{
case DRV_OPEN:
@ -732,8 +737,19 @@ LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lPara
/* we've got a 16 bit driver proc... call it directly */
if (whic->driverproc16)
{
ret = MSVIDEO_CallTo16_long_lwwll((FARPROC16)whic->driverproc16,
(LONG)whic->hdrv, HIC_16(hic), msg, lParam1, lParam2);
WORD args[8];
/* FIXME: original code was passing hdrv first and hic second */
/* but this doesn't match what IC_Callback3216 does */
args[7] = HIWORD(hic);
args[6] = LOWORD(hic);
args[5] = HDRVR_16(whic->hdrv);
args[4] = msg;
args[3] = HIWORD(lParam1);
args[2] = LOWORD(lParam1);
args[1] = HIWORD(lParam2);
args[0] = LOWORD(lParam2);
WOWCallback16Ex( (DWORD)whic->driverproc16, WCB16_PASCAL, sizeof(args), args, &ret );
}
else
{

View File

@ -1,6 +1,5 @@
Makefile
setupapi.dll.dbg.c
setupapi.dll.glue.c
setupapi.res
setupapi.spec.c
setupapi.spec.def

View File

@ -24,8 +24,6 @@ C_SRCS = \
RC_SRCS= setupapi.rc
EXTRA_OBJS = $(MODULE).glue.o
@MAKE_DLL_RULES@
### Dependencies:

View File

@ -25,6 +25,7 @@
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "wownt32.h"
#include "setupapi.h"
#include "setupx16.h"
#include "setupapi_private.h"
@ -32,23 +33,34 @@
WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
/* ### start build ### */
extern WORD CALLBACK VCP_CallTo16_word_lwwll(FARPROC16,LPVOID,UINT16,WPARAM,LPARAM,LPARAM);
/* ### stop build ### */
static FARPROC16 VCP_Proc = NULL;
static LPARAM VCP_MsgRef = 0;
#define VCP_CALLBACK(obj,msg,wParam,lParam,lParamRef) \
(VCP_Proc) ? \
VCP_CallTo16_word_lwwll(VCP_Proc, obj,msg,wParam,lParam,lParamRef) : OK;
static BOOL VCP_opened = FALSE;
static VCPSTATUS vcp_status;
static HINSTANCE SETUPAPI_hInstance;
static WORD VCP_Callback( LPVOID obj, UINT16 msg, WPARAM16 wParam, LPARAM lParam, LPARAM lParamRef )
{
WORD args[8];
DWORD ret = OK;
if (VCP_Proc)
{
args[7] = HIWORD(obj);
args[6] = LOWORD(obj);
args[5] = msg;
args[4] = wParam;
args[3] = HIWORD(lParam);
args[2] = LOWORD(lParam);
args[1] = HIWORD(lParamRef);
args[0] = LOWORD(lParamRef);
WOWCallback16Ex( (DWORD)VCP_Proc, WCB16_PASCAL, sizeof(args), args, &ret );
}
return (WORD)ret;
}
/****************************** VHSTR management ******************************/
/*
@ -234,9 +246,9 @@ RETERR16 VCP_VirtnodeCreate(LPVCPFILESPEC vfsSrc, LPVCPFILESPEC vfsDst, WORD fl,
lpvn->vhstrDstFinalName = 0xffff; /* FIXME: what is this ? */
cbres = VCP_CALLBACK(lpvn, VCPM_NODECREATE, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(lpvn, VCPM_NODECREATE, 0, 0, VCP_MsgRef);
lpvn->fl |= VFNL_CREATED;
cbres = VCP_CALLBACK(lpvn, VCPM_NODEACCEPT, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(lpvn, VCPM_NODEACCEPT, 0, 0, VCP_MsgRef);
return OK;
}
@ -250,7 +262,7 @@ BOOL VCP_VirtnodeDelete(LPVIRTNODE lpvnDel)
{
if (pvnlist[n] == lpvnDel)
{
cbres = VCP_CALLBACK(lpvnDel, VCPM_NODEDESTROY, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(lpvnDel, VCPM_NODEDESTROY, 0, 0, VCP_MsgRef);
HeapFree(GetProcessHeap(), 0, lpvnDel);
pvnlist[n] = NULL;
return TRUE;
@ -433,15 +445,15 @@ RETERR16 VCP_CheckPaths(void)
LPVIRTNODE lpvn;
RETERR16 cbres;
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATPATHCHECKSTART, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATPATHCHECKSTART, 0, 0, VCP_MsgRef);
for (n = 0; n < vn_num; n++)
{
lpvn = pvnlist[n];
if (!lpvn) continue;
/* FIXME: check paths of all VIRTNODEs here ! */
cbres = VCP_CALLBACK(&lpvn->vfsDst, VCPM_CHECKPATH, 0, (DWORD)lpvn, VCP_MsgRef);
cbres = VCP_Callback(&lpvn->vfsDst, VCPM_CHECKPATH, 0, (DWORD)lpvn, VCP_MsgRef);
}
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATPATHCHECKEND, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATPATHCHECKEND, 0, 0, VCP_MsgRef);
return OK;
}
@ -452,7 +464,7 @@ RETERR16 VCP_CopyFiles(void)
DWORD n;
LPVIRTNODE lpvn;
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATCOPYSTART, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATCOPYSTART, 0, 0, VCP_MsgRef);
for (n = 0; n < vn_num; n++)
{
lpvn = pvnlist[n];
@ -462,7 +474,7 @@ RETERR16 VCP_CopyFiles(void)
strcpy(fn_dst, VcpExplain16(lpvn, VCPEX_DST_FULL));
/* FIXME: what is this VCPM_VSTATWRITE here for ?
* I guess it's to signal successful destination file creation */
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATWRITE, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATWRITE, 0, 0, VCP_MsgRef);
/* FIXME: need to do the file copy in small chunks for notifications */
TRACE("copying '%s' to '%s'\n", fn_src, fn_dst);
@ -475,12 +487,12 @@ RETERR16 VCP_CopyFiles(void)
}
vcp_status.prgFileRead.dwSoFar++;
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATREAD, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATREAD, 0, 0, VCP_MsgRef);
vcp_status.prgFileWrite.dwSoFar++;
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATWRITE, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATWRITE, 0, 0, VCP_MsgRef);
}
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATCOPYEND, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATCOPYEND, 0, 0, VCP_MsgRef);
return res;
}
@ -511,13 +523,13 @@ RETERR16 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest)
TRACE("(%04x, '%s')\n", fl, lpszBackupDest);
/* FIXME: needs to sort virtnodes in case VCPFL_INSPECIFIEDORDER
* is not set. This is done by VCP_CALLBACK(VCPM_NODECOMPARE) */
* is not set. This is done by VCP_Callback(VCPM_NODECOMPARE) */
TRACE("#1\n");
memset(&vcp_status, 0, sizeof(VCPSTATUS));
/* yes, vcp_status.cbSize is 0 ! */
TRACE("#2\n");
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATCLOSESTART, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATCLOSESTART, 0, 0, VCP_MsgRef);
TRACE("#3\n");
res = VCP_CheckPaths();
@ -527,7 +539,7 @@ RETERR16 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest)
VCP_CopyFiles();
TRACE("#5\n");
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATCLOSEEND, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATCLOSEEND, 0, 0, VCP_MsgRef);
TRACE("#6\n");
VCP_Proc = NULL;
FreeLibrary(SETUPAPI_hInstance);
@ -542,20 +554,20 @@ RETERR16 VCP_RenameFiles(void)
DWORD n;
LPVIRTNODE lpvn;
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATRENAMESTART, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATRENAMESTART, 0, 0, VCP_MsgRef);
for (n = 0; n < vn_num; n++)
{
lpvn = pvnlist[n];
if ((!lpvn) || ((lpvn->fl & VNFL_NODE_TYPE) != VNFL_RENAME)) continue;
strcpy(fn_src, VcpExplain16(lpvn, VCPEX_SRC_FULL));
strcpy(fn_dst, VcpExplain16(lpvn, VCPEX_DST_FULL));
cbres = VCP_CALLBACK(&lpvn->vfsDst, VCPM_FILEOPENOUT, 0, (LPARAM)lpvn, VCP_MsgRef);
cbres = VCP_Callback(&lpvn->vfsDst, VCPM_FILEOPENOUT, 0, (LPARAM)lpvn, VCP_MsgRef);
if (!(MoveFileExA(fn_src, fn_dst, MOVEFILE_REPLACE_EXISTING)))
res = ERR_VCP_IOFAIL;
else
VCP_VirtnodeDelete(lpvn);
}
cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATRENAMEEND, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_VSTATRENAMEEND, 0, 0, VCP_MsgRef);
return res;
}
@ -744,7 +756,7 @@ RETERR16 WINAPI vcpUICallbackProc16(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam,
case VCPM_VSTATREAD:
break;
case VCPM_VSTATWRITE:
cbres = VCP_CALLBACK(&vcp_status, VCPM_DISKPREPINFO, 0, 0, VCP_MsgRef);
cbres = VCP_Callback(&vcp_status, VCPM_DISKPREPINFO, 0, 0, VCP_MsgRef);
break;
case VCPM_VSTATCLOSEEND:
RegCloseKey(hKeyFiles);

View File

@ -5,6 +5,5 @@ keyboard.spec.c
mouse.spec.c
user.exe.spec.c
user32.dll.dbg.c
user32.dll.glue.c
user32.spec.c
user32.spec.def

View File

@ -92,8 +92,6 @@ RC_SRCS16 = \
SUBDIRS = tests
EXTRA_OBJS = $(MODULE).glue.o
EXTRASUBDIRS = \
$(TOPOBJDIR)/controls \
$(TOPOBJDIR)/windows \

View File

@ -29,6 +29,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "wownt32.h"
#include "dde.h"
#include "ddeml.h"
#include "dde/dde_private.h"
@ -88,9 +89,6 @@ static void map3216_conv_context(CONVCONTEXT16* cc16, const CONVCONTEXT* cc32)
cc16->dwSecurity = cc32->dwSecurity;
}
/* ### start build ### */
extern LONG CALLBACK WDML_CallTo16_long_llllllll(FARPROC16,LONG,LONG,LONG,LONG,LONG,LONG,LONG,LONG);
/* ### stop build ### */
/******************************************************************
* WDML_InvokeCallback16
@ -104,6 +102,7 @@ HDDEDATA WDML_InvokeCallback16(PFNCALLBACK pfn, UINT uType, UINT uFmt,
DWORD d1 = 0;
HDDEDATA ret;
CONVCONTEXT16 cc16;
WORD args[16];
switch (uType)
{
@ -120,8 +119,24 @@ HDDEDATA WDML_InvokeCallback16(PFNCALLBACK pfn, UINT uType, UINT uFmt,
d1 = dwData1;
break;
}
ret = (HDDEDATA)WDML_CallTo16_long_llllllll((FARPROC16)pfn, uType, uFmt, (LONG)hConv,
(LONG)hsz1, (LONG)hsz2, (LONG)hdata, d1, dwData2);
args[15] = HIWORD(uType);
args[14] = LOWORD(uType);
args[13] = HIWORD(uFmt);
args[12] = LOWORD(uFmt);
args[11] = HIWORD(hConv);
args[10] = LOWORD(hConv);
args[9] = HIWORD(hsz1);
args[8] = LOWORD(hsz1);
args[7] = HIWORD(hsz2);
args[6] = LOWORD(hsz2);
args[5] = HIWORD(hdata);
args[4] = LOWORD(hdata);
args[3] = HIWORD(d1);
args[2] = LOWORD(d1);
args[1] = HIWORD(dwData2);
args[0] = LOWORD(dwData2);
WOWCallback16Ex( (DWORD)pfn, WCB16_PASCAL, sizeof(args), args, (DWORD *)&ret );
switch (uType)
{
case XTYP_CONNECT:

View File

@ -71,10 +71,6 @@ struct hook16_queue_info
};
/* ### start build ### */
extern LONG CALLBACK HOOK_CallTo16_long_wwl(HOOKPROC16,WORD,WORD,LONG);
/* ### stop build ### */
/***********************************************************************
* map_msg_16_to_32
@ -112,10 +108,17 @@ inline static void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 )
static LRESULT call_hook_16( INT id, INT code, WPARAM wp, LPARAM lp )
{
struct hook16_queue_info *info = QUEUE_Current()->hook16_info;
WORD args[4];
LRESULT ret;
INT prev_id = info->id;
info->id = id;
ret = HOOK_CallTo16_long_wwl( info->proc[id - WH_MINHOOK], code, wp, lp );
args[3] = code;
args[2] = wp;
args[1] = HIWORD(lp);
args[0] = LOWORD(lp);
WOWCallback16Ex( (DWORD)info->proc[id - WH_MINHOOK], WCB16_PASCAL, sizeof(args), args, &ret );
info->id = prev_id;
/* Grrr. While the hook procedure is supposed to have an LRESULT return

View File

@ -30,9 +30,6 @@
/* size of buffer needed to store an atom string */
#define ATOM_BUFFER_SIZE 256
/* ### start build ### */
extern WORD CALLBACK PROP_CallTo16_word_wlw(PROPENUMPROC16,WORD,LONG,WORD);
/* ### stop build ### */
/***********************************************************************
* get_properties
@ -306,16 +303,28 @@ INT16 WINAPI EnumProps16( HWND16 hwnd, PROPENUMPROC16 func )
{
char string[ATOM_BUFFER_SIZE];
SEGPTR segptr = MapLS( string );
WORD args[4];
DWORD result;
for (i = 0; i < count; i++)
{
if (list[i].string) /* it was a string originally */
{
if (!GlobalGetAtomNameA( list[i].atom, string, ATOM_BUFFER_SIZE )) continue;
ret = PROP_CallTo16_word_wlw( func, hwnd, segptr, LOWORD(list[i].handle) );
args[3] = hwnd;
args[2] = SELECTOROF(segptr);
args[1] = OFFSETOF(segptr);
args[0] = LOWORD(list[i].handle);
}
else
ret = PROP_CallTo16_word_wlw( func, hwnd, list[i].atom, LOWORD(list[i].handle) );
if (!ret) break;
{
args[3] = hwnd;
args[2] = 0;
args[1] = list[i].atom;
args[0] = LOWORD(list[i].handle);
}
WOWCallback16Ex( (DWORD)func, WCB16_PASCAL, sizeof(args), args, &result );
if (!(ret = LOWORD(result))) break;
}
UnMapLS( segptr );
HeapFree( GetProcessHeap(), 0, list );

View File

@ -38,10 +38,6 @@
WORD WINAPI DestroyIcon32(HGLOBAL16, UINT16);
/* ### start build ### */
extern WORD CALLBACK USER_CallTo16_word_wlw(GRAYSTRINGPROC16,WORD,LONG,WORD);
/* ### stop build ### */
struct gray_string_info
{
GRAYSTRINGPROC16 proc;
@ -53,7 +49,15 @@ struct gray_string_info
static BOOL CALLBACK gray_string_callback( HDC hdc, LPARAM param, INT len )
{
const struct gray_string_info *info = (struct gray_string_info *)param;
return USER_CallTo16_word_wlw( info->proc, HDC_16(hdc), info->param, len );
WORD args[4];
DWORD ret;
args[3] = HDC_16(hdc);
args[2] = HIWORD(info->param);
args[1] = LOWORD(info->param);
args[0] = len;
WOWCallback16Ex( (DWORD)info->proc, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret);
}
/* callback for 16-bit gray string proc with string pointer */
@ -63,7 +67,30 @@ static BOOL CALLBACK gray_string_callback_ptr( HDC hdc, LPARAM param, INT len )
char *str = (char *)param;
info = (struct gray_string_info *)(str - offsetof( struct gray_string_info, str ));
return USER_CallTo16_word_wlw( info->proc, HDC_16(hdc), info->param, len );
return gray_string_callback( hdc, (LPARAM)info, len );
}
struct draw_state_info
{
DRAWSTATEPROC16 proc;
LPARAM param;
};
/* callback for 16-bit DrawState functions */
static BOOL CALLBACK draw_state_callback( HDC hdc, LPARAM lparam, WPARAM wparam, int cx, int cy )
{
const struct draw_state_info *info = (struct draw_state_info *)lparam;
WORD args[6];
DWORD ret;
args[5] = HDC_16(hdc);
args[4] = HIWORD(info->param);
args[3] = LOWORD(info->param);
args[2] = wparam;
args[1] = cx;
args[0] = cy;
WOWCallback16Ex( (DWORD)info->proc, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret);
}
/***********************************************************************
@ -626,6 +653,34 @@ BOOL16 WINAPI InsertMenuItem16( HMENU16 hmenu, UINT16 pos, BOOL16 byposition,
}
/**********************************************************************
* DrawState (USER.449)
*/
BOOL16 WINAPI DrawState16( HDC16 hdc, HBRUSH16 hbr, DRAWSTATEPROC16 func, LPARAM ldata,
WPARAM16 wdata, INT16 x, INT16 y, INT16 cx, INT16 cy, UINT16 flags )
{
struct draw_state_info info;
UINT opcode = flags & 0xf;
if (opcode == DST_TEXT || opcode == DST_PREFIXTEXT)
{
/* make sure DrawStateA doesn't try to use ldata as a pointer */
if (!wdata) wdata = strlen( MapSL(ldata) );
if (!cx || !cy)
{
SIZE s;
if (!GetTextExtentPoint32A( HDC_32(hdc), MapSL(ldata), wdata, &s )) return FALSE;
if (!cx) cx = s.cx;
if (!cy) cy = s.cy;
}
}
info.proc = func;
info.param = ldata;
return DrawStateA( HDC_32(hdc), HBRUSH_32(hbr), draw_state_callback,
(LPARAM)&info, wdata, x, y, cx, cy, flags );
}
/**********************************************************************
* CreateIconFromResourceEx (USER.450)
*

View File

@ -30,10 +30,6 @@
static HWND16 hwndSysModal;
/* ### start build ### */
extern WORD CALLBACK WIN_CallTo16_word_wl(WNDENUMPROC16,WORD,LONG);
/* ### stop build ### */
struct wnd_enum_info
{
WNDENUMPROC16 proc;
@ -44,7 +40,14 @@ struct wnd_enum_info
static BOOL CALLBACK wnd_enum_callback( HWND hwnd, LPARAM param )
{
const struct wnd_enum_info *info = (struct wnd_enum_info *)param;
return WIN_CallTo16_word_wl( info->proc, HWND_16(hwnd), info->param );
WORD args[3];
DWORD ret;
args[2] = HWND_16(hwnd);
args[1] = HIWORD(info->param);
args[0] = LOWORD(info->param);
WOWCallback16Ex( (DWORD)info->proc, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret);
}
/* convert insert after window handle to 32-bit */

View File

@ -1,6 +1,5 @@
Makefile
winaspi.spec.c
wnaspi32.dll.dbg.c
wnaspi32.dll.glue.c
wnaspi32.spec.c
wnaspi32.spec.def

View File

@ -16,8 +16,6 @@ C_SRCS = \
C_SRCS16 = \
winaspi16.c
EXTRA_OBJS16 = $(MODULE).glue.o
@MAKE_DLL_RULES@
### Dependencies:

View File

@ -33,6 +33,7 @@
#include "winbase.h"
#include "wine/windef16.h"
#include "winreg.h"
#include "wownt32.h"
#include "aspi.h"
#include "winescsi.h"
#include "wine/winaspi.h"
@ -48,10 +49,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(aspi);
* 3) Only linux supported so far
*/
/* ### start build ### */
extern LONG CALLBACK ASPI_CallTo16_long_l(FARPROC16,SEGPTR);
/* ### stop build ### */
#ifdef linux
static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
@ -381,12 +378,12 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode)
{
SEGPTR spPRB = MapLS(lpPRB);
ASPI_CallTo16_long_l(lpPRB->SRB_PostProc, spPRB);
WOWCallback16((DWORD)lpPRB->SRB_PostProc, spPRB);
UnMapLS(spPRB);
break;
}
case ASPI_WIN16:
ASPI_CallTo16_long_l(lpPRB->SRB_PostProc, ptrPRB);
WOWCallback16((DWORD)lpPRB->SRB_PostProc, ptrPRB);
break;
}
}
@ -449,7 +446,7 @@ DWORD ASPI_SendASPICommand(DWORD ptrSRB, UINT16 mode)
if (ASPIChainFunc)
{
/* This is not the post proc, it's the chain proc this time */
DWORD ret = ASPI_CallTo16_long_l(ASPIChainFunc, ptrSRB);
DWORD ret = WOWCallback16((DWORD)ASPIChainFunc, ptrSRB);
if (ret)
{
lpSRB->inquiry.SRB_Status = SS_INVALID_SRB;
@ -545,4 +542,3 @@ DWORD WINAPI GetASPIDLLVersion16()
return 0;
#endif
}

View File

@ -2,7 +2,6 @@ Makefile
mmsystem.spec.c
sound.spec.c
winmm.dll.dbg.c
winmm.dll.glue.c
winmm.spec.c
winmm.spec.def
winmm_res.res

View File

@ -27,8 +27,6 @@ C_SRCS16 = \
RC_SRCS = winmm_res.rc
EXTRA_OBJS16 = $(MODULE).glue.o
SUBDIRS = tests
@MAKE_DLL_RULES@

View File

@ -26,16 +26,13 @@
#include "wine/winbase16.h"
#include "winreg.h"
#include "winver.h"
#include "wownt32.h"
#include "winemm.h"
#include "digitalv.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(winmm);
/* ### start build ### */
extern WORD CALLBACK MMDRV_CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LONG);
/* ### stop build ### */
/**************************************************************************
* MMDRV_Callback [internal]
*/
@ -44,11 +41,21 @@ static void MMDRV_Callback(LPWINE_MLD mld, HDRVR hDev, UINT uMsg, DWORD dwParam
TRACE("CB (*%08lx)(%p %08x %08lx %08lx %08lx\n",
mld->dwCallback, hDev, uMsg, mld->dwClientInstance, dwParam1, dwParam2);
if (!mld->bFrom32 && (mld->dwFlags & DCB_TYPEMASK) == DCB_FUNCTION) {
if (!mld->bFrom32 && (mld->dwFlags & DCB_TYPEMASK) == DCB_FUNCTION)
{
WORD args[8];
/* 16 bit func, call it */
TRACE("Function (16 bit) !\n");
MMDRV_CallTo16_word_wwlll((FARPROC16)mld->dwCallback, HDRVR_16(hDev), uMsg,
mld->dwClientInstance, dwParam1, dwParam2);
args[7] = HDRVR_16(hDev);
args[6] = uMsg;
args[5] = HIWORD(mld->dwClientInstance);
args[4] = LOWORD(mld->dwClientInstance);
args[3] = HIWORD(dwParam1);
args[2] = LOWORD(dwParam1);
args[1] = HIWORD(dwParam2);
args[0] = LOWORD(dwParam2);
WOWCallback16Ex( mld->dwCallback, WCB16_PASCAL, sizeof(args), args, NULL );
} else {
DriverCallback(mld->dwCallback, mld->dwFlags, hDev, uMsg,
mld->dwClientInstance, dwParam1, dwParam2);
@ -1729,7 +1736,19 @@ static void CALLBACK MMDRV_WaveOut_Callback(HDRVR hDev, UINT uMsg, DWORD dwInst
static LRESULT MMDRV_CallMMDrvFunc16(FARPROC16 fp16, WORD dev, WORD msg, LONG instance,
LONG lp1, LONG lp2)
{
return MMDRV_CallTo16_word_wwlll(fp16, dev, msg, instance, lp1, lp2);
WORD args[8];
DWORD ret;
args[7] = dev;
args[6] = msg;
args[5] = HIWORD(instance);
args[4] = LOWORD(instance);
args[3] = HIWORD(lp1);
args[2] = LOWORD(lp1);
args[1] = HIWORD(lp2);
args[0] = LOWORD(lp2);
WOWCallback16Ex( (DWORD)fp16, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret);
}
/**************************************************************************

View File

@ -37,6 +37,7 @@
#include "mmsystem.h"
#include "winbase.h"
#include "winternl.h"
#include "wownt32.h"
#include "wine/winuser16.h"
#include "winemm.h"
@ -46,11 +47,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(mmsys);
/* ### start build ### */
extern LONG CALLBACK MMSYSTEM_CallTo16_long_l (FARPROC16,LONG);
extern LONG CALLBACK MMSYSTEM_CallTo16_long_lwll (LPMMIOPROC16,LONG,WORD,LONG,LONG);
/* ### stop build ### */
static WINE_MMTHREAD* WINMM_GetmmThread(HANDLE16);
static LPWINE_DRIVER DRIVER_OpenDriver16(LPCSTR, LPCSTR, LPARAM);
static LRESULT DRIVER_CloseDriver16(HDRVR16, LPARAM, LPARAM);
@ -2115,7 +2111,7 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt)
TRACE("[20-%p]\n", lpMMThd->hThread);
lpMMThd->dwStatus = 0x20;
if (lpMMThd->fpThread) {
MMSYSTEM_CallTo16_long_l(lpMMThd->fpThread, lpMMThd->dwThreadPmt);
WOWCallback16((DWORD)lpMMThd->fpThread, lpMMThd->dwThreadPmt);
}
lpMMThd->dwStatus = 0x30;
TRACE("[30-%p]\n", lpMMThd->hThread);
@ -2644,6 +2640,7 @@ static LRESULT MMIO_Callback16(SEGPTR cb16, LPMMIOINFO lpmmioinfo, UINT uMessage
MMIOINFO16 mmioInfo16;
SEGPTR segmmioInfo16;
LPARAM lp1 = lParam1, lp2 = lParam2;
WORD args[7];
memset(&mmioInfo16, 0, sizeof(MMIOINFO16));
mmioInfo16.lDiskOffset = lpmmioinfo->lDiskOffset;
@ -2656,8 +2653,14 @@ static LRESULT MMIO_Callback16(SEGPTR cb16, LPMMIOINFO lpmmioinfo, UINT uMessage
return result;
segmmioInfo16 = MapLS(&mmioInfo16);
result = MMSYSTEM_CallTo16_long_lwll((LPMMIOPROC16)cb16, segmmioInfo16, uMessage, lp1, lp2);
args[6] = HIWORD(segmmioInfo16);
args[5] = LOWORD(segmmioInfo16);
args[4] = uMessage;
args[3] = HIWORD(lp1);
args[2] = LOWORD(lp1);
args[1] = HIWORD(lp2);
args[0] = LOWORD(lp2);
WOWCallback16Ex( cb16, WCB16_PASCAL, sizeof(args), args, &result );
UnMapLS(segmmioInfo16);
MMIO_UnMap32To16(uMessage, lParam1, lParam2, lp1, lp2);

View File

@ -63,8 +63,12 @@ WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
/* under Wine use the kernel functions directly so we don't have to import wow32 */
HANDLE WINAPI K32WOWHandle32(WORD,WOW_HANDLE_TYPE);
WORD WINAPI K32WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
DWORD WINAPI K32WOWCallback16(DWORD,DWORD);
BOOL WINAPI K32WOWCallback16Ex(DWORD,DWORD,DWORD,LPVOID,LPDWORD);
#define WOWHandle32 K32WOWHandle32
#define WOWHandle16 K32WOWHandle16
#define WOWCallback16 K32WOWCallback16
#define WOWCallback16Ex K32WOWCallback16Ex
#endif
#ifdef __WINESRC__

View File

@ -33,10 +33,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(dc);
/* ### start build ### */
extern WORD CALLBACK GDI_CallTo16_word_wwll(FARPROC16,WORD,WORD,LONG,LONG);
/* ### stop build ### */
static BOOL DC_DeleteObject( HGDIOBJ handle, void *obj );
static const struct gdi_obj_funcs dc_funcs =
@ -1147,14 +1143,24 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD dwHookData )
/* relay function to call the 16-bit DC hook proc */
static BOOL16 WINAPI call_dc_hook16( HDC16 hdc16, WORD code, DWORD data, LPARAM lParam )
{
WORD args[6];
DWORD ret;
FARPROC16 proc = NULL;
HDC hdc = HDC_32( hdc16 );
DC *dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
proc = dc->hookProc;
GDI_ReleaseObj( hdc );
if (!proc) return FALSE;
return GDI_CallTo16_word_wwll( proc, hdc16, code, data, lParam );
args[5] = hdc16;
args[4] = code;
args[3] = HIWORD(data);
args[2] = LOWORD(data);
args[1] = HIWORD(lParam);
args[0] = LOWORD(lParam);
WOWCallback16Ex( (DWORD)proc, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret);
}
/***********************************************************************

View File

@ -132,10 +132,6 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = {
{ SYMBOL_CHARSET, CP_SYMBOL, FS(31)},
};
/* ### start build ### */
extern WORD CALLBACK FONT_CallTo16_word_llwl(FONTENUMPROC16,LONG,LONG,WORD,LONG);
/* ### stop build ### */
/***********************************************************************
* LOGFONT conversion functions.
*/
@ -522,13 +518,24 @@ static INT FONT_EnumInstance16( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm,
if( pfe->lpLogFontParam->lfCharSet == DEFAULT_CHARSET ||
pfe->lpLogFontParam->lfCharSet == plf->elfLogFont.lfCharSet )
{
WORD args[7];
DWORD result;
FONT_EnumLogFontExWTo16(plf, pfe->lpLogFont);
FONT_NewTextMetricExWTo16(ptm, pfe->lpTextMetric);
pfe->dwFlags |= ENUM_CALLED;
GDI_ReleaseObj( pfe->hdc ); /* release the GDI lock */
ret = FONT_CallTo16_word_llwl( pfe->lpEnumFunc, pfe->segLogFont, pfe->segTextMetric,
(UINT16)fType, (LPARAM)pfe->lpData );
args[6] = SELECTOROF(pfe->segLogFont);
args[5] = OFFSETOF(pfe->segLogFont);
args[4] = SELECTOROF(pfe->segTextMetric);
args[3] = OFFSETOF(pfe->segTextMetric);
args[2] = fType;
args[1] = HIWORD(pfe->lpData);
args[0] = LOWORD(pfe->lpData);
WOWCallback16Ex( (DWORD)pfe->lpEnumFunc, WCB16_PASCAL, sizeof(args), args, &result );
ret = LOWORD(result);
/* get the lock again and make sure the DC is still valid */
dc = DC_GetDCPtr( pfe->hdc );
if (!dc || dc != pfe->dc || dc->physDev != pfe->physDev)

View File

@ -75,9 +75,6 @@ typedef struct
#define MFHEADERSIZE (sizeof(METAHEADER))
#define MFVERSION 0x300
/* ### start build ### */
extern WORD CALLBACK MF_CallTo16_word_wllwl(MFENUMPROC16,WORD,LONG,LONG,WORD,LONG);
/* ### stop build ### */
/******************************************************************
* MF_AddHandle
@ -634,6 +631,7 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc16, HMETAFILE16 hmf,
HPEN hPen;
HBRUSH hBrush;
HFONT hFont;
WORD args[8];
BOOL16 result = TRUE, loaded = FALSE;
TRACE("(%p, %04x, %p, %08lx)\n", hdc, hmf, lpEnumFunc, lpData);
@ -661,20 +659,31 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc16, HMETAFILE16 hmf,
/* loop through metafile records */
args[7] = hdc16;
args[6] = SELECTOROF(spht);
args[5] = OFFSETOF(spht);
args[4] = seg + (HIWORD(offset) << __AHSHIFT);
args[3] = LOWORD(offset);
args[2] = mh->mtNoObjects;
args[1] = HIWORD(lpData);
args[0] = LOWORD(lpData);
while (offset < (mh->mtSize * 2))
{
DWORD ret;
mr = (METARECORD *)((char *)mh + offset);
if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc16, spht,
MAKESEGPTR( seg + (HIWORD(offset) << __AHSHIFT), LOWORD(offset) ),
mh->mtNoObjects, (LONG)lpData ))
WOWCallback16Ex( (DWORD)lpEnumFunc, WCB16_PASCAL, sizeof(args), args, &ret );
if (!LOWORD(ret))
{
result = FALSE;
break;
}
offset += (mr->rdSize * 2);
args[4] = seg + (HIWORD(offset) << __AHSHIFT);
args[3] = LOWORD(offset);
}
SelectObject(hdc, hBrush);

View File

@ -28,6 +28,7 @@
#include "wine/winbase16.h"
#include "wingdi.h"
#include "winuser.h"
#include "wownt32.h"
#include "mmddk.h"
#include "wine/mmsystem16.h"
#include "wine/debug.h"
@ -53,9 +54,6 @@ static LPWINE_DRIVER lpDrvItemList = NULL;
* problem as long as FreeLibrary is not working correctly)
*/
/* ### start build ### */
extern LONG CALLBACK DRIVER_CallTo16_long_lwwll(FARPROC16,LONG,WORD,WORD,LONG,LONG);
/* ### stop build ### */
/**************************************************************************
* LoadStartupDrivers [internal]
@ -120,10 +118,22 @@ static LPWINE_DRIVER DRIVER_FindFromHDrvr16(HDRVR16 hDrvr)
static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
LPARAM lParam1, LPARAM lParam2)
{
WORD args[8];
LRESULT ret;
TRACE("Before CallDriverProc proc=%p driverID=%08lx wMsg=%04x p1=%08lx p2=%08lx\n",
lpDrv->lpDrvProc, lpDrv->dwDriverID, msg, lParam1, lParam2);
return DRIVER_CallTo16_long_lwwll((FARPROC16)lpDrv->lpDrvProc, lpDrv->dwDriverID,
lpDrv->hDriver16, msg, lParam1, lParam2);
args[7] = HIWORD(lpDrv->dwDriverID);
args[6] = LOWORD(lpDrv->dwDriverID);
args[5] = lpDrv->hDriver16;
args[4] = msg;
args[3] = HIWORD(lParam1);
args[2] = LOWORD(lParam1);
args[1] = HIWORD(lParam2);
args[0] = LOWORD(lParam2);
WOWCallback16Ex( (DWORD)lpDrv->lpDrvProc, WCB16_PASCAL, sizeof(args), args, &ret );
return ret;
}
/**************************************************************************

View File

@ -60,23 +60,6 @@ WINE_DECLARE_DEBUG_CHANNEL(nonclient);
HPALETTE (WINAPI *pfnGDISelectPalette)(HDC hdc, HPALETTE hpal, WORD bkgnd ) = NULL;
UINT (WINAPI *pfnGDIRealizePalette)(HDC hdc) = NULL;
/* ### start build ### */
extern WORD CALLBACK PAINTING_CallTo16_word_wlwww(DRAWSTATEPROC16,WORD,LONG,WORD,WORD,WORD);
/* ### stop build ### */
struct draw_state_info
{
DRAWSTATEPROC16 proc;
LPARAM param;
};
/* callback for 16-bit DrawState functions */
static BOOL CALLBACK draw_state_callback( HDC hdc, LPARAM lparam, WPARAM wparam, int cx, int cy )
{
const struct draw_state_info *info = (struct draw_state_info *)lparam;
return PAINTING_CallTo16_word_wlwww( info->proc, HDC_16(hdc), info->param, wparam, cx, cy );
}
/***********************************************************************
* add_paint_count
@ -1409,34 +1392,6 @@ BOOL WINAPI DrawStateW(HDC hdc, HBRUSH hbr,
}
/**********************************************************************
* DrawState (USER.449)
*/
BOOL16 WINAPI DrawState16( HDC16 hdc, HBRUSH16 hbr, DRAWSTATEPROC16 func, LPARAM ldata,
WPARAM16 wdata, INT16 x, INT16 y, INT16 cx, INT16 cy, UINT16 flags )
{
struct draw_state_info info;
UINT opcode = flags & 0xf;
if (opcode == DST_TEXT || opcode == DST_PREFIXTEXT)
{
/* make sure DrawStateA doesn't try to use ldata as a pointer */
if (!wdata) wdata = strlen( MapSL(ldata) );
if (!cx || !cy)
{
SIZE s;
if (!GetTextExtentPoint32A( HDC_32(hdc), MapSL(ldata), wdata, &s )) return FALSE;
if (!cx) cx = s.cx;
if (!cy) cy = s.cy;
}
}
info.proc = func;
info.param = ldata;
return DrawStateA( HDC_32(hdc), HBRUSH_32(hbr), draw_state_callback,
(LPARAM)&info, wdata, x, y, cx, cy, flags );
}
/***********************************************************************
* SelectPalette (Not a Windows API)
*/