Commit 17216f56 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 971012

Sun Oct 12 15:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/builtin.c] [if1632/relay.c] Relay debugging entry points are now generated on the fly for Win32 DLLs. * [include/stackframe.h] Added VA_LIST16 type and macros to access arguments on the 16-bit stack. * [memory/global.c] Fixed GlobalHandle32 to work with fixed blocks. * [misc/ddeml.c] (New file) Added a lot of stubs for DDEML functions. * [objects/dc.c] Added Get/SetGraphicsMode(). * [objects/gdiobj.c] [windows/winpos.c] Added a few stubs. * [tools/build.c] Removed 'byte', 'word', 'long' and 'return' entry points for Win32. 'register' functions can no longer take arguments in Win32. The Win32 NE module is now generated by MODULE_CreateDummyModule. CallFrom32 callbacks removed except for register functions. Fri Oct 10 18:22:18 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/Makefile.in] [graphics/win16drv/brush.c] [graphics/win16drv/graphics.c] [graphics/win16drv/init.c] [graphics/win16drv/objects.c] [graphics/win16drv/pen.c] [graphics/win16drv/prtdrv.c] [graphics/win16drv/text.c] [include/callback.h] [include/win16drv.h] Added support for pens and brushes in SelectObject. Added support for LineTo, MoveToEx, PatBlt (very preliminary), Polygon and Rectangle. Text is drawn in the correct place more often. These changes may only work with the Windows Postscript driver since many other drivers now need more GDI support. Tue Oct 7 21:06:23 1997 Kristian Nielsen <kristian.nielsen@risoe.dk> * [debugger/expr.c] Fixed typo for the >> operator. * [loader/task.c] Fixed SwitchStackTo(); it used to return with the new stack placed four bytes too high in memory. * [loader/ne_resource.c] Removed problematic nametable code introduced in Wine 970914. Tue Oct 7 02:24:12 1997 Dimitrie O. Paun <dimi@cs.toronto.edu> * [controls/commctrl.c] Added this files to hold functions from the comctl32.dll Added to this files some functions scattered in different places (such as InitCommonControls) and added some new ones as well. * [include/syscolor.h] [windows/syscolor.c] Added proper entries for all possible COLOR_* values. * [objects/brush.c] Modified GetSysColorBrush to return the correct brush for all possible COLOR_* constants. Sat Oct 4 23:35:20 1997 U.Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [loader/module.c] [scheduler/process.c] [win32/environment.c] Another approach to get access to an unrestricted commandline. * [misc/crtdll.c] Make fclose work again. * [if1632/crtdll.spec] Use sprintf for crtdll-sprintf again as e.g. %g is not available for wsprintf. * [misc/wsprintf.c] Make WPR_STRING work in more situations. Added debug output for the wsprintf functions. * [misc/crtdll.c] [misc/main.c] Use argv[0] as comand with CRTDLL_system. Fri Oct 3 14:00:29 MET DST 1997 Jan Willamowius <jan@janhh.shnet.org> * [*/*] Removed some compiler warnings. * [msdos/int15.c] New INT 15 handler.
parent 3db94ef2
This is release 970928 of Wine, the MS Windows emulator. This is still a
This is release 971012 of Wine, the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work correctly.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry.
WHAT'S NEW with Wine-970928: (see ChangeLog for details)
- More relay code changes.
WHAT'S NEW with Wine-971012: (see ChangeLog for details)
- Improvements to printer driver support.
- More common controls functions.
- Win32 relay code changes.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -15,10 +17,10 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available
from the following locations:
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-970928.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970928.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970928.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-970928.tar.gz
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-971012.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-971012.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-971012.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-971012.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
----------------------------------------------------------------------
Sun Oct 12 15:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/builtin.c] [if1632/relay.c]
Relay debugging entry points are now generated on the fly for
Win32 DLLs.
* [include/stackframe.h]
Added VA_LIST16 type and macros to access arguments on the 16-bit
stack.
* [memory/global.c]
Fixed GlobalHandle32 to work with fixed blocks.
* [misc/ddeml.c] (New file)
Added a lot of stubs for DDEML functions.
* [objects/dc.c]
Added Get/SetGraphicsMode().
* [objects/gdiobj.c] [windows/winpos.c]
Added a few stubs.
* [tools/build.c]
Removed 'byte', 'word', 'long' and 'return' entry points for Win32.
'register' functions can no longer take arguments in Win32.
The Win32 NE module is now generated by MODULE_CreateDummyModule.
CallFrom32 callbacks removed except for register functions.
Fri Oct 10 18:22:18 1997 John Harvey <john@division.co.uk>
* [graphics/win16drv/Makefile.in] [graphics/win16drv/brush.c]
[graphics/win16drv/graphics.c] [graphics/win16drv/init.c]
[graphics/win16drv/objects.c] [graphics/win16drv/pen.c]
[graphics/win16drv/prtdrv.c] [graphics/win16drv/text.c]
[include/callback.h] [include/win16drv.h]
Added support for pens and brushes in SelectObject. Added support
for LineTo, MoveToEx, PatBlt (very preliminary), Polygon and
Rectangle. Text is drawn in the correct place more often. These
changes may only work with the Windows Postscript driver since
many other drivers now need more GDI support.
Tue Oct 7 21:06:23 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [debugger/expr.c]
Fixed typo for the >> operator.
* [loader/task.c]
Fixed SwitchStackTo(); it used to return with the new stack placed
four bytes too high in memory.
* [loader/ne_resource.c]
Removed problematic nametable code introduced in Wine 970914.
Tue Oct 7 02:24:12 1997 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [controls/commctrl.c]
Added this files to hold functions from the comctl32.dll
Added to this files some functions scattered in different places
(such as InitCommonControls) and added some new ones as well.
* [include/syscolor.h] [windows/syscolor.c]
Added proper entries for all possible COLOR_* values.
* [objects/brush.c]
Modified GetSysColorBrush to return the correct brush for
all possible COLOR_* constants.
Sat Oct 4 23:35:20 1997 U.Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [loader/module.c] [scheduler/process.c] [win32/environment.c]
Another approach to get access to an unrestricted commandline.
* [misc/crtdll.c]
Make fclose work again.
* [if1632/crtdll.spec]
Use sprintf for crtdll-sprintf again as e.g. %g is not available
for wsprintf.
* [misc/wsprintf.c]
Make WPR_STRING work in more situations.
Added debug output for the wsprintf functions.
* [misc/crtdll.c] [misc/main.c]
Use argv[0] as comand with CRTDLL_system.
Fri Oct 3 14:00:29 MET DST 1997 Jan Willamowius <jan@janhh.shnet.org>
* [*/*]
Removed some compiler warnings.
* [msdos/int15.c]
New INT 15 handler.
----------------------------------------------------------------------
Sat Sep 27 12:36:56 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/relay.c]
......
......@@ -74,18 +74,18 @@ OBJS = $(C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) \
$(CC) -c -o $*.o $<
.rc.c:
echo "#include \"windows.h\"" >winerctmp.c
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
cat $< >>winerctmp.c
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) $(RCFLAGS) -c -o $* -p $*
$(RM) winerctmp.c
echo "#include \"windows.h\"" >$*-tmp.c
echo WINDOWS_H_ENDS_HERE >>$*-tmp.c
cat $< >>$*-tmp.c
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P $*-tmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) $(RCFLAGS) -c -o $* -p $*
$(RM) $*-tmp.c
.rc.h:
echo "#include \"windows.h\"" >winerctmp.c
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
cat $< >>winerctmp.c
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) $(RCFLAGS) -c -o $* -p $*
$(RM) winerctmp.c
echo "#include \"windows.h\"" >$*-tmp.c
echo WINDOWS_H_ENDS_HERE >>$*-tmp.c
cat $< >>$*-tmp.c
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P $*-tmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) $(RCFLAGS) -c -o $* -p $*
$(RM) $*-tmp.c
# Rule to rebuild resource compiler
......@@ -115,7 +115,7 @@ depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
clean::
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc winerctmp.c y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.c) $(RC_SRCS:.rc=.h) $(PROGRAMS)
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc *-tmp.c y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.c) $(RC_SRCS:.rc=.h) $(PROGRAMS)
dummy:
......
......@@ -8,6 +8,7 @@ MODULE = controls
C_SRCS = \
button.c \
combo.c \
commctrl.c \
desktop.c \
edit.c \
icontitle.c \
......
/*
* Common controls functions
*
* Copyright 1997 Dimitrie O. Paun
*
*/
#include "win.h"
#include "heap.h"
#include "commctrl.h"
#include "progress.h"
#include "status.h"
#include "updown.h"
/* Win32 common controls */
static WNDCLASS32A WIDGETS_CommonControls32[] =
{
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, StatusWindowProc, 0,
sizeof(STATUSWINDOWINFO), 0, 0, 0, 0, 0, STATUSCLASSNAME32A },
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, UpDownWindowProc, 0,
sizeof(UPDOWN_INFO), 0, 0, 0, 0, 0, UPDOWN_CLASS32A },
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, ProgressWindowProc, 0,
sizeof(PROGRESS_INFO), 0, 0, 0, 0, 0, PROGRESS_CLASS32A }
};
#define NB_COMMON_CONTROLS32 \
(sizeof(WIDGETS_CommonControls32)/sizeof(WIDGETS_CommonControls32[0]))
/***********************************************************************
* DrawStatusText32A (COMCTL32.5)
*/
void WINAPI DrawStatusText32A( HDC32 hdc, LPRECT32 lprc, LPCSTR text,
UINT32 style )
{
RECT32 r = *lprc;
UINT32 border = BDR_SUNKENOUTER;
DrawEdge32(hdc, &r, BDR_RAISEDINNER, BF_RECT|BF_ADJUST|BF_FLAT);
if(style==SBT_POPOUT)
border = BDR_RAISEDOUTER;
else if(style==SBT_NOBORDERS)
border = 0;
DrawEdge32(hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
/* now draw text */
if (text) {
int oldbkmode = SetBkMode32(hdc, TRANSPARENT);
r.left += 3;
DrawText32A(hdc, text, lstrlen32A(text),
&r, DT_LEFT|DT_VCENTER|DT_SINGLELINE);
if (oldbkmode != TRANSPARENT)
SetBkMode32(hdc, oldbkmode);
}
}
/***********************************************************************
* DrawStatusText32W (COMCTL32.24)
*/
void WINAPI DrawStatusText32W( HDC32 hdc, LPRECT32 lprc, LPCWSTR text,
UINT32 style )
{
LPSTR p = HEAP_strdupWtoA( GetProcessHeap(), 0, text );
DrawStatusText32A(hdc, lprc, p, style);
HeapFree( GetProcessHeap(), 0, p );
}
/***********************************************************************
* DrawStatusText16 (COMCTL32.23)
*/
void WINAPI DrawStatusText16( HDC16 hdc, LPRECT16 lprc, LPCSTR text,
UINT16 style )
{
if(!lprc)
DrawStatusText32A((HDC32)hdc, 0, text, (UINT32)style);
else{
RECT32 rect32;
CONV_RECT16TO32( lprc, &rect32 );
DrawStatusText32A((HDC32)hdc, &rect32, text, (UINT32)style);
}
}
/***********************************************************************
* CreateStatusWindow32A (COMCTL32.6)
*/
HWND32 WINAPI CreateStatusWindow32A( INT32 style, LPCSTR text, HWND32 parent,
UINT32 wid )
{
return CreateWindow32A(STATUSCLASSNAME32A, text, style,
CW_USEDEFAULT32, CW_USEDEFAULT32,
CW_USEDEFAULT32, CW_USEDEFAULT32,
parent, wid, 0, 0);
}
/***********************************************************************
* CreateStatusWindow16 (COMCTL32.18)
*/
HWND16 WINAPI CreateStatusWindow16( INT16 style, LPCSTR text, HWND16 parent,
UINT16 wid )
{
return CreateWindow16(STATUSCLASSNAME16, text, style,
CW_USEDEFAULT16, CW_USEDEFAULT16,
CW_USEDEFAULT16, CW_USEDEFAULT16,
parent, wid, 0, 0);
}
/***********************************************************************
* CreateStatusWindow32W (COMCTL32.19)
*/
HWND32 WINAPI CreateStatusWindow32W( INT32 style, LPCWSTR text, HWND32 parent,
UINT32 wid )
{
return CreateWindow32W(STATUSCLASSNAME32W, text, style,
CW_USEDEFAULT32, CW_USEDEFAULT32,
CW_USEDEFAULT32, CW_USEDEFAULT32,
parent, wid, 0, 0);
}
/***********************************************************************
* CreateUpDownControl (COMCTL32.16)
*/
HWND32 WINAPI CreateUpDownControl( DWORD style, INT32 x, INT32 y,
INT32 cx, INT32 cy, HWND32 parent,
INT32 id, HINSTANCE32 inst, HWND32 buddy,
INT32 maxVal, INT32 minVal, INT32 curVal )
{
HWND32 hUD = CreateWindow32A(UPDOWN_CLASS32A, 0, style, x, y, cx, cy,
parent, id, inst, 0);
if(hUD){
SendMessage32A(hUD, UDM_SETBUDDY, buddy, 0);
SendMessage32A(hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
SendMessage32A(hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
}
return hUD;
}
/***********************************************************************
* InitCommonControls (COMCTL32.17)
*/
void WINAPI InitCommonControls(void)
{
int i;
char name[30];
const char *old_name;
WNDCLASS32A *class32 = WIDGETS_CommonControls32;
for (i = 0; i < NB_COMMON_CONTROLS32; i++, class32++)
{
/* Just to make sure the string is > 0x10000 */
old_name = class32->lpszClassName;
strcpy( name, (char *)class32->lpszClassName );
class32->lpszClassName = name;
class32->hCursor = LoadCursor16( 0, IDC_ARROW );
RegisterClass32A( class32 );
class32->lpszClassName = old_name;
}
}
......@@ -10,7 +10,6 @@
#include "status.h"
#include "commctrl.h"
#include "heap.h"
#include "syscolor.h"
#include "win.h"
/*
......@@ -35,49 +34,6 @@ static STATUSWINDOWINFO *GetStatusInfo(HWND32 hwnd)
return ((STATUSWINDOWINFO *) &wndPtr->wExtra[0]);
}
/***********************************************************************
* DrawStatusText32A (COMCTL32.3)
*/
void WINAPI DrawStatusText32A( HDC32 hdc, LPRECT32 lprc, LPCSTR text,
UINT32 style )
{
RECT32 r, rt;
int oldbkmode;
UINT32 border;
r = *lprc;
if(style == SBT_OWNERDRAW){
/* FIXME for SBT_OWNERDRAW, SBT_RTLREADING */
}
else{
DrawEdge32(hdc, &r, BDR_RAISEDINNER, BF_RECT|BF_ADJUST|BF_FLAT);
if(style==SBT_POPOUT)
border = BDR_RAISEDOUTER;
else if(style==SBT_NOBORDERS)
border = 0;
else
border = BDR_SUNKENOUTER;
DrawEdge32(hdc, &r, border, BF_RECT | BF_ADJUST | BF_MIDDLE);
/* now draw text */
if (text) {
SelectObject32(hdc, sysColorObjects.hpenWindowText);
oldbkmode = SetBkMode32(hdc, TRANSPARENT);
rt = r;
rt.left += 3;
DrawText32A(hdc, text, lstrlen32A(text),
&rt, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
if (oldbkmode != TRANSPARENT)
SetBkMode32(hdc, oldbkmode);
}
}
}
static BOOL32 SW_Refresh( HWND32 hwnd, HDC32 hdc, STATUSWINDOWINFO *self )
{
int i;
......@@ -475,23 +431,4 @@ LRESULT WINAPI StatusWindowProc( HWND32 hwnd, UINT32 msg,
}
/***********************************************************************
* CreateStatusWindow32A (COMCTL32.4)
*/
HWND32 WINAPI CreateStatusWindow32A( INT32 style, LPCSTR text, HWND32 parent,
UINT32 wid )
{
HWND32 ret;
ATOM atom;
atom = GlobalFindAtom32A(STATUSCLASSNAME32A);
if (!atom) {
/* Some apps don't call InitCommonControls */
InitCommonControls();
}
ret = CreateWindowEx32A(0, STATUSCLASSNAME32A, "Status Window",
style, CW_USEDEFAULT32, CW_USEDEFAULT32,
CW_USEDEFAULT32, CW_USEDEFAULT32, parent, 0, 0, 0);
return (ret);
}
......@@ -847,21 +847,3 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
return 0;
}
/***********************************************************************
* CreateUpDownControl (COMCTL32.14)
*/
HWND32 WINAPI CreateUpDownControl( DWORD style, INT32 x, INT32 y,
INT32 cx, INT32 cy, HWND32 parent,
INT32 id, HINSTANCE32 inst, HWND32 buddy,
INT32 maxVal, INT32 minVal, INT32 curVal )
{
HWND32 hUD = CreateWindow32A(UPDOWN_CLASS32A, 0, style, x, y, cx, cy,
parent, id, inst, 0);
if(hUD){
SendMessage32A(hUD, UDM_SETBUDDY, buddy, 0);
SendMessage32A(hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
SendMessage32A(hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
}
return hUD;
}
......@@ -9,12 +9,8 @@
#include "win.h"
#include "commctrl.h"
#include "button.h"
#include "progress.h"
#include "static.h"
#include "status.h"
#include "updown.h"
#include "scroll.h"
#include "updown.h"
#include "desktop.h"
#include "mdi.h"
#include "gdi.h"
......@@ -99,22 +95,6 @@ static WNDCLASS32A WIDGETS_BuiltinClasses32[BIC32_NB_CLASSES] =
static ATOM bicAtomTable[BIC32_NB_CLASSES];
/* Win32 common controls */
static WNDCLASS32A WIDGETS_CommonControls32[] =
{
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, StatusWindowProc, 0,
sizeof(STATUSWINDOWINFO), 0, 0, 0, 0, 0, STATUSCLASSNAME32A },
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, UpDownWindowProc, 0,
sizeof(UPDOWN_INFO), 0, 0, 0, 0, 0, UPDOWN_CLASS32A },
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, ProgressWindowProc, 0,
sizeof(PROGRESS_INFO), 0, 0, 0, 0, 0, PROGRESS_CLASS32A }
};
#define NB_COMMON_CONTROLS32 \
(sizeof(WIDGETS_CommonControls32)/sizeof(WIDGETS_CommonControls32[0]))
/***********************************************************************
* WIDGETS_Init
*
......@@ -167,29 +147,6 @@ BOOL32 WIDGETS_Init(void)
/***********************************************************************
* InitCommonControls (COMCTL32.15)
*/
void WINAPI InitCommonControls(void)
{
int i;
char name[30];
const char *old_name;
WNDCLASS32A *class32 = WIDGETS_CommonControls32;
for (i = 0; i < NB_COMMON_CONTROLS32; i++, class32++)
{
/* Just to make sure the string is > 0x10000 */
old_name = class32->lpszClassName;
strcpy( name, (char *)class32->lpszClassName );
class32->lpszClassName = name;
class32->hCursor = LoadCursor16( 0, IDC_ARROW );
RegisterClass32A( class32 );
class32->lpszClassName = old_name;
}
}
/***********************************************************************
* WIDGETS_IsControl32
*
* Check whether pWnd is a built-in control or not.
......
......@@ -548,7 +548,7 @@ DEBUG_EvalExpr(struct expr * exp)
break;
case EXP_OP_SHR:
rtn.seg = 0;
exp->un.binop.result = ((unsigned) VAL(exp1) << VAL(exp2));
exp->un.binop.result = ((unsigned) VAL(exp1) >> VAL(exp2));
break;
case EXP_OP_MUL:
rtn.seg = 0;
......
......@@ -982,7 +982,6 @@ INT32 WINAPI GetPrivateProfileSection32A( LPCSTR section, LPSTR buffer,
return 0;
}
/***********************************************************************
* WritePrivateProfileString16 (KERNEL.129)
*/
......
......@@ -6,9 +6,12 @@ VPATH = @srcdir@
MODULE = win16drv
C_SRCS = \
brush.c \
font.c \
graphics.c \
init.c \
objects.c \
pen.c \
prtdrv.c \
text.c
......
/*
* GDI brush objects - win16drv
*
* Copyright 1997 John Harvey
*/
#include <stdlib.h>
#include "brush.h"
#include "win16drv.h"
#include "stddebug.h"
#include "debug.h"
HBRUSH32 WIN16DRV_BRUSH_SelectObject( DC * dc, HBRUSH32 hbrush,
BRUSHOBJ * brush )
{
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
HBRUSH16 prevHandle = dc->w.hBrush;
int nSize;
LOGBRUSH16 lBrush16;
dc->w.hBrush = hbrush;
lBrush16.lbStyle = brush->logbrush.lbStyle;
lBrush16.lbColor = brush->logbrush.lbColor;
lBrush16.lbHatch = brush->logbrush.lbHatch;
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, OBJ_BRUSH,
&lBrush16, NULL,
0);
/* may need to realloc segptrFOntInfo*/
physDev->segptrBrushInfo = WIN16_GlobalLock16(GlobalAlloc16(GHND, nSize));
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, OBJ_BRUSH,
&lBrush16,
(LPVOID)physDev->segptrBrushInfo,
win16drv_SegPtr_TextXForm);
return prevHandle;
}
/*
* Windows 16 bit device driver graphics functions
*
* Copyright 1997 John Harvey
*/
#include "win16drv.h"
/**********************************************************************
* WIN16DRV_MoveToEx
*/
BOOL32
WIN16DRV_MoveToEx(DC *dc,INT32 x,INT32 y,LPPOINT32 pt)
{
if (pt)
{
pt->x = dc->w.CursPosX;
pt->y = dc->w.CursPosY;
}
dc->w.CursPosX = x;
dc->w.CursPosY = y;
return TRUE;
}
/***********************************************************************
* WIN16DRV_LineTo
*/
BOOL32
WIN16DRV_LineTo( DC *dc, INT32 x, INT32 y )
{
BOOL32 bRet ;
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
POINT16 points[2];
points[0].x = dc->w.DCOrgX + XLPTODP( dc, dc->w.CursPosX );
points[0].y = dc->w.DCOrgY + YLPTODP( dc, dc->w.CursPosY );
points[1].x = dc->w.DCOrgX + XLPTODP( dc, x );
points[1].y = dc->w.DCOrgY + YLPTODP( dc, y );
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_POLYLINE, 2, points,
physDev->segptrPenInfo,
NULL,
win16drv_SegPtr_DrawMode, NULL);
dc->w.CursPosX = x;
dc->w.CursPosY = y;
return TRUE;
}
/***********************************************************************
* WIN16DRV_Rectangle
*/
BOOL32
WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
{
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
BOOL32 bRet = 0;
POINT16 points[2];
printf("In WIN16drv_Rectangle, x %d y %d DCOrgX %d y %d\n",
left, top, dc->w.DCOrgX, dc->w.DCOrgY);
printf("In WIN16drv_Rectangle, VPortOrgX %d y %d\n",
dc->vportOrgX, dc->vportOrgY);
points[0].x = XLPTODP(dc, left);
points[0].y = YLPTODP(dc, top);
points[1].x = XLPTODP(dc, right);
points[1].y = XLPTODP(dc, bottom);
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_RECTANGLE, 2, points,
physDev->segptrPenInfo,
physDev->segptrBrushInfo,
win16drv_SegPtr_DrawMode, NULL);
return bRet;
}
/***********************************************************************
* WIN16DRV_Polygon
*/
BOOL32
WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count )
{
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
BOOL32 bRet = 0;
LPPOINT16 points;
int i;
points = malloc(count * sizeof(POINT16));
for (i = 0; i<count ; i++)
{
points[i].x = ((pt[i].x - dc->wndOrgX) * dc->vportExtX/ dc->wndExtX) + dc->vportOrgX;
points[i].y = ((pt[i].y - dc->wndOrgY) * dc->vportExtY/ dc->wndExtY) + dc->vportOrgY;
}
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_WINDPOLYGON, 2, points,
physDev->segptrPenInfo,
physDev->segptrBrushInfo,
win16drv_SegPtr_DrawMode, NULL);
return bRet;
}
......@@ -67,8 +67,8 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
WIN16DRV_GetTextMetrics, /* pGetTextMetrics */
NULL, /* pIntersectClipRect */
NULL, /* pIntersectVisRect */
NULL, /* pLineTo */
NULL, /* pMoveToEx */
WIN16DRV_LineTo, /* pLineTo */
WIN16DRV_MoveToEx, /* pMoveToEx */
NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrgEx */
NULL, /* pOffsetWindowOrgEx */
......@@ -76,10 +76,10 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
WIN16DRV_PatBlt, /* pPatBlt */
NULL, /* pPie */
NULL, /* pPolyPolygon */
NULL, /* pPolygon */
WIN16DRV_Polygon, /* pPolygon */
NULL, /* pPolyline */
NULL, /* pRealizePalette */
NULL, /* pRectangle */
WIN16DRV_Rectangle, /* pRectangle */
NULL, /* pRestoreDC */
NULL, /* pRoundRect */
NULL, /* pSaveDC */
......@@ -278,11 +278,11 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
/* TTD Shouldn't really do pointer arithmetic on segment points */
physDev->segptrPDEVICE = WIN16_GlobalLock16(GlobalAlloc16(GHND, nPDEVICEsize))+sizeof(PDEVICE_HEADER);
*(BYTE *)(PTR_SEG_TO_LIN(physDev->segptrPDEVICE)+0) = 'N';
*(BYTE *)(PTR_SEG_TO_LIN(physDev->segptrPDEVICE)+1) = 'B';
*((BYTE *)PTR_SEG_TO_LIN(physDev->segptrPDEVICE)+0) = 'N';
*((BYTE *)PTR_SEG_TO_LIN(physDev->segptrPDEVICE)+1) = 'B';
/* Set up the header */
pPDH = (PDEVICE_HEADER *)(PTR_SEG_TO_LIN(physDev->segptrPDEVICE) - sizeof(PDEVICE_HEADER));
pPDH = (PDEVICE_HEADER *)((BYTE*)PTR_SEG_TO_LIN(physDev->segptrPDEVICE) - sizeof(PDEVICE_HEADER));
pPDH->pLPD = pLPD;
dprintf_win16drv(stddeb, "PRTDRV_Enable: PDEVICE allocated %08lx\n",(DWORD)(physDev->segptrPDEVICE));
......@@ -389,8 +389,14 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
extern BOOL32 WIN16DRV_PatBlt( struct tagDC *dc, INT32 left, INT32 top,
INT32 width, INT32 height, DWORD rop )
{
printf("In WIN16DRV_PatBlt\n");
return FALSE;
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
BOOL32 bRet = 0;
bRet = PRTDRV_StretchBlt( physDev->segptrPDEVICE, left, top, width, height, NULL, 0, 0, width, height,
PATCOPY, physDev->segptrBrushInfo, win16drv_SegPtr_DrawMode, NULL);
return bRet;
}
/*
* Escape (GDI.38)
......@@ -415,17 +421,17 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
case NEXTBAND:
{
SEGPTR newInData = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(POINT16)));
LPPOINT16 newInData = SEGPTR_NEW(POINT16);
nRet = PRTDRV_Control(physDev->segptrPDEVICE, nEscape,
newInData, lpOutData);
GlobalFree16(newInData);
SEGPTR_GET(newInData), lpOutData);
SEGPTR_FREE(newInData);
break;
}
case GETEXTENDEDTEXTMETRICS:
{
SEGPTR newInData = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(EXTTEXTDATA)));
EXTTEXTDATA *textData = (EXTTEXTDATA *)(PTR_SEG_TO_LIN(newInData));
EXTTEXTDATA *textData = SEGPTR_NEW(EXTTEXTDATA);
textData->nSize = cbInput;
textData->lpindata = lpInData;
......@@ -433,9 +439,8 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
textData->lpXForm = win16drv_SegPtr_TextXForm;
textData->lpDrawMode = win16drv_SegPtr_DrawMode;
nRet = PRTDRV_Control(physDev->segptrPDEVICE, nEscape,
newInData, lpOutData);
GlobalFree16(newInData);
SEGPTR_GET(textData), lpOutData);
SEGPTR_FREE(textData);
}
break;
case STARTDOC:
......@@ -443,13 +448,14 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
lpInData, lpOutData);
if (nRet != -1)
{
SEGPTR newInData = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(HDC32)));
HDC32 *tmpHdc = SEGPTR_NEW(HDC32);
#define SETPRINTERDC SETABORTPROC
HDC32 *tmpHdc = (HDC32 *)(PTR_SEG_TO_LIN(newInData));
*tmpHdc = dc->hSelf;
PRTDRV_Control(physDev->segptrPDEVICE, SETPRINTERDC,
newInData, (SEGPTR)NULL);
GlobalFree16(newInData);
SEGPTR_GET(tmpHdc), (SEGPTR)NULL);
SEGPTR_FREE(tmpHdc);
}
break;
default:
......@@ -659,7 +665,7 @@ static int FreePrintJob(HANDLE16 hJob)
HANDLE16 WINAPI OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC)
{
HANDLE16 hHandle = SP_ERROR;
HANDLE16 hHandle = (HANDLE16)SP_ERROR;
PPRINTJOB pPrintJob;
dprintf_win16drv(stddeb, "OpenJob: \"%s\" \"%s\" %04x\n", lpOutput, lpTitle, hDC);
......
......@@ -37,11 +37,15 @@ HGDIOBJ32 WIN16DRV_SelectObject( DC *dc, HGDIOBJ32 handle )
switch(ptr->wMagic)
{
case PEN_MAGIC:
fprintf(stderr, "WIN16DRV_SelectObject for PEN not implemented\n");
ret = WIN16DRV_PEN_SelectObject( dc, handle, (PENOBJ *)ptr );
break;
case BRUSH_MAGIC:
fprintf(stderr, "WIN16DRV_SelectObject for BRUSH not implemented\n");
ret = WIN16DRV_BRUSH_SelectObject( dc, handle, (BRUSHOBJ *)ptr );
break;
case BITMAP_MAGIC:
fprintf(stderr, "WIN16DRV_SelectObject for BITMAP not implemented\n");
ret = 1;
break;
case FONT_MAGIC:
ret = WIN16DRV_FONT_SelectObject( dc, handle, (FONTOBJ *)ptr );
break;
......
/*
* GDI pen objects
*
* Copyright 1997 John Harvey
*/
#include "pen.h"
#include "color.h"
#include "win16drv.h"
#include "stddebug.h"
#include "debug.h"
/***********************************************************************
* PEN_SelectObject
*/
HPEN32 WIN16DRV_PEN_SelectObject( DC * dc, HPEN32 hpen, PENOBJ * pen )
{
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
HPEN32 prevHandle = dc->w.hPen;
int nSize;
LOGPEN16 lPen16;
dc->w.hPen = hpen;
printf("In WIN16DRV_PEN_SelectObject\n");
lPen16.lopnStyle = pen->logpen.lopnStyle;
lPen16.lopnWidth.x = pen->logpen.lopnWidth.x;
lPen16.lopnWidth.y = pen->logpen.lopnWidth.y;
lPen16.lopnColor = pen->logpen.lopnColor;
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, OBJ_PEN,
&lPen16, NULL,
0);
/* may need to realloc segptrFOntInfo*/
physDev->segptrPenInfo = WIN16_GlobalLock16(GlobalAlloc16(GHND, nSize));
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, OBJ_PEN,
&lPen16,
(LPVOID)physDev->segptrPenInfo,
0);
return prevHandle;
}
......@@ -97,7 +97,7 @@ BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
}
#endif
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, x, y,
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, XLPTODP(dc,x), XLPTODP(dc,y),
&clipRect, str,
wCount, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
win16drv_SegPtr_TextXForm, NULL, lpOpaqueRect, wOptions);
......
......@@ -63,8 +63,8 @@ C_SRCS = \
GEN_ASM_SRCS = \
$(SPEC_FILES) \
call32.s \
callfrom16.s \
callfrom32.s \
callto16.s
.SUFFIXES: .spec
......@@ -81,8 +81,8 @@ $(SPEC_FILES): $(BUILD)
callfrom16.s: $(SPEC_FILES)
$(BUILD) -o $@ -callfrom16 `cat $(SPEC_FILES) | grep CallFrom16_ | sed 's/.*CallFrom16_\(.*\)/\1/' | sort | uniq`
callfrom32.s: $(SPEC_FILES)
$(BUILD) -o $@ -callfrom32 `cat $(SPEC_FILES) | grep CallFrom32_ | sed 's/.*CallFrom32_\(.*\)/\1/' | sort | uniq`
call32.s: $(BUILD)
$(BUILD) -o $@ -call32
callto16.s: $(TOPSRCDIR)/include/callback.h $(BUILD)
$(BUILD) -o $@ -callto16 `cat $(TOPSRCDIR)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq`
......
......@@ -74,7 +74,7 @@ type win32
0070 stub ImpersonateNamedPipeClient
0071 stub ImpersonateSelf
0072 stub InitializeAcl
0073 return InitializeSecurityDescriptor 8 1
0073 stdcall InitializeSecurityDescriptor(ptr long) InitializeSecurityDescriptor
0074 stdcall InitializeSid(ptr ptr long) InitializeSid
0075 stub InitiateSystemShutdownA
0076 stub InitiateSystemShutdownW
......
......@@ -21,13 +21,15 @@ type win32
15 stub DrawInsert
16 stdcall CreateUpDownControl(long long long long long long long long long long long long) CreateUpDownControl
17 stdcall InitCommonControls() InitCommonControls
# 18 pascal16 CreateStatusWindow(word ptr word word) CreateStatusWindow16
18 stub CreateStatusWindow
19 stub CreateStatusWindowW
19 stdcall CreateStatusWindowW(long ptr long long) CreateStatusWindow32W
20 stub CreateToolbarEx
21 stub DestroyPropertySheetPage
22 stub DllGetVersion
# 23 pascal16 DrawStatusText(word ptr ptr word) DrawStatusText16
23 stub DrawStatusText
24 stub DrawStatusTextW
24 stdcall DrawStatusTextW(long ptr ptr long) DrawStatusText32W
25 stub ImageList_Add
26 stub ImageList_AddIcon
27 stub ImageList_AddMasked
......
......@@ -18,8 +18,8 @@ type win32
14 stub LoadAlterBitmap
15 stub PageSetupDlgA
16 stub PageSetupDlgW
17 return PrintDlgA 4 0
18 return PrintDlgW 4 0
17 stdcall PrintDlgA(ptr) PrintDlg32A
18 stdcall PrintDlgW(ptr) PrintDlg32W
19 stub ReplaceTextA
20 stub ReplaceTextW
21 stub WantArrows
......
......@@ -16,7 +16,7 @@ type win16
16 pascal16 FormatCharDlgProc(word word word long) FormatCharDlgProc
18 pascal16 FontStyleEnumProc(ptr ptr word long) FontStyleEnumProc
19 pascal16 FontFamilyEnumProc(ptr ptr word long) FontFamilyEnumProc
20 pascal16 PrintDlg(segptr) PrintDlg
20 pascal16 PrintDlg(segptr) PrintDlg16
21 pascal PrintDlgProc(word word word long) PrintDlgProc
22 pascal PrintSetupDlgProc(word word word long) PrintSetupDlgProc
#23 pascal EDITINTEGERONLY exported, shared data
......
......@@ -60,7 +60,7 @@ type win32
56 stub _clearfp
57 cdecl _close(long) CRTDLL__close
58 stub _commit
59 long _commode_dll(0)
59 extern _commode_dll CRTDLL_commode_dll
60 stub _control87
61 stub _controlfp
62 stub _copysign
......@@ -105,7 +105,7 @@ type win32
101 stub _finite
102 stub _flsbuf
103 stub _flushall
104 long _fmode_dll(0)
104 extern _fmode_dll CRTDLL_fmode_dll
105 stub _fpclass
106 stub _fpieee_flt
107 stub _fpreset
......@@ -130,7 +130,7 @@ type win32
126 stub _getpid
127 stub _getsystime
128 stub _getw
129 register _global_unwind2(ptr) CRTDLL__global_unwind2
129 register _global_unwind2() CRTDLL__global_unwind2
130 stub _heapchk
131 stub _heapmin
132 stub _heapset
......@@ -174,7 +174,7 @@ type win32
170 stub _kbhit
171 stub _lfind
172 stub _loaddll
173 register _local_unwind2(ptr long) CRTDLL__local_unwind2
173 register _local_unwind2() CRTDLL__local_unwind2
174 stub _locking
175 stub _logb
176 cdecl _lrotl (long long) CRTDLL__lrotl
......@@ -244,7 +244,7 @@ type win32
240 cdecl _open_osfhandle(long long) CRTDLL__open_osfhandle
241 extern _osmajor_dll CRTDLL_osmajor_dll
242 extern _osminor_dll CRTDLL_osminor_dll
243 long _osmode_dll(0)
243 extern _osmode_dll CRTDLL_osmode_dll
244 extern _osver_dll CRTDLL_osver_dll
245 extern _osversion_dll CRTDLL_osversion_dll
246 stub _pclose
......@@ -459,7 +459,7 @@ type win32
455 cdecl signal(long ptr) CRTDLL_signal
456 cdecl sin(double) sin
457 cdecl sinh(double) sinh
458 varargs sprintf() wsprintf32A
458 varargs sprintf() sprintf
459 cdecl sqrt(double) sqrt
460 cdecl srand(long) CRTDLL_srand
461 varargs sscanf() sscanf
......
name ddeml
type win16
2 stub DdeInitialize #(ptr segptr long long) DdeInitialize
3 stub DdeUnInitialize #(long) DdeUnInitialize
2 pascal16 DdeInitialize(ptr segptr long long) DdeInitialize16
3 pascal16 DdeUninitialize(long) DdeUninitialize16
4 stub DdeConnectList #(long word word word ptr) DdeConnectList
5 stub DdeQueryNextServer #(word word) DdeQueryNextServer
6 stub DdeDisconnectList #(word) DdeDisconnectList
7 stub DdeConnect #(long word word ptr) DdeConnect
8 stub DdeDisconnect #(word) DdeDisconnect
7 pascal DdeConnect(long long long ptr) DdeConnect16
8 pascal16 DdeDisconnect(long) DdeDisconnect16
9 stub DdeQueryConvInfo #(word long ptr) DdeQueryConvInfo
10 stub DdeSetUserHandle #(word long long) DdeSetUserHandle
11 stub DdeClientTransaction #(ptr long word word word word long ptr) DdeClientTransaction
11 pascal DdeClientTransaction(ptr long long long s_word s_word long ptr)
DdeClientTransaction16
12 stub DdeAbandonTransaction #(long word long) DdeAbandonTransaction
13 stub DdePostAdvise #(long word word) DdePostAdvise
14 stub DdeCreateDataHandle #(long ptr long long word word word) DdeCreateDataHandle
......@@ -18,15 +19,15 @@ type win16
16 stub DdeGetData #(word ptr long long) DdeGetData
17 stub DdeAccessData #(word ptr) DdeAccessData
18 stub DdeUnaccessData #(word) DdeUnaccessData
19 stub DdeFreeDataHandle #(word) DdeFreeDataHandle
20 stub DdeGetLastError #(long) DdeGetLastError
21 stub DdeCreateStringHandle #(long str word) DdeCreateStringHandle
22 stub DdeFreeStringHandle #(long word) DdeFreeStringHandle
19 pascal16 DdeFreeDataHandle(long) DdeFreeDataHandle16
20 pascal16 DdeGetLastError(long) DdeGetLastError16
21 pascal DdeCreateStringHandle(long str s_word) DdeCreateStringHandle16
22 pascal16 DdeFreeStringHandle(long long) DdeFreeStringHandle16
23 stub DdeQueryString #(long word ptr long word) DdeQueryString
24 stub DdeKeepStringHandle #(long word) DdeKeepStringHandle
24 pascal16 DdeKeepStringHandle(long long) DdeKeepStringHandle16
26 stub DdeEnableCallback #(long word word) DdeEnableCallback
27 stub DdeNameService #(long word word word)
27 pascal DdeNameService(long long long s_word) DdeNameService16
36 stub DdeCmpStringHandles #(word word) DdeCmpStringHandles
37 stub DdeReconnect #(word) DdeReconnect
37 pascal DdeReconnect(long) DdeReconnect
......@@ -287,7 +287,7 @@ file gdi.exe
451 pascal16 CreatePolyPolygonRgn(ptr ptr word word) CreatePolyPolygonRgn16
452 stub GDISEEGDIDO
460 stub GDITASKTERMINATION
461 return SetObjectOwner 4 0
461 pascal16 SetObjectOwner(word word) SetObjectOwner16
462 pascal16 IsGDIObject(word) IsGDIObject
463 stub MAKEOBJECTPRIVATE
464 stub FIXUPBOGUSPUBLISHERMETAFILE
......
......@@ -133,7 +133,7 @@ type win32
126 stub GdiDeleteLocalDC
127 stub GdiDeleteLocalObject
128 stub GdiFlush
129 return GdiGetBatchLimit 0 1
129 stdcall GdiGetBatchLimit() GdiGetBatchLimit
130 stub GdiGetLocalBrush
131 stub GdiGetLocalDC
132 stub GdiGetLocalFont
......@@ -143,7 +143,7 @@ type win32
136 stub GdiPlayScript
137 stub GdiReleaseLocalDC
138 stub GdiSetAttrs
139 return GdiSetBatchLimit 4 1
139 stdcall GdiSetBatchLimit(long) GdiSetBatchLimit
140 stub GdiSetServerAttr
141 stub GetArcDirection
142 stub GetAspectRatioFilterEx
......@@ -192,7 +192,7 @@ type win32
185 stub GetGlyphOutline
186 stdcall GetGlyphOutlineA(long long long ptr long ptr ptr) GetGlyphOutline32A
187 stdcall GetGlyphOutlineW(long long long ptr long ptr ptr) GetGlyphOutline32W
188 return GetGraphicsMode 4 1 # just return 1
188 stdcall GetGraphicsMode(long) GetGraphicsMode
189 stub GetICMProfileA
190 stub GetICMProfileW
191 stub GetKerningPairs
......@@ -248,7 +248,7 @@ type win32
241 stub GetWinMetaFileBits
242 stdcall GetWindowExtEx(long ptr) GetWindowExtEx32
243 stdcall GetWindowOrgEx(long ptr) GetWindowOrgEx32
244 return GetWorldTransform 8 0
244 stdcall GetWorldTransform(long ptr) GetWorldTransform
245 stdcall IntersectClipRect(long long long long long) IntersectClipRect32
246 stdcall InvertRgn(long long) InvertRgn32
247 stdcall LPtoDP(long ptr long) LPtoDP32
......@@ -322,7 +322,7 @@ type win32
314 stub SetDeviceGammaRamp
315 stub SetEnhMetaFileBits
316 stub SetFontEnumeration
317 return SetGraphicsMode 8 1
317 stdcall SetGraphicsMode(long long) SetGraphicsMode
318 stub SetICMMode
319 stub SetICMProfileA
320 stub SetICMProfileW
......@@ -394,4 +394,4 @@ type win32
383 stub UpdateICMRegKeyA
384 stub UpdateICMRegKeyW
385 stub gdiPlaySpoolStream
386 return SetObjectOwner 8 0
386 stdcall SetObjectOwner(long long) SetObjectOwner32
......@@ -555,7 +555,7 @@ type win32
564 stdcall QueryPerformanceCounter(ptr) QueryPerformanceCounter
565 stub QueryPerformanceFrequency
566 stub QueueUserAPC
567 register RaiseException(long long long ptr) RaiseException
567 register RaiseException() EXC_RaiseException
568 stdcall ReadConsoleA(long ptr long ptr ptr) ReadConsole32A
569 stub ReadConsoleInputA
570 stub ReadConsoleInputW
......@@ -578,7 +578,7 @@ type win32
587 stdcall ResumeThread(long) ResumeThread
588 stdcall RtlFillMemory(ptr long long) RtlFillMemory
589 stdcall RtlMoveMemory(ptr ptr long) RtlMoveMemory
590 register RtlUnwind(ptr long ptr long) RtlUnwind
590 register RtlUnwind() EXC_RtlUnwind
591 stdcall RtlZeroMemory(ptr long) RtlZeroMemory
592 register SMapLS() SMapLS
593 register SMapLS_IP_EBP_12() SMapLS_IP_EBP_12
......
......@@ -862,7 +862,7 @@ type win32
859 stub __eFYL2XP1
860 stub __eGetStatusWord
861 stub _alloca_probe
862 return _chkstk 0 0
862 cdecl _chkstk() NTDLL_chkstk
863 stub _fltused
864 stub _ftol
865 stub _itoa
......
......@@ -108,7 +108,7 @@ type win32
105 stub OleGetClipboard
106 stub OleGetIconOfClass
107 stub OleGetIconOfFile
108 return OleInitialize 4 0
108 stdcall OleInitialize(ptr) OleInitialize
109 stub OleInitializeWOW
110 stub OleIsCurrentClipboard
111 stub OleIsRunning
......@@ -131,7 +131,7 @@ type win32
128 stub OleSetContainedObject
129 stub OleSetMenuDescriptor
130 stub OleTranslateAccelerator
131 return OleUninitialize 0 0
131 stdcall OleUninitialize() OleUninitialize
132 stub OpenOrCreateStream
133 stub ProgIDFromCLSID
134 stub ReadClassStg
......
......@@ -55,7 +55,7 @@ type win32
185 stub SHELL32_185
186 stdcall FindExecutableA(ptr ptr ptr) FindExecutable32A
187 stub FindExecutableW
188 return FreeIconList 4 0
188 stdcall FreeIconList(long) FreeIconList
189 stub InternalExtractIconListA
190 stub InternalExtractIconListW
191 stub OpenAs_RunDLL
......
......@@ -143,9 +143,8 @@ static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
/* "Undocumented Windows" examples) want it that way. */
CREATESTRUCT16 *cs = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
offset = sizeof(*cs);
memcpy( (char *)CURRENT_STACK16 - offset, cs, offset );
IF1632_Saved16_ss_sp -= offset;
lParam = IF1632_Saved16_ss_sp;
lParam = STACK16_PUSH( offset );
memcpy( PTR_SEG_TO_LIN(lParam), cs, offset );
}
args = (WORD *)CURRENT_STACK16 - 7;
args[0] = LOWORD(lParam);
......@@ -156,7 +155,7 @@ static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
/* args[5] and args[6] are used by relay code to store the stack pointer */
ret = CallTo16_regs_( &context, -(5 * sizeof(WORD)) );
IF1632_Saved16_ss_sp += offset;
if (offset) STACK16_POP(offset);
return ret;
}
......
......@@ -232,7 +232,7 @@ file user.exe
228 pascal16 GetNextDlgTabItem(word word word) GetNextDlgTabItem16
229 pascal16 GetTopWindow(word) GetTopWindow16
230 pascal16 GetNextWindow(word word) GetNextWindow16
231 stub GetSystemDebugState
231 return GetSystemDebugState 0 0 #FIXME
232 pascal16 SetWindowPos(word word word word word word word) SetWindowPos16
233 pascal16 SetParent(word word) SetParent16
234 pascal16 UnhookWindowsHook(s_word segptr) THUNK_UnhookWindowsHook16
......@@ -465,14 +465,14 @@ file user.exe
532 pascal16 WNetGetPropertyText(word word word ptr word) WNetGetPropertyText
533 stub WNetInitialize
534 stub WNetLogon
600 stub GetShellWindow
600 pascal16 GetShellWindow() GetShellWindow16
601 stub DoHotkeyStuff
602 stub SetCheckCursorTimer
604 stub BroadcastSystemMessage
605 stub HackTaskMonitor
606 stub FormatMessage
608 stub GetForegroundWindow
609 stub SetForegroundWindow
608 pascal16 GetForegroundWindow() GetForegroundWindow16
609 pascal16 SetForegroundWindow(word) SetForegroundWindow16
610 stub DestroyIcon32
620 stub ChangeDisplaySettings
621 stub EnumDisplaySettings
......
......@@ -92,36 +92,36 @@ type win32
87 stub DdeAbandonTransaction
88 stub DdeAccessData
89 stub DdeAddData
90 return DdeClientTransaction 32 0
90 stdcall DdeClientTransaction(ptr long long long long long long ptr) DdeClientTransaction32
91 stub DdeCmpStringHandles
92 return DdeConnect 16 0
92 stdcall DdeConnect(long long long ptr) DdeConnect32
93 stub DdeConnectList
94 stub DdeCreateDataHandle
95 return DdeCreateStringHandleA 12 0
96 return DdeCreateStringHandleW 12 0
97 return DdeDisconnect 4 0
95 stdcall DdeCreateStringHandleA(long ptr long) DdeCreateStringHandle32A
96 stdcall DdeCreateStringHandleW(long ptr long) DdeCreateStringHandle32W
97 stdcall DdeDisconnect(long) DdeDisconnect32
98 stub DdeDisconnectList
99 stub DdeEnableCallback
100 return DdeFreeDataHandle 4 1
101 return DdeFreeStringHandle 8 0
100 stdcall DdeFreeDataHandle(long) DdeFreeDataHandle32
101 stdcall DdeFreeStringHandle(long long) DdeFreeStringHandle32
102 stub DdeGetData
103 return DdeGetLastError 4 0
103 stdcall DdeGetLastError(long) DdeGetLastError32
104 stub DdeGetQualityOfService
105 stub DdeImpersonateClient
106 return DdeInitializeA 16 0
107 return DdeInitializeW 16 0
108 stub DdeKeepStringHandle
109 return DdeNameService 16 0
106 stdcall DdeInitializeA(ptr ptr long long) DdeInitialize32A
107 stdcall DdeInitializeW(ptr ptr long long) DdeInitialize32W
108 stdcall DdeKeepStringHandle(long long) DdeKeepStringHandle32
109 stdcall DdeNameService(long long long long) DdeNameService32
110 stub DdePostAdvise
111 stub DdeQueryConvInfo
112 stub DdeQueryNextServer
113 stub DdeQueryStringA
114 stub DdeQueryStringW
115 stub DdeReconnect
115 stdcall DdeReconnect(long) DdeReconnect
116 stub DdeSetQualityOfService
117 stub DdeSetUserHandle
118 stub DdeUnaccessData
119 return DdeUninitialize 4 0
119 stdcall DdeUninitialize(long) DdeUninitialize32
120 stdcall DefDlgProcA(long long long long) DefDlgProc32A
121 stdcall DefDlgProcW(long long long long) DefDlgProc32W
122 stdcall DefFrameProcA(long long long long long) DefFrameProc32A
......@@ -243,7 +243,7 @@ type win32
238 stdcall GetDlgItemTextW(long long ptr long) GetDlgItemText32W
239 stdcall GetDoubleClickTime() GetDoubleClickTime32
240 stdcall GetFocus() GetFocus32
241 return GetForegroundWindow 0 0 #FIXME
241 stdcall GetForegroundWindow() GetForegroundWindow32
242 stub GetIconInfo
243 stub GetInputDesktop
244 stdcall GetInputState() GetInputState32
......@@ -289,7 +289,7 @@ type win32
284 stdcall GetScrollInfo(long long ptr) GetScrollInfo32
285 stdcall GetScrollPos(long long) GetScrollPos32
286 stdcall GetScrollRange(long long ptr ptr) GetScrollRange32
287 return GetShellWindow 0 0
287 stdcall GetShellWindow() GetShellWindow32
288 stdcall GetSubMenu(long long) GetSubMenu32
289 stdcall GetSysColor(long) GetSysColor32
290 stdcall GetSysColorBrush(long) GetSysColorBrush32
......@@ -484,7 +484,7 @@ type win32
479 stdcall SetDlgItemTextW(long long ptr) SetDlgItemText32W
480 stdcall SetDoubleClickTime(long) SetDoubleClickTime32
481 stdcall SetFocus(long) SetFocus32
482 return SetForegroundWindow 4 0
482 stdcall SetForegroundWindow(long) SetForegroundWindow32
483 stdcall SetInternalWindowPos(long long ptr ptr) SetInternalWindowPos32
484 stdcall SetKeyboardState(ptr) SetKeyboardState
485 stdcall SetLastErrorEx(long long) SetLastErrorEx
......
......@@ -38,7 +38,7 @@ type win16
118 register INT_Int12Handler(word) INT_Int12Handler
119 register INT_Int13Handler(word) INT_Int13Handler
120 register INT_Int14Handler(word) BUILTIN_DefaultIntHandler
121 register INT_Int15Handler(word) BUILTIN_DefaultIntHandler
121 register INT_Int15Handler(word) INT_Int15Handler
122 register INT_Int16Handler(word) BUILTIN_DefaultIntHandler
123 register INT_Int17Handler(word) BUILTIN_DefaultIntHandler
124 register INT_Int18Handler(word) BUILTIN_DefaultIntHandler
......
/*
* Machine dependent integer conversions
*
* Copyright Miguel de Icaza, 1994
*/
#if defined (mc68000) || defined (sparc)
#define CONV_LONG(a) (((int)(a)&0xFF) << 24) | (((int)(a) & 0xFF00) << 8) | (((unsigned long)(a) & 0xFF0000) >> 8) | (((unsigned long)(a)&0xFF000000) >> 24)
#define CONV_SHORT(a) (((int)(a) & 0xFF) << 8) | (((unsigned long)(a) & 0xFF00) >> 8)
#define CONV_CHAR_TO_LONG(x) ((unsigned long)(x) >> 24)
#define CONV_SHORT_TO_LONG(x) ((unsigned long)(x) >> 16)
#define CONV_BITMAPINFO(a) ARCH_ConvBitmapInfo(a)
#define CONV_BITMAPCOREHEADER(a) ARCH_ConvCoreHeader(a)
#else
#define CONV_LONG(a) (a)
#define CONV_SHORT(a) (a)
#define CONV_CHAR_TO_LONG(a) (a)
#define CONV_SHORT_TO_LONG(a) (a)
#define CONV_BITMAPINFO(a) /* */
#define CONV_BITMAPCOREHEADER(a) /* */
#endif
......@@ -45,9 +45,15 @@ extern WORD CALLBACK CallTo16_word_wwwww(FARPROC16,WORD,WORD,WORD,WORD,WORD);
extern WORD CALLBACK CallTo16_word_lwlll(FARPROC16,LONG,WORD,LONG,LONG,LONG);
extern WORD CALLBACK CallTo16_word_llll (FARPROC16,LONG,LONG,LONG,LONG);
extern LONG CALLBACK CallTo16_long_lwlll(FARPROC16,LONG,WORD,LONG,LONG,LONG);
extern LONG CALLBACK CallTo16_word_lwwlllll(FARPROC16,LONG,WORD,WORD,LONG,LONG,
LONG,LONG,WORD);
extern LONG CALLBACK CallTo16_long_lwwllwlllllw(FARPROC16,LONG,WORD,WORD,LONG,
LONG,WORD,LONG,LONG,LONG,LONG,
LONG,WORD);
extern LONG CALLBACK CallTo16_word_lwwwwlwwwwllll(FARPROC16,LONG,WORD,WORD,
WORD,WORD,LONG,WORD,WORD,
WORD,WORD,LONG,LONG,LONG,
LONG);
#define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
CallTo16_long_lwwll( func, dwId, msg, hdrvr, lparam1, lparam2 )
......
......@@ -13,7 +13,7 @@ void WINAPI InitCommonControls(void);
#define STATUSCLASSNAME16 "msctls_statusbar"
#define STATUSCLASSNAME32A "msctls_statusbar32"
#define STATUSCLASSNAME32W "msctls_statusbar32"
#define STATUSCLASSNAME32W L"msctls_statusbar32" /*FIXME*/
#define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
#define SB_SETTEXT32A (WM_USER+1)
......@@ -43,9 +43,9 @@ void WINAPI InitCommonControls(void);
/* UpDown */
#define UPDOWN_CLASS32A "msctls_updown32"
#define UPDOWN_CLASS32W L"msctls_updown32"
#define UPDOWN_CLASS16 "msctls_updown"
#define UPDOWN_CLASS32A "msctls_updown32"
#define UPDOWN_CLASS32W L"msctls_updown32" /*FIXME*/
#define UPDOWN_CLASS WINELIB_NAME_AW(UPDOWN_CLASS)
typedef struct tagUDACCEL
......@@ -96,12 +96,14 @@ typedef struct tagUDACCEL
/* Functions prototypes */
HWND16 WINAPI CreateStatusWindow16(INT16,LPCSTR,HWND16,UINT16);
HWND32 WINAPI CreateStatusWindow32A(INT32,LPCSTR,HWND32,UINT32);
HWND32 WINAPI CreateStatusWindow32W(INT32,LPCWSTR,HWND32,UINT32);
#define CreateStatusWindow WINELIB_NAME_AW(CreateStatusWindow)
HWND32 WINAPI CreateUpDownControl(DWORD,INT32,INT32,INT32,INT32,
HWND32,INT32,HINSTANCE32,HWND32,
INT32,INT32,INT32);
VOID WINAPI DrawStatusText16(HDC16,LPRECT16,LPCSTR,UINT16);
VOID WINAPI DrawStatusText32A(HDC32,LPRECT32,LPCSTR,UINT32);
VOID WINAPI DrawStatusText32W(HDC32,LPRECT32,LPCWSTR,UINT32);
#define DrawStatusText WINELIB_NAME_AW(DrawStatusText)
......
......@@ -253,18 +253,19 @@ typedef CHOOSEFONT *LPCHOOSEFONT;
#define CD_LBSELSUB 1
#define CD_LBSELADD 2
typedef struct {
typedef struct
{
DWORD lStructSize;
HWND16 hwndOwner;
HGLOBAL16 hDevMode;
HGLOBAL16 hDevNames;
HDC16 hDC;
DWORD Flags;
UINT16 nFromPage;
UINT16 nToPage;
UINT16 nMinPage;
UINT16 nMaxPage;
UINT16 nCopies;
WORD nFromPage;
WORD nToPage;
WORD nMinPage;
WORD nMaxPage;
WORD nCopies;
HINSTANCE16 hInstance;
LPARAM lCustData;
WNDPROC16 lpfnPrintHook;
......@@ -273,8 +274,59 @@ typedef struct {
SEGPTR lpSetupTemplateName;
HGLOBAL16 hPrintTemplate;
HGLOBAL16 hSetupTemplate;
} PRINTDLG;
typedef PRINTDLG * LPPRINTDLG;
} PRINTDLG16, *LPPRINTDLG16;
typedef UINT32 (CALLBACK *LPPRINTHOOKPROC) (HWND32, UINT32, WPARAM32, LPARAM);
typedef UINT32 (CALLBACK *LPSETUPHOOKPROC) (HWND32, UINT32, WPARAM32, LPARAM);
typedef struct
{
DWORD lStructSize;
HWND32 hwndOwner;
HGLOBAL32 hDevMode;
HGLOBAL32 hDevNames;
HDC32 hDC;
DWORD Flags;
WORD nFromPage;
WORD nToPage;
WORD nMinPage;
WORD nMaxPage;
WORD nCopies;
HINSTANCE32 hInstance;
LPARAM lCustData;
LPPRINTHOOKPROC lpfnPrintHook;
LPSETUPHOOKPROC lpfnSetupHook;
LPCSTR lpPrintTemplateName;
LPCSTR lpSetupTemplateName;
HGLOBAL32 hPrintTemplate;
HGLOBAL32 hSetupTemplate;
} PRINTDLG32A, *LPPRINTDLG32A;
typedef struct
{
DWORD lStructSize;
HWND32 hwndOwner;
HGLOBAL32 hDevMode;
HGLOBAL32 hDevNames;
HDC32 hDC;
DWORD Flags;
WORD nFromPage;
WORD nToPage;
WORD nMinPage;
WORD nMaxPage;
WORD nCopies;
HINSTANCE32 hInstance;
LPARAM lCustData;
LPPRINTHOOKPROC lpfnPrintHook;
LPSETUPHOOKPROC lpfnSetupHook;
LPCWSTR lpPrintTemplateName;
LPCWSTR lpSetupTemplateName;
HGLOBAL32 hPrintTemplate;
HGLOBAL32 hSetupTemplate;
} PRINTDLG32W, *LPPRINTDLG32W;
DECL_WINELIB_TYPE_AW(PRINTDLG);
DECL_WINELIB_TYPE_AW(LPPRINTDLG);
#define PD_ALLPAGES 0x00000000
#define PD_SELECTION 0x00000001
......
/*
* DDEML library definitions
*
* Copyright 1997 Alexandre Julliard
*/
#ifndef __WINE__DDEML_H
#define __WINE__DDEML_H
#include "wintypes.h"
typedef DWORD HCONVLIST;
typedef DWORD HCONV;
typedef DWORD HSZ;
typedef DWORD HDDEDATA;
typedef HDDEDATA (CALLBACK *PFNCALLBACK16)(UINT16,UINT16,HCONV,HSZ,HSZ,
HDDEDATA,DWORD,DWORD);
typedef HDDEDATA (CALLBACK *PFNCALLBACK32)(UINT32,UINT32,HCONV,HSZ,HSZ,
HDDEDATA,DWORD,DWORD);
DECL_WINELIB_TYPE(PFNCALLBACK);
typedef struct
{
UINT16 cb;
UINT16 wFlags;
UINT16 wCountryID;
INT16 iCodePage;
DWORD dwLangID;
DWORD dwSecurity;
} CONVCONTEXT16, *LPCONVCONTEXT16;
typedef struct
{
UINT32 cb;
UINT32 wFlags;
UINT32 wCountryID;
INT32 iCodePage;
DWORD dwLangID;
DWORD dwSecurity;
} CONVCONTEXT32, *LPCONVCONTEXT32;
DECL_WINELIB_TYPE(CONVCONTEXT);
DECL_WINELIB_TYPE(LPCONVCONTEXT);
UINT16 WINAPI DdeInitialize16(LPDWORD,PFNCALLBACK16,DWORD,DWORD);
UINT32 WINAPI DdeInitialize32A(LPDWORD,PFNCALLBACK32,DWORD,DWORD);
UINT32 WINAPI DdeInitialize32W(LPDWORD,PFNCALLBACK32,DWORD,DWORD);
#define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
BOOL16 WINAPI DdeUninitialize16(DWORD);
BOOL32 WINAPI DdeUninitialize32(DWORD);
#define DdeUninitialize WINELIB_NAME(DdeUninitialize)
HCONV WINAPI DdeConnect16(DWORD,HSZ,HSZ,LPCONVCONTEXT16);
HCONV WINAPI DdeConnect32(DWORD,HSZ,HSZ,LPCONVCONTEXT32);
#define DdeConnect WINELIB_NAME(DdeConnect)
BOOL16 WINAPI DdeDisconnect16(HCONV);
BOOL32 WINAPI DdeDisconnect32(HCONV);
#define DdeDisconnect WINELIB_NAME(DdeDisconnect)
HCONV WINAPI DdeReconnect(HCONV);
HSZ WINAPI DdeCreateStringHandle16(DWORD,LPCSTR,INT16);
HSZ WINAPI DdeCreateStringHandle32A(DWORD,LPCSTR,INT32);
HSZ WINAPI DdeCreateStringHandle32W(DWORD,LPCWSTR,INT32);
#define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
BOOL16 WINAPI DdeFreeStringHandle16(DWORD,HSZ);
BOOL32 WINAPI DdeFreeStringHandle32(DWORD,HSZ);
#define DdeFreeStringHandle WINELIB_NAME(DdeFreeStringHandle)
BOOL16 WINAPI DdeFreeDataHandle16(HDDEDATA);
BOOL32 WINAPI DdeFreeDataHandle32(HDDEDATA);
#define DdeFreeDataHandle WINELIB_NAME(DdeFreeDataHandle)
BOOL16 WINAPI DdeKeepStringHandle16(DWORD,HSZ);
BOOL32 WINAPI DdeKeepStringHandle32(DWORD,HSZ);
#define DdeKeepStringHandle WINELIB_NAME(DdeKeepStringHandle)
HDDEDATA WINAPI DdeClientTransaction16(LPVOID,DWORD,HCONV,HSZ,UINT16,
UINT16,DWORD,LPDWORD);
HDDEDATA WINAPI DdeClientTransaction32(LPBYTE,DWORD,HCONV,HSZ,UINT32,
UINT32,DWORD,LPDWORD);
#define DdeClientTransaction WINELIB_NAME(DdeClientTransaction)
HDDEDATA WINAPI DdeNameService16(DWORD,HSZ,HSZ,UINT16);
HDDEDATA WINAPI DdeNameService32(DWORD,HSZ,HSZ,UINT32);
#define DdeNameService WINELIB_NAME(DdeNameService)
UINT16 WINAPI DdeGetLastError16(DWORD);
UINT32 WINAPI DdeGetLastError32(DWORD);
#define DdeGetLastError WINELIB_NAME(DdeGetLastError)
#endif /* __WINE__DDEML_H */
......@@ -108,6 +108,7 @@ typedef struct
BYTE bitsPerPixel;
INT32 MapMode;
INT32 GraphicsMode; /* Graphics mode */
INT32 DCOrgX; /* DC origin */
INT32 DCOrgY;
INT32 CursPosX; /* Current position */
......
......@@ -454,7 +454,7 @@ DWORD WINAPI auxOutMessage(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD d
#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
typedef void (*LPTIMECALLBACK) (UINT16 uTimerID, UINT16 uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
typedef void (CALLBACK *LPTIMECALLBACK) (UINT16 uTimerID, UINT16 uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
#define TIME_ONESHOT 0 /* program timer for single event */
#define TIME_PERIODIC 1 /* program for continuous periodic event */
......
......@@ -132,12 +132,12 @@ extern FARPROC16 MODULE_GetWndProcEntry16( const char *name );
extern FARPROC16 WIN32_GetProcAddress16( HMODULE32 hmodule, LPSTR name );
/* builtin.c */
extern BOOL16 BUILTIN_Init(void);
extern HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL16 force );
extern BOOL32 BUILTIN_Init(void);
extern HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL32 force );
extern LPCSTR BUILTIN_GetEntryPoint16( WORD cs, WORD ip, WORD *pOrd );
extern LPCSTR BUILTIN_GetEntryPoint32( void *relay );
extern FARPROC32 BUILTIN_GetEntryPoint32( char *buffer, void *relay );
extern FARPROC32 BUILTIN_GetProcAddress32(NE_MODULE *pModule, LPCSTR function);
extern BOOL16 BUILTIN_ParseDLLOptions( const char *str );
extern BOOL32 BUILTIN_ParseDLLOptions( const char *str );
extern void BUILTIN_PrintDLLs(void);
/* ne_image.c */
......
......@@ -47,6 +47,7 @@ struct options
{
char * desktopGeometry; /* NULL when no desktop */
char * programName; /* To use when loading resources */
char * argv0; /* argv[0] of Wine process */
int usePrivateMap;
int useFixedMap;
int synchronous; /* X synchronous mode */
......
......@@ -350,7 +350,7 @@ typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY {
DWORD Reserved[ 4 ];
} IMAGE_LOAD_CONFIG_DIRECTORY,*LPIMAGE_LOAD_CONFIG_DIRECTORY;
typedef VOID (*LPIMAGE_TLS_CALLBACK)(
typedef VOID (CALLBACK *LPIMAGE_TLS_CALLBACK)(
LPVOID DllHandle,DWORD Reason,LPVOID Reserved
);
......
......@@ -7,7 +7,8 @@
#ifndef __WINE_STACKFRAME_H
#define __WINE_STACKFRAME_H
#include <windows.h>
#include <string.h>
#include "windows.h"
#include "ldt.h"
#pragma pack(1)
......@@ -25,7 +26,6 @@ typedef struct
WORD bp; /* 14 16-bit bp */
WORD ip; /* 16 return address */
WORD cs; /* 18 */
WORD args[1]; /* 1a arguments to API function */
} STACK16FRAME;
/* 32-bit stack layout after CallTo16() */
......@@ -48,14 +48,30 @@ typedef struct
/* Saved 16-bit stack for current process (Win16 only) */
extern DWORD IF1632_Saved16_ss_sp;
/* Saved 32-bit stack for current process (Win16 only) */
extern DWORD IF1632_Saved32_esp;
#define CURRENT_STACK16 ((STACK16FRAME *)PTR_SEG_TO_LIN(IF1632_Saved16_ss_sp))
#define CURRENT_DS (CURRENT_STACK16->ds)
/* Original Unix stack */
extern DWORD IF1632_Original32_esp;
/* varargs lists on the 16-bit stack */
#define CURRENT_STACK16 ((STACK16FRAME *)PTR_SEG_TO_LIN(IF1632_Saved16_ss_sp))
typedef void *VA_LIST16;
#define CURRENT_DS (CURRENT_STACK16->ds)
#define __VA_ROUNDED16(type) \
((sizeof(type) + sizeof(WORD) - 1) / sizeof(WORD) * sizeof(WORD))
#define VA_START16(list) ((list) = (VA_LIST16)(CURRENT_STACK16 + 1))
#define VA_ARG16(list,type) \
(((list) = (VA_LIST16)((char *)(list) + __VA_ROUNDED16(type))), \
*((type *)(void *)((char *)(list) - __VA_ROUNDED16(type))))
#define VA_END16(list) ((void)0)
/* Push bytes on the 16-bit stack; return a segptr to the first pushed byte */
#define STACK16_PUSH(size) \
(memmove((char*)CURRENT_STACK16-(size),CURRENT_STACK16,sizeof(STACK16FRAME)),\
IF1632_Saved16_ss_sp -= (size), \
(SEGPTR)(IF1632_Saved16_ss_sp + sizeof(STACK16FRAME)))
/* Pop bytes from the 16-bit stack */
#define STACK16_POP(size) \
(memmove((char*)CURRENT_STACK16+(size),CURRENT_STACK16,sizeof(STACK16FRAME)),\
IF1632_Saved16_ss_sp += (size))
#endif /* __WINE_STACKFRAME_H */
......@@ -12,30 +12,33 @@
struct SysColorObjects
{
HBRUSH32 hbrushScrollbar; /* COLOR_SCROLLBAR */
/* COLOR_BACKGROUND */
HBRUSH32 hbrushBackground; /* COLOR_BACKGROUND */
HBRUSH32 hbrushActiveCaption; /* COLOR_ACTIVECAPTION */
HBRUSH32 hbrushInactiveCaption; /* COLOR_INACTIVECAPTION */
HBRUSH32 hbrushMenu; /* COLOR_MENU */
HBRUSH32 hbrushWindow; /* COLOR_WINDOW */
HPEN32 hpenWindowFrame; /* COLOR_WINDOWFRAME */
/* COLOR_MENUTEXT */
HPEN32 hpenWindowText; /* COLOR_WINDOWTEXT */
/* COLOR_CAPTIONTEXT */
HBRUSH32 hbrushWindowFrame; /* COLOR_WINDOWFRAME */
HBRUSH32 hbrushMenuText; /* COLOR_MENUTEXT */
HBRUSH32 hbrushWindowText; /* COLOR_WINDOWTEXT */
HBRUSH32 hbrushCaptionText; /* COLOR_CAPTIONTEXT */
HBRUSH32 hbrushActiveBorder; /* COLOR_ACTIVEBORDER */
HBRUSH32 hbrushInactiveBorder; /* COLOR_INACTIVEBORDER */
/* COLOR_APPWORKSPACE */
HBRUSH32 hbrushAppWorkspace; /* COLOR_APPWORKSPACE */
HBRUSH32 hbrushHighlight; /* COLOR_HIGHLIGHT */
/* COLOR_HIGHLIGHTTEXT */
HBRUSH32 hbrushHighlightText; /* COLOR_HIGHLIGHTTEXT */
HBRUSH32 hbrushBtnFace; /* COLOR_BTNFACE */
HBRUSH32 hbrushBtnShadow; /* COLOR_BTNSHADOW */
/* COLOR_GRAYTEXT */
/* COLOR_BTNTEXT */
/* COLOR_INACTIVECAPTIONTEXT */
HBRUSH32 hbrushGrayText; /* COLOR_GRAYTEXT */
HBRUSH32 hbrushBtnText; /* COLOR_BTNTEXT */
HBRUSH32 hbrushInactiveCaptionText; /* COLOR_INACTIVECAPTIONTEXT */
HBRUSH32 hbrushBtnHighlight; /* COLOR_BTNHIGHLIGHT */
/* COLOR_3DDKSHADOW */
/* COLOR_3DLIGHT */
/* COLOR_INFOTEXT */
/* COLOR_INFOBK */
HBRUSH32 hbrush3DDkShadow; /* COLOR_3DDKSHADOW */
HBRUSH32 hbrush3DLight; /* COLOR_3DLIGHT */
HBRUSH32 hbrushInfoText; /* COLOR_INFOTEXT */
HBRUSH32 hbrushInfoBk; /* COLOR_INFOBK */
HPEN32 hpenWindowFrame; /* COLOR_WINDOWFRAME */
HPEN32 hpenWindowText; /* COLOR_WINDOWTEXT */
};
extern void SYSCOLOR_Init(void);
......
......@@ -18,6 +18,20 @@
#define INITPDEVICE 0x0000
#endif
#define OS_ARC 3
#define OS_SCANLINES 4
#define OS_RECTANGLE 6
#define OS_ELLIPSE 7
#define OS_MARKER 8
#define OS_POLYLINE 18
#define OS_ALTPOLYGON 22
#define OS_WINDPOLYGON 20
#define OS_PIE 23
#define OS_POLYMARKER 24
#define OS_CHORD 39
#define OS_CIRCLE 55
#define OS_ROUNDRECT 72
/* Internal Data */
#define ORD_BITBLT 1
#define ORD_COLORINFO 2
......@@ -89,7 +103,7 @@ typedef struct PRINTER_FONTS_INFO
typedef struct
{
char szDriver[9]; /* Driver name eg EPSON */
LPSTR szDriver; /* Driver name eg EPSON */
HINSTANCE16 hInst; /* Handle for driver */
WORD ds_reg; /* DS of driver */
FARPROC16 fn[TOTAL_PRINTER_DRIVER_FUNCTIONS]; /* Printer functions */
......@@ -97,9 +111,6 @@ typedef struct
int nPrinterFonts; /* Number of printer fonts */
PRINTER_FONTS_INFO *paPrinterFonts; /* array of printer fonts */
int nIndex; /* Index in global driver array */
HGLOBAL16 hThunk; /* Thunking buffer */
SEGPTR ThunkBufSegPtr;
SEGPTR ThunkBufLimit;
} LOADED_PRINTER_DRIVER;
typedef struct PDEVICE_HEADER
......@@ -150,6 +161,8 @@ typedef struct
LOGFONT16 lf; /* Current font details */
TEXTMETRIC16 tm; /* Current font metrics */
SEGPTR segptrFontInfo; /* Current font realized by printer driver */
SEGPTR segptrBrushInfo; /* Current brush realized by printer driver */
SEGPTR segptrPenInfo; /* Current pen realized by printer driver */
} WIN16DRV_PDEVICE;
/*
......@@ -187,6 +200,10 @@ extern BOOL32 WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRIC32A *metrics );
extern BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
const RECT32 *lprect, LPCSTR str, UINT32 count,
const INT32 *lpDx );
extern BOOL32 WIN16DRV_LineTo( DC *dc, INT32 x, INT32 y );
extern BOOL32 WIN16DRV_MoveToEx(DC *dc,INT32 x,INT32 y,LPPOINT32 pt);
extern BOOL32 WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count );
extern BOOL32 WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom);
extern HGDIOBJ32 WIN16DRV_SelectObject( DC *dc, HGDIOBJ32 handle );
extern BOOL32 WIN16DRV_PatBlt( struct tagDC *dc, INT32 left, INT32 top,
INT32 width, INT32 height, DWORD rop );
......@@ -202,3 +219,4 @@ extern SEGPTR win16drv_SegPtr_DrawMode;
extern LPDRAWMODE win16drv_DrawModeP;
#endif /* __WINE_WIN16DRV_H */
......@@ -1120,6 +1120,15 @@ typedef struct
FONTSIGNATURE fs;
} CHARSETINFO,*LPCHARSETINFO;
typedef struct
{
FLOAT eM11;
FLOAT eM12;
FLOAT eM21;
FLOAT eM22;
FLOAT eDx;
FLOAT eDy;
} XFORM, *LPXFORM;
typedef struct
{
......@@ -1432,14 +1441,16 @@ DECL_WINELIB_TYPE_AW(NEWTEXTMETRICEX);
DECL_WINELIB_TYPE_AW(LPNEWTEXTMETRICEX);
typedef INT16 (*FONTENUMPROC16)(SEGPTR,SEGPTR,UINT16,LPARAM);
typedef INT32 (*FONTENUMPROC32A)(LPENUMLOGFONT32A,LPNEWTEXTMETRIC32A,UINT32,LPARAM);
typedef INT32 (*FONTENUMPROC32W)(LPENUMLOGFONT32W,LPNEWTEXTMETRIC32W,UINT32,LPARAM);
typedef INT16 (CALLBACK *FONTENUMPROC16)(SEGPTR,SEGPTR,UINT16,LPARAM);
typedef INT32 (CALLBACK *FONTENUMPROC32A)(LPENUMLOGFONT32A,LPNEWTEXTMETRIC32A,
UINT32,LPARAM);
typedef INT32 (CALLBACK *FONTENUMPROC32W)(LPENUMLOGFONT32W,LPNEWTEXTMETRIC32W,
UINT32,LPARAM);
DECL_WINELIB_TYPE_AW(FONTENUMPROC);
typedef INT16 (*FONTENUMPROCEX16)(SEGPTR,SEGPTR,UINT16,LPARAM);
typedef INT32 (*FONTENUMPROCEX32A)(LPENUMLOGFONTEX32A,LPNEWTEXTMETRICEX32A,UINT32,LPARAM);
typedef INT32 (*FONTENUMPROCEX32W)(LPENUMLOGFONTEX32W,LPNEWTEXTMETRICEX32W,UINT32,LPARAM);
typedef INT16 (CALLBACK *FONTENUMPROCEX16)(SEGPTR,SEGPTR,UINT16,LPARAM);
typedef INT32 (CALLBACK *FONTENUMPROCEX32A)(LPENUMLOGFONTEX32A,LPNEWTEXTMETRICEX32A,UINT32,LPARAM);
typedef INT32 (CALLBACK *FONTENUMPROCEX32W)(LPENUMLOGFONTEX32W,LPNEWTEXTMETRICEX32W,UINT32,LPARAM);
DECL_WINELIB_TYPE_AW(FONTENUMPROCEX);
/* tmPitchAndFamily bits */
......@@ -1616,6 +1627,12 @@ DECL_WINELIB_TYPE(LPLOGPEN);
#define TRANSPARENT 1
#define OPAQUE 2
/* Graphics Modes */
#define GM_COMPATIBLE 1
#define GM_ADVANCED 2
#define GM_LAST 2
/* Map modes */
#define MM_TEXT 1
#define MM_LOMETRIC 2
......@@ -4274,8 +4291,10 @@ DECL_WINELIB_TYPE(LPMETAFILEPICT);
#define META_CREATEBITMAP 0x06FE
#define META_CREATEREGION 0x06FF
typedef INT16 (*MFENUMPROC16)(HDC16,HANDLETABLE16*,METARECORD*,INT16,LPARAM);
typedef INT32 (*MFENUMPROC32)(HDC32,HANDLETABLE32*,METARECORD*,INT32,LPARAM);
typedef INT16 (CALLBACK *MFENUMPROC16)(HDC16,HANDLETABLE16*,METARECORD*,
INT16,LPARAM);
typedef INT32 (CALLBACK *MFENUMPROC32)(HDC32,HANDLETABLE32*,METARECORD*,
INT32,LPARAM);
DECL_WINELIB_TYPE(MFENUMPROC);
#ifndef NOLOGERROR
......@@ -4844,14 +4863,13 @@ typedef struct _MEMORY_BASIC_INFORMATION
DWORD Type;
} MEMORY_BASIC_INFORMATION,*LPMEMORY_BASIC_INFORMATION;
typedef DWORD (*LPTHREAD_START_ROUTINE)(LPVOID);
typedef DWORD (CALLBACK *LPTHREAD_START_ROUTINE)(LPVOID);
typedef BOOL32 (*CODEPAGE_ENUMPROC32A)(LPSTR);
typedef BOOL32 (*CODEPAGE_ENUMPROC32W)(LPWSTR);
typedef BOOL32 (CALLBACK *CODEPAGE_ENUMPROC32A)(LPSTR);
typedef BOOL32 (CALLBACK *CODEPAGE_ENUMPROC32W)(LPWSTR);
DECL_WINELIB_TYPE_AW(CODEPAGE_ENUMPROC);
typedef BOOL32 (*LOCALE_ENUMPROC32A)(LPSTR);
typedef BOOL32 (*LOCALE_ENUMPROC32W)(LPWSTR);
typedef BOOL32 (CALLBACK *LOCALE_ENUMPROC32A)(LPSTR);
typedef BOOL32 (CALLBACK *LOCALE_ENUMPROC32W)(LPWSTR);
DECL_WINELIB_TYPE_AW(LOCALE_ENUMPROC);
typedef struct tagSYSTEM_INFO
......@@ -4889,8 +4907,8 @@ typedef struct tagSYSTEM_INFO
#define PROCESSOR_ALPHA_21064 21064
/* service main function prototype */
typedef VOID (*LPSERVICE_MAIN_FUNCTION32A)(DWORD,LPSTR);
typedef VOID (*LPSERVICE_MAIN_FUNCTION32W)(DWORD,LPWSTR);
typedef VOID (CALLBACK *LPSERVICE_MAIN_FUNCTION32A)(DWORD,LPSTR);
typedef VOID (CALLBACK *LPSERVICE_MAIN_FUNCTION32W)(DWORD,LPWSTR);
DECL_WINELIB_TYPE_AW(LPSERVICE_MAIN_FUNCTION);
/* service start table */
......@@ -5011,16 +5029,12 @@ DECL_WINELIB_TYPE_AW(LPSERVICE_TABLE_ENTRY);
#define PR_JOBSTATUS 0x0000
typedef BOOL32 (*ENUMRESTYPEPROC32A)(HMODULE32 hModule, LPSTR type,LONG lParam);
typedef BOOL32 (*ENUMRESTYPEPROC32W)(HMODULE32 hModule, LPWSTR type,LONG lParam);
typedef BOOL32 (*ENUMRESNAMEPROC32A)(HMODULE32 hModule, LPCSTR type,
LPSTR name,LONG lParam);
typedef BOOL32 (*ENUMRESNAMEPROC32W)(HMODULE32 hModule, LPCWSTR type,
LPWSTR name,LONG lParam);
typedef BOOL32 (*ENUMRESLANGPROC32A)(HMODULE32 hModule, LPCSTR type,
LPCSTR name,WORD lang,LONG lParam);
typedef BOOL32 (*ENUMRESLANGPROC32W)(HMODULE32 hModule, LPCWSTR type,
LPCWSTR name,WORD lang,LONG lParam);
typedef BOOL32 (CALLBACK *ENUMRESTYPEPROC32A)(HMODULE32,LPSTR,LONG);
typedef BOOL32 (CALLBACK *ENUMRESTYPEPROC32W)(HMODULE32,LPWSTR,LONG);
typedef BOOL32 (CALLBACK *ENUMRESNAMEPROC32A)(HMODULE32,LPCSTR,LPSTR,LONG);
typedef BOOL32 (CALLBACK *ENUMRESNAMEPROC32W)(HMODULE32,LPCWSTR,LPWSTR,LONG);
typedef BOOL32 (CALLBACK *ENUMRESLANGPROC32A)(HMODULE32,LPCSTR,LPCSTR,WORD,LONG);
typedef BOOL32 (CALLBACK *ENUMRESLANGPROC32W)(HMODULE32,LPCWSTR,LPCWSTR,WORD,LONG);
DECL_WINELIB_TYPE_AW(ENUMRESTYPEPROC);
DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC);
......@@ -5496,6 +5510,9 @@ BOOL32 WINAPI GetMenuItemInfo32W(HMENU32,UINT32,BOOL32,MENUITEMINFO32W*);
#define GetMenuItemInfo WINELIB_NAME_AW(GetMenuItemInfo)
UINT32 WINAPI GetOEMCP(void);
DWORD WINAPI GetPriorityClass(HANDLE32);
INT32 WINAPI GetPrivateProfileSection32A(LPCSTR,LPSTR,INT32,LPCSTR);
INT32 WINAPI GetPrivateProfileSection32W(LPCWSTR,LPWSTR,INT32,LPCWSTR);
#define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
HANDLE32 WINAPI GetProcessHeap(void);
DWORD WINAPI GetShortPathName32A(LPCSTR,LPSTR,DWORD);
DWORD WINAPI GetShortPathName32W(LPCWSTR,LPWSTR,DWORD);
......@@ -5529,7 +5546,7 @@ BOOL32 WINAPI HeapLock(HANDLE32);
LPVOID WINAPI HeapReAlloc(HANDLE32,DWORD,LPVOID,DWORD);
DWORD WINAPI HeapSize(HANDLE32,DWORD,LPVOID);
BOOL32 WINAPI HeapUnlock(HANDLE32);
BOOL32 WINAPI HeapValidate(HANDLE32,DWORD,LPVOID);
BOOL32 WINAPI HeapValidate(HANDLE32,DWORD,LPCVOID);
BOOL32 WINAPI IsDBCSLeadByteEx(UINT32,BYTE);
BOOL32 WINAPI IsWindowUnicode(HWND32);
BOOL32 WINAPI IsValidLocale(DWORD,DWORD);
......@@ -6482,6 +6499,9 @@ DWORD WINAPI GetFileVersionInfo32W(LPCWSTR,DWORD,DWORD,LPVOID);
HWND16 WINAPI GetFocus16(void);
HWND32 WINAPI GetFocus32(void);
#define GetFocus WINELIB_NAME(GetFocus)
HWND16 WINAPI GetForegroundWindow16(void);
HWND32 WINAPI GetForegroundWindow32(void);
#define GetForegroundWindow WINELIB_NAME(GetForegroundWindow)
DWORD WINAPI GetFreeSpace16(UINT16);
#define GetFreeSpace32(w) (0x100000L)
#define GetFreeSpace WINELIB_NAME(GetFreeSpace)
......@@ -6641,6 +6661,9 @@ INT32 WINAPI GetScrollPos32(HWND32,INT32);
BOOL16 WINAPI GetScrollRange16(HWND16,INT16,LPINT16,LPINT16);
BOOL32 WINAPI GetScrollRange32(HWND32,INT32,LPINT32,LPINT32);
#define GetScrollRange WINELIB_NAME(GetScrollRange)
HWND16 WINAPI GetShellWindow16(void);
HWND32 WINAPI GetShellWindow32(void);
#define GetShellWindow WINELIB_NAME(GetShellWindow)
HGDIOBJ16 WINAPI GetStockObject16(INT16);
HGDIOBJ32 WINAPI GetStockObject32(INT32);
#define GetStockObject WINELIB_NAME(GetStockObject)
......@@ -7428,6 +7451,9 @@ BOOL32 WINAPI SetFileAttributes32W(LPCWSTR,DWORD);
HWND16 WINAPI SetFocus16(HWND16);
HWND32 WINAPI SetFocus32(HWND32);
#define SetFocus WINELIB_NAME(SetFocus)
BOOL16 WINAPI SetForegroundWindow16(HWND16);
BOOL32 WINAPI SetForegroundWindow32(HWND32);
#define SetForegroundWindow WINELIB_NAME(SetForegroundWindow)
UINT16 WINAPI SetHandleCount16(UINT16);
UINT32 WINAPI SetHandleCount32(UINT32);
#define SetHandleCount WINELIB_NAME(SetHandleCount)
......
......@@ -126,6 +126,7 @@ typedef HANDLE32 HMIXEROBJ;
typedef DWORD LCID;
typedef WORD LANGID;
typedef DWORD LCTYPE;
typedef float FLOAT;
/* Pointers types. These are the same for emulator and library. */
......@@ -145,6 +146,7 @@ typedef INT32 *LPINT32;
typedef UINT32 *LPUINT32;
typedef HKEY *LPHKEY;
typedef HMIXEROBJ *LPHMIXEROBJ;
typedef FLOAT *LPFLOAT;
/* Special case: a segmented pointer is just a pointer in the user's code. */
......
......@@ -7,7 +7,6 @@ MODULE = none
LIBMODULE = library
LIB_SRCS = \
arch.c \
libres.c \
miscstubs.c
......
/*
* Big endian structure conversion routines
*
* Copyright Miguel de Icaza, 1994
*/
#include "arch.h"
#include "windows.h"
void ARCH_ConvBitmapInfo (BITMAPINFOHEADER *image)
{
image->biSize = CONV_LONG (image->biSize);
image->biWidth = CONV_LONG (image->biWidth);
image->biHeight = CONV_LONG (image->biHeight);
image->biPlanes = CONV_SHORT (image->biPlanes);
image->biBitCount = CONV_SHORT (image->biBitCount);
image->biCompression = CONV_LONG (image->biCompression);
image->biSizeImage = CONV_LONG (image->biSizeImage);
image->biXPelsPerMeter = CONV_LONG (image->biXPelsPerMeter);
image->biYPelsPerMeter = CONV_LONG (image->biYPelsPerMeter);
image->biClrUsed = CONV_LONG (image->biClrUsed);
image->biClrImportant = CONV_LONG (image->biClrImportant);
}
void ARCH_ConvCoreHeader (BITMAPCOREHEADER *image)
{
image->bcSize = CONV_LONG (image->bcSize);
image->bcWidth = CONV_SHORT (image->bcWidth);
image->bcHeight = CONV_SHORT (image->bcHeight);
image->bcPlanes = CONV_SHORT (image->bcPlanes);
image->bcBitCount = CONV_SHORT (image->bcBitCount);
}
......@@ -7,10 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "windows.h"
#include "dde_mem.h"
#include "global.h"
#include "debug.h"
#include "wintypes.h"
/* for windows/winproc.c */
......
......@@ -417,6 +417,7 @@ HMODULE32 MODULE_CreateDummyModule( const OFSTRUCT *ofs )
NE_MODULE *pModule;
SEGTABLEENTRY *pSegment;
char *pStr,*s;
int len;
const char* basename;
INT32 of_size = sizeof(OFSTRUCT) - sizeof(ofs->szPathName)
......@@ -473,19 +474,15 @@ HMODULE32 MODULE_CreateDummyModule( const OFSTRUCT *ofs )
/* Module name */
pStr = (char *)pSegment;
pModule->name_table = (int)pStr - (int)pModule;
/* strcpy( pStr, "\x08W32SXXXX" ); */
basename = strrchr(ofs->szPathName,'\\');
if (!basename)
basename=ofs->szPathName;
else
basename++;
basename=strdup(basename);
if ((s=strchr(basename,'.')))
*s='\0';
*pStr = strlen(basename);
if (*pStr>8) *pStr=8;
strncpy( pStr+1, basename, 8 );
free((void*)basename);
if (!basename) basename = ofs->szPathName;
else basename++;
len = strlen(basename);
if ((s = strchr(basename,'.'))) len = s - basename;
if (len > 8) len = 8;
*pStr = len;
strncpy( pStr+1, basename, len );
if (len < 8) pStr[len+1] = 0;
pStr += 9;
/* All tables zero terminated */
......@@ -1609,7 +1606,7 @@ HINSTANCE32 WINAPI WinExec32( LPCSTR lpCmdLine, UINT32 nCmdShow )
return 2; /* File not found */
if (!(cmdShowHandle = GlobalAlloc16( 0, 2 * sizeof(WORD) )))
return 8; /* Out of memory */
if (!(cmdLineHandle = GlobalAlloc16( 0, 256 )))
if (!(cmdLineHandle = GlobalAlloc16( 0, 2048 )))
{
GlobalFree16( cmdShowHandle );
return 8; /* Out of memory */
......@@ -1660,6 +1657,11 @@ HINSTANCE32 WINAPI WinExec32( LPCSTR lpCmdLine, UINT32 nCmdShow )
cmdline[0] = strlen( cmdline + 1 );
*p = '\0';
/* this is a (hopefully acceptable hack to get the whole
commandline for PROCESS_Create
we put it after the processed one */
lstrcpyn32A(cmdline + (unsigned char)cmdline[0] +2,
lpCmdLine, 2048 - 256);
/* Now load the executable file */
......
......@@ -18,7 +18,6 @@
#include "neexe.h"
#include "windows.h"
#include "task.h"
#include "arch.h"
#include "selectors.h"
#include "callback.h"
#include "file.h"
......
......@@ -14,7 +14,6 @@
#include <fcntl.h>
#include <unistd.h>
#include "windows.h"
#include "arch.h"
#include "global.h"
#include "ldt.h"
#include "module.h"
......@@ -264,11 +263,8 @@ HRSRC16 NE_FindResource( HMODULE16 hModule, SEGPTR typeId, SEGPTR resId )
if (!pModule || !pModule->res_table) return 0;
pTypeInfo = (NE_TYPEINFO *)((char *)pModule + pModule->res_table + 2);
if ((pModule->expected_version < 0x030a) && (HIWORD(typeId) || HIWORD(resId)))
if (HIWORD(typeId) || HIWORD(resId))
{
/* Search the names in the nametable (which is not present
* since Windows 3.1). */
DWORD id = NE_FindNameTableId( pModule, typeId, resId );
if (id) /* found */
{
......
......@@ -12,7 +12,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "arch.h"
#include "windows.h"
#include "gdi.h"
#include "global.h"
......
......@@ -434,7 +434,7 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
STACK16FRAME *frame16;
STACK32FRAME *frame32;
#ifndef WINELIB32
extern DWORD CALLTO16_RetAddr_word;
extern DWORD CALLTO16_RetAddr_regs;
extern void CALLTO16_Restore();
#endif
......@@ -586,8 +586,8 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
pTask->ss_sp = PTR_SEG_OFF_TO_SEGPTR( hInstance,
((pModule->sp != 0) ? pModule->sp :
pSegTable[pModule->ss-1].minsize + pModule->stack_size) & ~1 );
pTask->ss_sp -= sizeof(DWORD); /* To store saved %%esp */
frame16 = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->ss_sp ) - 1;
pTask->ss_sp -= sizeof(STACK16FRAME) - sizeof(DWORD) /* for saved %esp */;
frame16 = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->ss_sp );
frame16->saved_ss_sp = 0;
frame16->ebp = 0;
frame16->ds = frame16->es = pTask->hInstance;
......@@ -595,13 +595,11 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
frame16->entry_ip = OFFSETOF(TASK_RescheduleProc) + 14;
frame16->entry_cs = SELECTOROF(TASK_RescheduleProc);
frame16->bp = 0;
frame16->args[0] = LOWORD(frame32);
frame16->args[1] = HIWORD(frame32);
*(DWORD *)(frame16 + 1) = frame32; /* Store the 32-bit stack pointer */
#ifndef WINELIB
frame16->ip = LOWORD( CALLTO16_RetAddr_word );
frame16->cs = HIWORD( CALLTO16_RetAddr_word );
frame16->ip = LOWORD( CALLTO16_RetAddr_regs );
frame16->cs = HIWORD( CALLTO16_RetAddr_regs );
#endif /* WINELIB */
pTask->ss_sp -= sizeof(STACK16FRAME);
/* If there's no 16-bit stack yet, use a part of the new task stack */
/* This is only needed to have a stack to switch from on the first */
......@@ -1180,14 +1178,17 @@ void WINAPI SwitchStackTo( WORD seg, WORD ptr, WORD top )
/* Switch to the new stack */
/* Note: we need to take the 3 arguments into account; otherwise,
* the stack will underflow upon return from this function.
*/
IF1632_Saved16_ss_sp = PTR_SEG_OFF_TO_SEGPTR( seg,
ptr - sizeof(STACK16FRAME) );
ptr - sizeof(STACK16FRAME) - 3 * sizeof(WORD) );
newFrame = CURRENT_STACK16;
/* Copy the stack frame and the local variables to the new stack */
copySize = oldFrame->bp - OFFSETOF(pData->old_ss_sp);
memcpy( newFrame, oldFrame, MAX( copySize, sizeof(STACK16FRAME) ));
memmove( newFrame, oldFrame, MAX( copySize, sizeof(STACK16FRAME) ));
}
......
......@@ -846,7 +846,7 @@ BOOL16 WINAPI MemManInfo( MEMMANINFO *info )
#define MAGIC_GLOBAL_USED 0x5342
#define GLOBAL_LOCK_MAX 0xFF
#define HANDLE_TO_INTERN(h) (PGLOBAL32_INTERN)(((char *)(h))-2)
#define HANDLE_TO_INTERN(h) ((PGLOBAL32_INTERN)(((char *)(h))-2))
#define INTERN_TO_HANDLE(i) ((HGLOBAL32) &((i)->Pointer))
#define POINTER_TO_HANDLE(p) (*(((HGLOBAL32 *)(p))-1))
#define ISHANDLE(h) (((DWORD)(h)&2)!=0)
......@@ -970,7 +970,18 @@ BOOL32 WINAPI GlobalUnlock32(HGLOBAL32 hmem)
*/
HGLOBAL32 WINAPI GlobalHandle32(LPCVOID pmem)
{
return (HGLOBAL32) POINTER_TO_HANDLE(pmem);
HGLOBAL32 handle = POINTER_TO_HANDLE(pmem);
if (HEAP_IsInsideHeap( GetProcessHeap(), 0, (LPCVOID)handle ))
{
if (HANDLE_TO_INTERN(handle)->Magic == MAGIC_GLOBAL_USED)
return handle; /* valid moveable block */
}
/* maybe FIXED block */
if (HeapValidate( GetProcessHeap(), 0, pmem ))
return (HGLOBAL32)pmem; /* valid fixed block */
SetLastError( ERROR_INVALID_HANDLE );
return 0;
}
......
......@@ -1142,7 +1142,7 @@ DWORD WINAPI HeapSize( HANDLE32 heap, DWORD flags, LPVOID ptr )
/***********************************************************************
* HeapValidate (KERNEL32.343)
*/
BOOL32 WINAPI HeapValidate( HANDLE32 heap, DWORD flags, LPVOID block )
BOOL32 WINAPI HeapValidate( HANDLE32 heap, DWORD flags, LPCVOID block )
{
SUBHEAP *subheap;
HEAP *heapPtr = (HEAP *)heap;
......
......@@ -11,6 +11,7 @@ C_SRCS = \
compobj.c \
crtdll.c \
cpu.c \
ddeml.c \
error.c \
lstr.c \
lzexpand.c \
......
......@@ -1112,15 +1112,15 @@ LRESULT WINAPI ReplaceTextDlgProc(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
/***********************************************************************
* PrintDlg (COMMDLG.20)
* PrintDlg16 (COMMDLG.20)
*/
BOOL16 WINAPI PrintDlg( SEGPTR printdlg )
BOOL16 WINAPI PrintDlg16( SEGPTR printdlg )
{
HANDLE16 hInst;
BOOL16 bRet = FALSE;
LPCVOID template;
HWND32 hwndDialog;
LPPRINTDLG lpPrint = (LPPRINTDLG)PTR_SEG_TO_LIN(printdlg);
LPPRINTDLG16 lpPrint = (LPPRINTDLG16)PTR_SEG_TO_LIN(printdlg);
dprintf_commdlg(stddeb,"PrintDlg(%p) // Flags=%08lX\n", lpPrint, lpPrint->Flags );
......@@ -1146,6 +1146,26 @@ BOOL16 WINAPI PrintDlg( SEGPTR printdlg )
/***********************************************************************
* PrintDlg32A (COMDLG32.17)
*/
BOOL32 WINAPI PrintDlg32A( LPPRINTDLG32A printdlg )
{
fprintf( stdnimp, "PrintDlg32A: empty stub\n" );
return FALSE;
}
/***********************************************************************
* PrintDlg32W (COMDLG32.18)
*/
BOOL32 WINAPI PrintDlg32W( LPPRINTDLG32W printdlg )
{
fprintf( stdnimp, "PrintDlg32A: empty stub\n" );
return FALSE;
}
/***********************************************************************
* PrintDlgProc (COMMDLG.21)
*/
LRESULT WINAPI PrintDlgProc(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
......
......@@ -39,6 +39,8 @@ Unresolved issues Uwe Bonnes 970904:
#include "crtdll.h"
#include "drive.h"
#include "file.h"
#include "except.h"
#include "options.h"
extern int FILE_GetUnixHandle( HFILE32 );
......@@ -52,9 +54,12 @@ LPSTR CRTDLL_acmdln_dll; /* CRTDLL.38 */
UINT32 CRTDLL_basemajor_dll; /* CRTDLL.42 */
UINT32 CRTDLL_baseminor_dll; /* CRTDLL.43 */
UINT32 CRTDLL_baseversion_dll; /* CRTDLL.44 */
UINT32 CRTDLL_commode_dll; /* CRTDLL.59 */
LPSTR CRTDLL_environ_dll; /* CRTDLL.75 */
UINT32 CRTDLL_fmode_dll; /* CRTDLL.104 */
UINT32 CRTDLL_osmajor_dll; /* CRTDLL.241 */
UINT32 CRTDLL_osminor_dll; /* CRTDLL.242 */
UINT32 CRTDLL_osmode_dll; /* CRTDLL.243 */
UINT32 CRTDLL_osver_dll; /* CRTDLL.244 */
UINT32 CRTDLL_osversion_dll; /* CRTDLL.245 */
UINT32 CRTDLL_winmajor_dll; /* CRTDLL.329 */
......@@ -171,6 +176,29 @@ DWORD __cdecl CRTDLL__fdopen(INT32 handle, LPCSTR mode)
return (DWORD)file;
}
/*******************************************************************
* _global_unwind2 (CRTDLL.129)
*/
void __cdecl CRTDLL__global_unwind2( CONTEXT *context )
{
/* Retrieve the arguments (args[0] is return addr, args[1] is first arg) */
DWORD *args = (DWORD *)ESP_reg(context);
RtlUnwind( (PEXCEPTION_FRAME)args[1], (LPVOID)EIP_reg(context),
NULL, 0, context );
}
/*******************************************************************
* _local_unwind2 (CRTDLL.173)
*/
void __cdecl CRTDLL__local_unwind2( CONTEXT *context )
{
/* Retrieve the arguments (args[0] is return addr, args[1] is first arg) */
DWORD *args = (DWORD *)ESP_reg(context);
PEXCEPTION_FRAME endframe = (PEXCEPTION_FRAME)args[1];
DWORD nr = args[2];
fprintf(stderr,"CRTDLL__local_unwind2(%p,%ld)\n",endframe,nr);
}
/*********************************************************************
* fopen (CRTDLL.372)
*/
......@@ -700,10 +728,14 @@ LPSTR CRTDLL__strlwr(LPSTR x)
INT32 CRTDLL_system(LPSTR x)
{
#define SYSBUF_LENGTH 1500
char buffer[SYSBUF_LENGTH]="wine \"";
unsigned char *y =x;
unsigned char *bp =buffer+strlen(buffer);
int i =strlen(buffer) + strlen(x) +2;
char buffer[SYSBUF_LENGTH];
unsigned char *y = x;
unsigned char *bp;
int i;
sprintf( buffer, "%s \"", Options.argv0 );
bp = buffer + strlen(buffer);
i = strlen(buffer) + strlen(x) +2;
/* Calculate needed buffer size tp prevent overflow*/
while (*y) {
......@@ -854,7 +886,7 @@ LPSTR __cdecl CRTDLL__strdup(LPSTR ptr)
INT32 __cdecl CRTDLL_fclose( FILE *stream )
{
int unix_handle=fileno(stream);
HFILE32 dos_handle=3;
HFILE32 dos_handle=1;
HFILE32 ret=EOF;
if (unix_handle<4) ret= fclose(stream);
......
/*
* DDEML library
*
* Copyright 1997 Alexandre Julliard
*/
/* Only empty stubs for now */
#include <stdio.h>
#include "ddeml.h"
#include "stddebug.h"
#include "debug.h"
/*****************************************************************
* DdeInitialize16 (DDEML.2)
*/
UINT16 WINAPI DdeInitialize16( LPDWORD pidInst, PFNCALLBACK16 pfnCallback,
DWORD afCmd, DWORD ulRes)
{
fprintf( stdnimp, "DdeInitialize16: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeInitialize32A (USER32.106)
*/
UINT32 WINAPI DdeInitialize32A( LPDWORD pidInst, PFNCALLBACK32 pfnCallback,
DWORD afCmd, DWORD ulRes )
{
fprintf( stdnimp, "DdeInitialize32A: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeInitialize32W (USER32.107)
*/
UINT32 WINAPI DdeInitialize32W( LPDWORD pidInst, PFNCALLBACK32 pfnCallback,
DWORD afCmd, DWORD ulRes )
{
fprintf( stdnimp, "DdeInitialize32W: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeUninitialize16 (DDEML.3)
*/
BOOL16 WINAPI DdeUninitialize16( DWORD idInst )
{
return (BOOL16)DdeUninitialize32( idInst );
}
/*****************************************************************
* DdeUninitialize32 (USER32.119)
*/
BOOL32 WINAPI DdeUninitialize32( DWORD idInst )
{
fprintf( stdnimp, "DdeUninitialize: empty stub\n" );
return TRUE;
}
/*****************************************************************
* DdeConnect16 (DDEML.7)
*/
HCONV WINAPI DdeConnect16( DWORD idInst, HSZ hszService, HSZ hszTopic,
LPCONVCONTEXT16 pCC )
{
fprintf( stdnimp, "DdeConnect16: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeConnect32 (USER32.92)
*/
HCONV WINAPI DdeConnect32( DWORD idInst, HSZ hszService, HSZ hszTopic,
LPCONVCONTEXT32 pCC )
{
fprintf( stdnimp, "DdeConnect32: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeDisconnect16 (DDEML.8)
*/
BOOL16 WINAPI DdeDisconnect16( HCONV hConv )
{
return (BOOL16)DdeDisconnect32( hConv );
}
/*****************************************************************
* DdeDisconnect32 (USER32.97)
*/
BOOL32 WINAPI DdeDisconnect32( HCONV hConv )
{
fprintf( stdnimp, "DdeDisconnect: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeReconnect (DDEML.37) (USER32.115)
*/
HCONV WINAPI DdeReconnect( HCONV hConv )
{
fprintf( stdnimp, "DdeReconnect: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeCreateStringHandle16 (DDEML.21)
*/
HSZ WINAPI DdeCreateStringHandle16( DWORD idInst, LPCSTR str, INT16 codepage )
{
return DdeCreateStringHandle32A( idInst, str, codepage );
}
/*****************************************************************
* DdeCreateStringHandle32A (USER32.95)
*/
HSZ WINAPI DdeCreateStringHandle32A( DWORD idInst, LPCSTR psz, INT32 codepage )
{
fprintf( stdnimp, "DdeCreateStringHandle32A: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeCreateStringHandle32W (USER32.96)
*/
HSZ WINAPI DdeCreateStringHandle32W( DWORD idInst, LPCWSTR psz, INT32 codepage)
{
fprintf( stdnimp, "DdeCreateStringHandle32W: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeFreeStringHandle16 (DDEML.22)
*/
BOOL16 WINAPI DdeFreeStringHandle16( DWORD idInst, HSZ hsz )
{
return (BOOL32)DdeFreeStringHandle32( idInst, hsz );
}
/*****************************************************************
* DdeFreeStringHandle32 (USER32.101)
*/
BOOL32 WINAPI DdeFreeStringHandle32( DWORD idInst, HSZ hsz )
{
fprintf( stdnimp, "DdeFreeStringHandle: empty stub\n" );
return TRUE;
}
/*****************************************************************
* DdeFreeDataHandle16 (DDEML.19)
*/
BOOL16 WINAPI DdeFreeDataHandle16( HDDEDATA hData )
{
return (BOOL32)DdeFreeDataHandle32( hData );
}
/*****************************************************************
* DdeFreeDataHandle32 (USER32.100)
*/
BOOL32 WINAPI DdeFreeDataHandle32( HDDEDATA hData )
{
fprintf( stdnimp, "DdeFreeDataHandle: empty stub\n" );
return TRUE;
}
/*****************************************************************
* DdeKeepStringHandle16 (DDEML.24)
*/
BOOL16 WINAPI DdeKeepStringHandle16( DWORD idInst, HSZ hsz )
{
return (BOOL32)DdeKeepStringHandle32( idInst, hsz );
}
/*****************************************************************
* DdeKeepStringHandle32 (USER32.108)
*/
BOOL32 WINAPI DdeKeepStringHandle32( DWORD idInst, HSZ hsz )
{
fprintf( stdnimp, "DdeKeepStringHandle: empty stub\n" );
return TRUE;
}
/*****************************************************************
* DdeClientTransaction16 (DDEML.11)
*/
HDDEDATA WINAPI DdeClientTransaction16( LPVOID pData, DWORD cbData,
HCONV hConv, HSZ hszItem, UINT16 wFmt,
UINT16 wType, DWORD dwTimeout,
LPDWORD pdwResult )
{
return DdeClientTransaction32( (LPBYTE)pData, cbData, hConv, hszItem,
wFmt, wType, dwTimeout, pdwResult );
}
/*****************************************************************
* DdeClientTransaction32 (USER32.90)
*/
HDDEDATA WINAPI DdeClientTransaction32( LPBYTE pData, DWORD cbData,
HCONV hConv, HSZ hszItem, UINT32 wFmt,
UINT32 wType, DWORD dwTimeout,
LPDWORD pdwResult )
{
fprintf( stdnimp, "DdeClientTransaction: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeNameService16 (DDEML.27)
*/
HDDEDATA WINAPI DdeNameService16( DWORD idInst, HSZ hsz1, HSZ hsz2,
UINT16 afCmd )
{
return DdeNameService32( idInst, hsz1, hsz2, afCmd );
}
/*****************************************************************
* DdeNameService32 (USER32.109)
*/
HDDEDATA WINAPI DdeNameService32( DWORD idInst, HSZ hsz1, HSZ hsz2,
UINT32 afCmd )
{
fprintf( stdnimp, "DdeNameService: empty stub\n" );
return 0;
}
/*****************************************************************
* DdeGetLastError16 (DDEML.20)
*/
UINT16 WINAPI DdeGetLastError16( DWORD idInst )
{
return (UINT16)DdeGetLastError32( idInst );
}
/*****************************************************************
* DdeGetLastError32 (USER32.103)
*/
UINT32 WINAPI DdeGetLastError32( DWORD idInst )
{
fprintf( stdnimp, "DdeGetLastError: empty stub\n" );
return 0;
}
......@@ -132,7 +132,7 @@ SEGPTR WINAPI AnsiPrev16( SEGPTR start, SEGPTR current )
void WINAPI OutputDebugString16( LPCSTR str )
{
char *module;
char *p, *buffer = HeapAlloc( GetProcessHeap(), 0, strlen(str)+1 );
char *p, *buffer = HeapAlloc( GetProcessHeap(), 0, strlen(str)+2 );
/* Remove CRs */
for (p = buffer; *str; str++) if (*str != '\r') *p++ = *str;
*p = '\0';
......
......@@ -205,6 +205,7 @@ struct options Options =
{ /* default options */
NULL, /* desktopGeometry */
NULL, /* programName */
NULL, /* argv0 */
FALSE, /* usePrivateMap */
FALSE, /* useFixedMap */
FALSE, /* synchronous */
......@@ -484,6 +485,7 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
char *xrm_string;
Options.programName = MAIN_GetProgramName( *argc, argv );
Options.argv0 = argv[0];
/* Get display name from command line */
for (i = 1; i < *argc - 1; i++)
......
......@@ -510,27 +510,12 @@ DWORD WINAPI NtOpenFile(DWORD x1,DWORD flags,DWORD x3,DWORD x4,DWORD alignment,D
/* returns file io completion status */
return 0;
}
/*
These functions were originally in CRTDLL. CRTFLL now call the C-Lib
function directly. So they were moved here
*/
/*********************************************************************
* atoi (NDLL.885)
*/
INT32 NTDLL_atoi(LPCSTR x)
{
if (!x) return 0;
return atoi(x);
}
/*********************************************************************
* atol (NTDLL.886)
/**************************************************************************
* NTDLL_chkstk (NTDLL.862)
*/
LONG NTDLL_atol(LPCSTR x)
void NTDLL_chkstk(void)
{
if (!x) return 0;
return atol(x);
/* FIXME: should subtract %eax bytes from stack pointer */
}
......@@ -22,7 +22,7 @@ DWORD WINAPI OleBuildVersion()
}
/***********************************************************************
* OleInitialize [OLE2.2]
* OleInitialize (OLE2.2) (OLE32.108)
*/
HRESULT WINAPI OleInitialize(LPVOID reserved)
{
......@@ -31,9 +31,9 @@ HRESULT WINAPI OleInitialize(LPVOID reserved)
}
/***********************************************************************
* OleUnitialize [OLE2.3]
* OleUnitialize (OLE2.3) (OLE32.131)
*/
void WINAPI OleUninitialize()
void WINAPI OleUninitialize(void)
{
dprintf_ole(stdnimp,"OleUninitialize()\n");
}
......
......@@ -1048,3 +1048,8 @@ void WINAPI Control_RunDLL(DWORD a1,DWORD a2,LPSTR a3,DWORD a4) {
a1,a2,a3,a4
);
}
void WINAPI FreeIconList( DWORD dw )
{
fprintf( stdnimp, "FreeIconList: empty stub\n" );
}
......@@ -416,7 +416,8 @@ DWORD WINAPI GetFileResourceSize(LPCSTR filename,SEGPTR restype,SEGPTR resid,
HFILE32 lzfd;
OFSTRUCT ofs;
BYTE *resdata = NULL;
int reslen,res;
int reslen=0;
int res=0;
dprintf_ver(stddeb,"GetFileResourceSize(%s,%lx,%lx,%p)\n",
filename,(LONG)restype,(LONG)resid,off
......@@ -452,7 +453,8 @@ DWORD WINAPI GetFileResource(LPCSTR filename,SEGPTR restype,SEGPTR resid,
HFILE32 lzfd;
OFSTRUCT ofs;
BYTE *resdata=NULL;
int res,reslen=datalen;
int res=0;
int reslen=datalen;
dprintf_ver(stddeb,"GetFileResource(%s,%lx,%lx,%ld,%ld,%p)\n",
filename,(LONG)restype,(LONG)resid,off,datalen,data
......@@ -1196,7 +1198,7 @@ _find_dataA(BYTE *block,LPCSTR str, WORD buff_remain) {
}
/* this one used for Win32 resources, which are always in UNICODE format */
extern LPWSTR CRTDLL_wcschr(LPWSTR str,WCHAR xchar);
extern LPWSTR CRTDLL_wcschr(LPCWSTR str,WCHAR xchar);
static BYTE*
_find_dataW(BYTE *block,LPCWSTR str, WORD buff_remain) {
LPWSTR nextslash;
......
......@@ -629,6 +629,9 @@ INT32 WINAPI WINSOCK_connect32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
/* application did AsyncSelect() but then went
* ahead and called connect() without waiting for
* notification.
*
* FIXME: Do we have to post a notification message
* in this case?
*/
if( !(pws->flags & WS_FD_CONNECTED) )
......@@ -641,10 +644,10 @@ INT32 WINAPI WINSOCK_connect32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
EVENT_AddIO( pws->fd, EVENT_IO_WRITE );
else
EVENT_DeleteIO( pws->fd, EVENT_IO_WRITE );
pws->flags |= WS_FD_CONNECTED;
}
}
pws->flags &= ~(WS_FD_INACTIVE | WS_FD_CONNECT);
pws->flags |= WS_FD_CONNECTED;
pws->flags &= ~(WS_FD_INACTIVE | WS_FD_CONNECT | WS_FD_LISTENING);
return 0;
}
pwsi->err = (errno == EINPROGRESS) ? WSAEWOULDBLOCK : wsaErrno();
......@@ -899,14 +902,17 @@ INT32 WINAPI WINSOCK_listen32(SOCKET32 s, INT32 backlog)
(unsigned)pwsi, s, backlog);
if( _check_ws(pwsi, pws) )
{
if (listen(pws->fd, backlog) == 0)
{
if( !pws->psop )
{
int fd_flags = fcntl(pws->fd, F_GETFL, 0);
if( !(fd_flags & O_NONBLOCK) ) pws->flags |= WS_FD_ACCEPT;
}
else if( !(pws->flags & WS_FD_CONNECTED) ) pws->flags |= WS_FD_LISTENING;
if (listen(pws->fd, backlog) == 0) return 0;
pws->flags |= WS_FD_LISTENING;
pws->flags &= ~(WS_FD_INACTIVE | WS_FD_CONNECTED); /* just in case */
return 0;
}
pwsi->err = wsaErrno();
}
else if( pwsi ) pwsi->err = WSAENOTSOCK;
......@@ -1816,6 +1822,9 @@ BOOL32 WINSOCK_HandleIO( int* max_fd, int num_pending, fd_set io_set[3] )
if((flags & WS_FD_ACCEPT) && (flags & WS_FD_LISTENING))
{
/* WS_FD_ACCEPT is valid only if the socket is in the
* listening state */
FD_CLR( fd, &io_set[EVENT_IO_WRITE] );
if( r )
{
......
......@@ -10,6 +10,8 @@
#include "windows.h"
#include "ldt.h"
#include "stackframe.h"
#include "debug.h"
#include "stddebug.h"
#define WPRINTF_LEFTALIGN 0x0001 /* Align output on the left ('-' prefix) */
#define WPRINTF_PREFIX_HEX 0x0002 /* Prefix hex with 0x ('#' prefix) */
......@@ -249,35 +251,27 @@ INT16 WINAPI wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec,
{
case WPR_WCHAR: /* No Unicode in Win16 */
case WPR_CHAR:
cur_arg = (DWORD)*(CHAR *)args;
args = (WORD *)args + 1;
cur_arg = (DWORD)VA_ARG16( args, CHAR );
break;
case WPR_WSTRING: /* No Unicode in Win16 */
case WPR_STRING:
if (IsBadReadPtr16( *(SEGPTR *)args, 1 )) cur_arg = (DWORD)"";
else cur_arg = (DWORD)PTR_SEG_TO_LIN( *(SEGPTR *)args );
args = (SEGPTR *)args + 1;
cur_arg = (DWORD)VA_ARG16( args, SEGPTR );
if (IsBadReadPtr16( (SEGPTR)cur_arg, 1 )) cur_arg = (DWORD)"";
else cur_arg = (DWORD)PTR_SEG_TO_LIN( (SEGPTR)cur_arg );
break;
case WPR_SIGNED:
if (!(format.flags & WPRINTF_LONG))
{
cur_arg = (DWORD)(INT32)*(INT16 *)args;
args = (INT16 *)args + 1;
cur_arg = (DWORD)(INT32)VA_ARG16( args, INT16 );
break;
}
/* fall through */
case WPR_HEXA:
case WPR_UNSIGNED:
if (format.flags & WPRINTF_LONG)
{
cur_arg = (DWORD)*(UINT32 *)args;
args = (UINT32 *)args + 1;
}
cur_arg = (DWORD)VA_ARG16( args, UINT32 );
else
{
cur_arg = (DWORD)*(UINT16 *)args;
args = (UINT16 *)args + 1;
}
cur_arg = (DWORD)VA_ARG16( args, UINT16 );
break;
}
len = WPRINTF_GetLen( &format, &cur_arg, number, maxlen - 1 );
......@@ -286,11 +280,13 @@ INT16 WINAPI wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec,
*p++ = ' ';
switch(format.type)
{
case WPR_WCHAR:
case WPR_CHAR:
if ((*p = (CHAR)cur_arg)) p++;
else if (format.width > 1) *p++ = ' ';
else len = 0;
break;
case WPR_WSTRING:
case WPR_STRING:
if (len) memcpy( p, (LPCSTR)cur_arg, len );
p += len;
......@@ -312,10 +308,6 @@ INT16 WINAPI wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec,
if (len) memcpy( p, number, len );
p += len;
break;
case WPR_WCHAR:
case WPR_WSTRING:
fprintf( stderr, "Unicode not supported in wsprintf16\n" );
break;
}
if (format.flags & WPRINTF_LEFTALIGN)
for (i = format.precision; i < format.width; i++, maxlen--)
......@@ -361,7 +353,7 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
else len = 0;
break;
case WPR_STRING:
if (len) memcpy( p, va_arg( args, LPCSTR ), len );
memcpy( p, va_arg( args, LPCSTR ), len );
p += len;
break;
case WPR_WSTRING:
......@@ -384,7 +376,7 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
case WPR_SIGNED:
case WPR_UNSIGNED:
for (i = len; i < format.precision; i++, maxlen--) *p++ = '0';
if (len) memcpy( p, number, len );
memcpy( p, number, len );
p += len;
(void)va_arg( args, INT32 ); /* Go to the next arg */
break;
......@@ -395,6 +387,7 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
maxlen -= len;
}
*p = 0;
dprintf_string(stddeb,"%s\n",buffer);
return (maxlen > 1) ? (INT32)(p - buffer) : -1;
}
......@@ -475,6 +468,7 @@ INT32 WINAPI wvsnprintf32W( LPWSTR buffer, UINT32 maxlen, LPCWSTR spec,
*/
INT16 WINAPI wvsprintf16( LPSTR buffer, LPCSTR spec, LPCVOID args )
{
dprintf_string(stddeb,"wvsprintf16 for %p got ",buffer);
return wvsnprintf16( buffer, 0xffff, spec, args );
}
......@@ -484,6 +478,7 @@ INT16 WINAPI wvsprintf16( LPSTR buffer, LPCSTR spec, LPCVOID args )
*/
INT32 WINAPI wvsprintf32A( LPSTR buffer, LPCSTR spec, va_list args )
{
dprintf_string(stddeb,"wvsprintf32A for %p got ",buffer);
return wvsnprintf32A( buffer, 0xffffffff, spec, args );
}
......@@ -493,6 +488,7 @@ INT32 WINAPI wvsprintf32A( LPSTR buffer, LPCSTR spec, va_list args )
*/
INT32 WINAPI wvsprintf32W( LPWSTR buffer, LPCWSTR spec, va_list args )
{
dprintf_string(stddeb,"wvsprintf32W for %p got ",buffer);
return wvsnprintf32W( buffer, 0xffffffff, spec, args );
}
......@@ -506,9 +502,10 @@ INT16 WINAPIV wsprintf16( LPSTR buffer, LPCSTR spec, ... )
va_list valist;
INT16 res;
dprintf_string(stddeb,"wsprintf16 for %p got ",buffer);
va_start( valist, spec );
/* Note: we call the 32-bit version, because the args are 32-bit */
res = (INT16)wvsprintf32A( buffer, spec, valist );
res = (INT16)wvsnprintf32A( buffer, 0xffffffff, spec, valist );
va_end( valist );
return res;
}
......@@ -516,11 +513,18 @@ INT16 WINAPIV wsprintf16( LPSTR buffer, LPCSTR spec, ... )
/* Emulator version */
INT16 WINAPIV WIN16_wsprintf16(void)
{
SEGPTR *win_stack = (SEGPTR *)CURRENT_STACK16->args;
LPSTR buffer = (LPSTR)PTR_SEG_TO_LIN(win_stack[0]);
LPCSTR spec = (LPCSTR)PTR_SEG_TO_LIN(win_stack[1]);
return wvsprintf16( buffer, spec, &win_stack[2] );
VA_LIST16 valist;
INT16 res;
SEGPTR buffer, spec;
VA_START16( valist );
buffer = VA_ARG16( valist, SEGPTR );
spec = VA_ARG16( valist, SEGPTR );
dprintf_string(stddeb,"WIN16_wsprintf16 got ");
res = wvsnprintf16( (LPSTR)PTR_SEG_TO_LIN(buffer), 0xffff,
(LPCSTR)PTR_SEG_TO_LIN(spec), valist );
VA_END16( valist );
return res;
}
......@@ -532,8 +536,9 @@ INT32 WINAPIV wsprintf32A( LPSTR buffer, LPCSTR spec, ... )
va_list valist;
INT32 res;
dprintf_string(stddeb,"wsprintf32A for %p got ",buffer);
va_start( valist, spec );
res = wvsprintf32A( buffer, spec, valist );
res = wvsnprintf32A( buffer, 0xffffffff, spec, valist );
va_end( valist );
return res;
}
......@@ -547,8 +552,9 @@ INT32 WINAPIV wsprintf32W( LPWSTR buffer, LPCWSTR spec, ... )
va_list valist;
INT32 res;
dprintf_string(stddeb,"wsprintf32W for %p\n",buffer);
va_start( valist, spec );
res = wvsprintf32W( buffer, spec, valist );
res = wvsnprintf32W( buffer, 0xffffffff, spec, valist );
va_end( valist );
return res;
}
......
......@@ -12,6 +12,7 @@ C_SRCS = \
int11.c \
int12.c \
int13.c \
int15.c \
int1a.c \
int21.c \
int25.c \
......
/*
* BIOS interrupt 15h handler
*/
#include <stdio.h>
#include <stdlib.h>
#include "miscemu.h"
#include "stddebug.h"
#include "debug.h"
/**********************************************************************
* INT_Int15Handler
*
* Handler for int 15h (old cassette interrupt).
*/
void WINAPI INT_Int15Handler( CONTEXT *context )
{
switch(AH_reg(context))
{
case 0x88: /* get size of memory above 1 M */
AX_reg(context) = 64; /* FIXME: are 64K ok? */
RESET_CFLAG(context);
break;
default:
INT_BARF( context, 0x15 );
}
}
......@@ -42,12 +42,16 @@ static BYTE cmosimage[64] =
#endif /* linux && __i386__ */
#ifdef DIRECT_IO_ACCESS
extern int iopl(int level);
static char do_direct_port_access = 0;
static char port_permissions[0x10000];
#define IO_READ 1
#define IO_WRITE 2
#endif
#endif /* DIRECT_IO_ACCESS */
/**********************************************************************
* IO_port_init
......
......@@ -17,6 +17,7 @@
#include "mmsystem.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
static BOOL32 mmTimeStarted = FALSE;
static MMTIME mmSysTimeMS;
......
......@@ -254,8 +254,8 @@ HBRUSH32 WINAPI GetSysColorBrush32( INT32 index )
switch(index){
case COLOR_SCROLLBAR:
return sysColorObjects.hbrushScrollbar;
case COLOR_BACKGROUND: /* same as COLOR_DESKTOP */
return sysColorObjects.hbrushScrollbar; /*FIXME*/
case COLOR_BACKGROUND:
return sysColorObjects.hbrushBackground;
case COLOR_ACTIVECAPTION:
return sysColorObjects.hbrushActiveCaption;
case COLOR_INACTIVECAPTION:
......@@ -265,51 +265,43 @@ HBRUSH32 WINAPI GetSysColorBrush32( INT32 index )
case COLOR_WINDOW:
return sysColorObjects.hbrushWindow;
case COLOR_WINDOWFRAME:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
return sysColorObjects.hbrushWindowFrame;
case COLOR_MENUTEXT:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
return sysColorObjects.hbrushMenuText;
case COLOR_WINDOWTEXT:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
return sysColorObjects.hbrushWindowText;
case COLOR_CAPTIONTEXT:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
return sysColorObjects.hbrushCaptionText;
case COLOR_ACTIVEBORDER:
return sysColorObjects.hbrushActiveBorder;
case COLOR_INACTIVEBORDER:
return sysColorObjects.hbrushInactiveBorder;
case COLOR_APPWORKSPACE:
return sysColorObjects.hbrushActiveBorder; /*FIXME*/
return sysColorObjects.hbrushAppWorkspace;
case COLOR_HIGHLIGHT:
return sysColorObjects.hbrushHighlight;
case COLOR_HIGHLIGHTTEXT:
return sysColorObjects.hbrushHighlight; /*FIXME*/
return sysColorObjects.hbrushHighlightText;
case COLOR_BTNFACE: /* same as COLOR_3DFACE */
return sysColorObjects.hbrushBtnFace;
case COLOR_BTNSHADOW: /* same as COLOR_3DSHADOW */
return sysColorObjects.hbrushBtnShadow;
case COLOR_GRAYTEXT:
return sysColorObjects.hbrushBtnShadow; /*FIXME*/
return sysColorObjects.hbrushGrayText;
case COLOR_BTNTEXT:
return sysColorObjects.hbrushBtnShadow; /*FIXME*/
return sysColorObjects.hbrushBtnText;
case COLOR_INACTIVECAPTIONTEXT:
return sysColorObjects.hbrushBtnShadow; /*FIXME*/
return sysColorObjects.hbrushInactiveCaptionText;
case COLOR_BTNHIGHLIGHT: /* same as COLOR_(3DHIGH|3DHI|BTNHI)LIGHT */
return sysColorObjects.hbrushBtnHighlight;
/* case COLOR_3DDKSHADOW: FIXME
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
case COLOR_3DDKSHADOW:
return sysColorObjects.hbrush3DDkShadow;
case COLOR_3DLIGHT:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
return sysColorObjects.hbrush3DLight;
case COLOR_INFOTEXT:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;
return sysColorObjects.hbrushInfoText;
case COLOR_INFOBK:
fprintf( stderr, "GetSysColorBrush32: Unimplemented index(%d)\n", index );
break;*/
return sysColorObjects.hbrushInfoBk;
default:
fprintf( stderr, "GetSysColorBrush32: Unknown index(%d)\n", index );
}
......
......@@ -52,6 +52,7 @@ static const WIN_DC_INFO DC_defaultValues =
0, /* breakRem */
1, /* bitsPerPixel */
MM_TEXT, /* MapMode */
GM_COMPATIBLE, /* GraphicsMode */
0, /* DCOrgX */
0, /* DCOrgY */
0, /* CursPosX */
......@@ -1038,6 +1039,42 @@ DWORD WINAPI SetDCOrg( HDC16 hdc, INT16 x, INT16 y )
/***********************************************************************
* GetGraphicsMode (GDI32.188)
*/
INT32 WINAPI GetGraphicsMode( HDC32 hdc )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0;
return dc->w.GraphicsMode;
}
/***********************************************************************
* SetGraphicsMode (GDI32.317)
*/
INT32 WINAPI SetGraphicsMode( HDC32 hdc, INT32 mode )
{
INT32 ret;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0;
if ((mode <= 0) || (mode > GM_LAST)) return 0;
ret = dc->w.GraphicsMode;
dc->w.GraphicsMode = mode;
return ret;
}
/***********************************************************************
* GetWorldTransform (GDI32.244)
*/
BOOL32 WINAPI GetWorldTransform( HDC32 hdc, LPXFORM xform )
{
fprintf( stdnimp, "GetWorldTransform: empty stub\n" );
return FALSE;
}
/***********************************************************************
* SetDCHook (GDI.190)
*/
BOOL16 WINAPI SetDCHook( HDC16 hdc, FARPROC16 hookProc, DWORD dwHookData )
......
......@@ -698,6 +698,42 @@ BOOL16 WINAPI IsGDIObject( HGDIOBJ16 handle )
/***********************************************************************
* SetObjectOwner16 (GDI.461)
*/
void WINAPI SetObjectOwner16( HGDIOBJ16 handle, HANDLE16 owner )
{
/* Nothing to do */
}
/***********************************************************************
* SetObjectOwner32 (GDI32.386)
*/
void WINAPI SetObjectOwner32( HGDIOBJ32 handle, HANDLE32 owner )
{
/* Nothing to do */
}
/***********************************************************************
* GdiGetBatchLimit (GDI32.129)
*/
DWORD WINAPI GdiGetBatchLimit(void)
{
return 1; /* FIXME */
}
/***********************************************************************
* GdiSetBatchLimit (GDI32.139)
*/
DWORD WINAPI GdiSetBatchLimit( DWORD limit )
{
return 1; /* FIXME */
}
/***********************************************************************
* MulDiv16 (GDI.128)
*/
INT16 WINAPI MulDiv16( INT16 foo, INT16 bar, INT16 baz )
......
......@@ -280,8 +280,14 @@ static BOOL32 PROCESS_FillEnvDB( PDB32 *pdb, TDB *pTask, LPCSTR cmd_line )
array = NULL;
/* Copy the command line */
if (!(pdb->env_db->cmd_line = HEAP_strdupA( pdb->heap, 0, cmd_line )))
/* Fixme: Here we rely on the hack that loader/module.c put's the unprocessed
commandline after the processed one in Pascal notation.
We may access Null data if we get called another way.
If we have a real CreateProcess sometimes, the problem to get an unrestricted
commandline will go away and we won't need that hack any longer
*/
if (!(pdb->env_db->cmd_line =
HEAP_strdupA( pdb->heap, 0, cmd_line + (unsigned char)cmd_line[0] + 2)))
goto error;
return TRUE;
......
......@@ -268,13 +268,13 @@ static void output_src( FILE *file, INCL_FILE *pFile, int *column )
{
if (!strcmp( ext, ".y" )) /* yacc file */
{
fprintf( file, "y.tab.o: ./y.tab.c" );
*column += 18;
fprintf( file, "y.tab.o: y.tab.c" );
*column += 16;
}
else if (!strcmp( ext, ".l" )) /* lex file */
{
fprintf( file, "lex.yy.o: ./lex.yy.c" );
*column += 20;
fprintf( file, "lex.yy.o: lex.yy.c" );
*column += 18;
}
else if (!strcmp( ext, ".rc" )) /* resource file */
{
......
......@@ -6,6 +6,7 @@
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include "windows.h"
#include "winerror.h"
#include "shell.h"
......
......@@ -13,6 +13,7 @@
#include "task.h"
#include "stddebug.h"
#include "debug.h"
#include "process.h" /* for pCurrentProcess */
/***********************************************************************
......@@ -20,21 +21,7 @@
*/
LPCSTR WINAPI GetCommandLine32A(void)
{
static char buffer[256];
char *cp;
PDB *pdb = (PDB *)GlobalLock16( GetCurrentPDB() );
/* FIXME: should use pCurrentProcess->env_db->cmd_line here */
lstrcpyn32A( buffer, MODULE_GetModuleName(GetCurrentTask()),
sizeof(buffer) - 1 );
cp = buffer + strlen(buffer);
if (pdb->cmdLine[0])
{
*cp++ = ' ';
memcpy( cp, &pdb->cmdLine[1], pdb->cmdLine[0] );
}
dprintf_win32(stddeb,"CommandLine = %s\n", buffer );
return buffer;
return pCurrentProcess->env_db->cmd_line;
}
/***********************************************************************
......
......@@ -46,25 +46,6 @@
((PEXCEPTION_FRAME)((TEB *)GET_SEL_BASE((pcontext)->SegFs))->except)
/*******************************************************************
* _local_unwind2 (CRTDLL)
*/
void WINAPI CRTDLL__local_unwind2(PEXCEPTION_FRAME endframe,DWORD nr,
PCONTEXT pcontext)
{
fprintf(stderr,"CRTDLL__local_unwind2(%p,%ld)\n",endframe,nr);
return;
}
/*******************************************************************
* _global_unwind2 (CRTDLL)
*/
void WINAPI CRTDLL__global_unwind2(PEXCEPTION_FRAME endframe,PCONTEXT pcontext)
{
RtlUnwind(endframe,NULL/*should point to the return;*/,NULL,0,pcontext);
return;
}
/*******************************************************************
* RtlUnwind (KERNEL32.443)
*
* This function is undocumented. This is the general idea of
......@@ -78,7 +59,7 @@ void WINAPI RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
DWORD dispatch;
int retval;
pcontext->Eax=returnEax;
EAX_reg(pcontext) = returnEax;
/* build an exception record, if we do not have one */
if(!pRecord)
......@@ -86,7 +67,7 @@ void WINAPI RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
record.ExceptionCode = STATUS_INVALID_DISPOSITION;
record.ExceptionFlags = 0;
record.ExceptionRecord = NULL;
record.ExceptionAddress = (LPVOID)pcontext->Eip;
record.ExceptionAddress = (LPVOID)EIP_reg(pcontext);
record.NumberParameters = 0;
pRecord = &record;
}
......@@ -125,6 +106,16 @@ void WINAPI RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
}
}
/* This is the real entry point called by relay debugging code */
void EXC_RtlUnwind( CONTEXT *context )
{
/* Retrieve the arguments (args[0] is return addr, args[1] is first arg) */
DWORD *args = (DWORD *)ESP_reg(context);
ESP_reg(context) += 4 * sizeof(DWORD); /* Pop the arguments */
RtlUnwind( (PEXCEPTION_FRAME)args[1], (LPVOID)args[2],
(PEXCEPTION_RECORD)args[3], args[4], context );
}
/*******************************************************************
* RaiseException (KERNEL32.418)
......@@ -147,7 +138,7 @@ void WINAPI RaiseException(DWORD dwExceptionCode,
record.ExceptionFlags = dwExceptionFlags;
record.ExceptionRecord = NULL;
record.NumberParameters = cArguments;
record.ExceptionAddress = (LPVOID) pcontext->Eip;
record.ExceptionAddress = (LPVOID)EIP_reg(pcontext);
if (lpArguments) for( i = 0; i < cArguments; i++)
record.ExceptionInformation[i] = lpArguments[i];
......@@ -162,6 +153,8 @@ void WINAPI RaiseException(DWORD dwExceptionCode,
dprintf_win32(stddeb,"calling exception handler at 0x%x\n",
(int) pframe->Handler);
dispatch=0;
dprintf_relay(stddeb,"CallTo32(except=%p,record=%p,frame=%p,context=%p,dispatch=%p)\n",
pframe->Handler, &record, pframe, pcontext, &dispatch );
retval=pframe->Handler(&record,pframe,pcontext,&dispatch);
dprintf_win32(stddeb,"exception handler returns 0x%x, dispatch=0x%x\n",
......@@ -180,6 +173,14 @@ void WINAPI RaiseException(DWORD dwExceptionCode,
}
}
/* This is the real entry point called by relay debugging code */
void EXC_RaiseException( CONTEXT *context )
{
/* Retrieve the arguments (args[0] is return addr, args[1] is first arg) */
DWORD *args = (DWORD *)ESP_reg(context);
ESP_reg(context) += 4 * sizeof(DWORD); /* Pop the arguments */
RaiseException( args[1], args[2], args[3], (LPDWORD)args[4], context );
}
/*******************************************************************
* UnhandledExceptionFilter (KERNEL32.537)
......
......@@ -118,6 +118,17 @@ VOID* WINAPI FreeSid(LPSID pSid) {
}
/***********************************************************************
* InitializeSecurityDescriptor (ADVAPI.73)
*/
BOOL32 WINAPI InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr,
DWORD revision )
{
fprintf( stdnimp, "InitializeSecurityDescriptor: empty stub\n" );
return TRUE;
}
/***********************************************************************
* InitializeSid (ADVAPI.74)
*/
BOOL32 WINAPI InitializeSid (LPSID pSid, LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
......
......@@ -97,6 +97,8 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
sysColorObjects.hbrushScrollbar = CreateSolidBrush32( color );
break;
case COLOR_BACKGROUND:
DeleteObject32( sysColorObjects.hbrushBackground );
sysColorObjects.hbrushBackground = CreateSolidBrush32( color );
break;
case COLOR_ACTIVECAPTION:
DeleteObject32( sysColorObjects.hbrushActiveCaption );
......@@ -115,16 +117,26 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
sysColorObjects.hbrushWindow = CreateSolidBrush32( color );
break;
case COLOR_WINDOWFRAME:
DeleteObject32( sysColorObjects.hbrushWindowFrame );
sysColorObjects.hbrushWindowFrame = CreateSolidBrush32( color );
/* FIXME: we should not need this pen */
DeleteObject32( sysColorObjects.hpenWindowFrame );
sysColorObjects.hpenWindowFrame = CreatePen32( PS_SOLID, 1, color );
break;
case COLOR_MENUTEXT:
DeleteObject32( sysColorObjects.hbrushMenuText );
sysColorObjects.hbrushMenuText = CreateSolidBrush32( color );
break;
case COLOR_WINDOWTEXT:
DeleteObject32( sysColorObjects.hbrushWindowText );
sysColorObjects.hbrushWindowText = CreateSolidBrush32( color );
/* FIXME: we should not need this pen */
DeleteObject32( sysColorObjects.hpenWindowText );
sysColorObjects.hpenWindowText = CreatePen32( PS_DOT, 1, color );
break;
case COLOR_CAPTIONTEXT:
DeleteObject32( sysColorObjects.hbrushCaptionText );
sysColorObjects.hbrushCaptionText = CreateSolidBrush32( color );
break;
case COLOR_ACTIVEBORDER:
DeleteObject32( sysColorObjects.hbrushActiveBorder );
......@@ -135,12 +147,16 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
sysColorObjects.hbrushInactiveBorder = CreateSolidBrush32( color );
break;
case COLOR_APPWORKSPACE:
DeleteObject32( sysColorObjects.hbrushAppWorkspace );
sysColorObjects.hbrushAppWorkspace = CreateSolidBrush32( color );
break;
case COLOR_HIGHLIGHT:
DeleteObject32( sysColorObjects.hbrushHighlight );
sysColorObjects.hbrushHighlight = CreateSolidBrush32(MAKE_SOLID(color));
sysColorObjects.hbrushHighlight = CreateSolidBrush32( color );
break;
case COLOR_HIGHLIGHTTEXT:
DeleteObject32( sysColorObjects.hbrushHighlightText );
sysColorObjects.hbrushHighlightText = CreateSolidBrush32( color );
break;
case COLOR_BTNFACE:
DeleteObject32( sysColorObjects.hbrushBtnFace );
......@@ -151,17 +167,35 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
sysColorObjects.hbrushBtnShadow = CreateSolidBrush32( color );
break;
case COLOR_GRAYTEXT:
DeleteObject32( sysColorObjects.hbrushGrayText );
sysColorObjects.hbrushGrayText = CreateSolidBrush32( color );
case COLOR_BTNTEXT:
DeleteObject32( sysColorObjects.hbrushBtnText );
sysColorObjects.hbrushBtnText = CreateSolidBrush32( color );
break;
case COLOR_INACTIVECAPTIONTEXT:
DeleteObject32( sysColorObjects.hbrushInactiveCaptionText );
sysColorObjects.hbrushInactiveCaptionText = CreateSolidBrush32(color);
break;
case COLOR_BTNHIGHLIGHT:
DeleteObject32( sysColorObjects.hbrushBtnHighlight );
sysColorObjects.hbrushBtnHighlight = CreateSolidBrush32( color );
break;
case COLOR_3DDKSHADOW:
DeleteObject32( sysColorObjects.hbrush3DDkShadow );
sysColorObjects.hbrush3DDkShadow = CreateSolidBrush32( color );
break;
case COLOR_3DLIGHT:
DeleteObject32( sysColorObjects.hbrush3DLight );
sysColorObjects.hbrush3DLight = CreateSolidBrush32( color );
break;
case COLOR_INFOTEXT:
DeleteObject32( sysColorObjects.hbrushInfoText );
sysColorObjects.hbrushInfoText = CreateSolidBrush32( color );
break;
case COLOR_INFOBK:
DeleteObject32( sysColorObjects.hbrushInfoBk );
sysColorObjects.hbrushInfoBk = CreateSolidBrush32( color );
break;
}
}
......
......@@ -624,6 +624,62 @@ HWND32 WINAPI SetActiveWindow32( HWND32 hwnd )
}
/*******************************************************************
* GetForegroundWindow16 (USER.608)
*/
HWND16 WINAPI GetForegroundWindow16(void)
{
return (HWND16)GetForegroundWindow32();
}
/*******************************************************************
* SetForegroundWindow16 (USER.609)
*/
BOOL16 WINAPI SetForegroundWindow16( HWND16 hwnd )
{
return SetForegroundWindow32( hwnd );
}
/*******************************************************************
* GetForegroundWindow32 (USER32.241)
*/
HWND32 WINAPI GetForegroundWindow32(void)
{
return GetActiveWindow32();
}
/*******************************************************************
* SetForegroundWindow32 (USER32.482)
*/
BOOL32 WINAPI SetForegroundWindow32( HWND32 hwnd )
{
SetActiveWindow32( hwnd );
return TRUE;
}
/*******************************************************************
* GetShellWindow16 (USER.600)
*/
HWND16 WINAPI GetShellWindow16(void)
{
return GetShellWindow32();
}
/*******************************************************************
* GetShellWindow32 (USER32.287)
*/
HWND32 WINAPI GetShellWindow32(void)
{
fprintf( stdnimp, "GetShellWindow: empty stub\n" );
return 0;
}
/***********************************************************************
* BringWindowToTop16 (USER.45)
*/
......@@ -2423,9 +2479,9 @@ HDWP32 WINAPI DeferWindowPos32( HDWP32 hdwp, HWND32 hwnd, HWND32 hwndAfter,
pDWP->winPos[i].cx = cx;
pDWP->winPos[i].cy = cy;
}
pDWP->winPos[i].flags &= flags & (SWP_NOSIZE | SWP_NOMOVE |
pDWP->winPos[i].flags &= flags | ~(SWP_NOSIZE | SWP_NOMOVE |
SWP_NOZORDER | SWP_NOREDRAW |
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SWP_NOACTIVATE | SWP_NOCOPYBITS|
SWP_NOOWNERZORDER);
pDWP->winPos[i].flags |= flags & (SWP_SHOWWINDOW | SWP_HIDEWINDOW |
SWP_FRAMECHANGED);
......
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