Skip to content
Snippets Groups Projects
Commit 670cdc45 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Release 970824

Sat Aug 23 00:05:23 1997  Andreas Mohr <100.30936@germany.net>

	* [if1632/kernel.spec] [if1632/mmsystem.spec]
	Added some stubs.

	* [include/neexe.h] [loader/module.c]
	Added warning for OS/2 executables.

	* [multimedia/midi.c]
	Shortened MIDIOUT driver version string to be less than 31 chars.

	* [objects/gdiobj.c]
	Fixed DeleteObject32() to react properly when called with stock object.

Fri Aug 22 18:03:26 1997  Dimitrie O. Paun <dimi@cs.toronto.edu>

	* [controls/updown.c] [include/updown.h]
	First attempt at implementiong the UpDown class.

	* [controls/widgets.c]
	Added the UpDown class to be initialized by InitCommonControls().

Wed Aug 20 18:01:33 1997  Doug Ridgway <ridgway@routh.UCSD.EDU>

	* [graphics/*] [objects/*] [include/gdi.h]
	Made all GDI objects (except DCs) moveable.

Mon Aug 18 03:25:30 1997  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [windows/event.c] [misc/winsock.c] [misc/winsock_dns.c]
	Removed IPC communication to speed up winsock services
	(tested only with 16-bit netscape 3.03).

	* [graphics/x11drv/xfont.c] [documentation/fonts]
	Miscellaneous improvements. Updated docs.

Sun Aug 17 20:39:55 1997  Ingo Schneider <schneidi@informatik.tu-muenchen.de>

	* [misc/comm.c]
	A couple of bug fixes.

Sun Aug 17 19:29:22 1997  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [debugger/dbg.y]
	Display next instruction after stepi/nexti.

	* [if1632/relay.c] [include/callback.h] [tools/build.c]
	Replaced CallTo32_LargeStack with the CALL_LARGE_STACK macro for
	better Winelib support.

	* [include/sigcontext.h]
	Renamed to sig_context.h to avoid conflicts with libc.

	* [*/*]
	All API functions are now prefixed with WINAPI in prevision of
	future Winelib integration.

	* [loader/signal.c] [memory/ldt.c]
	Fixed assembly code to be -fPIC compatible.

Thu Aug 14 14:38:15 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [if1632/crtdll.spec][win32/except.c]
	_global_unwind, _local_unwind stub added.

	* [objects/dib.c]	
	Don't read memory you don't even need for the target bitmap (fixes
	one 'lazy' program).

	* [if1632/relay.c][if1632/thunk.c][if1632/kernel32.spec]
	  [win32/ordinals.c][memory/selector.c][memory/global.c]
	  [include/callback.h]
	Added/moved some more win95 ordinal stuff. Implemented QT_Thunk
	(not 100% correct yet) and some friends.

	* [loader/pe_image.c]
	Add possibility to break at the DLL entrypoint.

	* [controls/static.c][misc/commdlg.c][scheduler/thread.c]
	Misc bugfixes and additions.

	* [misc/registry.c]
	The registry seems to be case-preserving but case-insensitive.

	* [memory/global.c]	
	Adapted to new /proc/meminfo format.

	* [objects/font.c][graphics/x11drv/xfont.c]
	FONT_SelectObject and GetTextMetrics* get passed ranges in logical
 	and not device points (thanks to Marion Reyzl for pointing this
 	out).

	* [windows/caret.c]
	Use the windows own DC if present (The caret coordinates are
	logical coordinates based on it). Fixes another AMIPRO problem.

Wed Aug  6 18:22:22 1997  Morten Welinder  <terra@diku.dk>

	* [controls/menu.c]
	General clean-up and Win32 work: split item_flags into fType and
	fState; split item_id into wID and hSubMenu.  Improved
	debug-printing.  Implemented InsertMenuItem32[AW],
	SetMenuDefaultItem32, and SetMenuItemInfo32[AW].  Fixed
	GetMenuItemInfo32[AW].

	* [if1632/user32.spec]
	Define above new functions.

	* [include/windows.h]
	Define MF_DEFAULT and MF_RIGHTJUSTIFY.  Prototype above functions.

	* [include/menu.h]
	Don't prototype now-static MENU_InitSysMenuPopup.

	* [include/comm.h]
	Reduce MAX_PORTS to 9 (which the profile code can handle).

Tue Aug  5 20:16:22 1997  Victor Schneider <vischne@ibm.net>

	* [library/winestub.c] [libtest/expand.c]
	These patches let people porting Windows apps compile them using
	the same conventions regarding global _argc and _argv as those on
	Windows C/C++ compilers.
parent 641ee76a
No related branches found
Tags wine-970824
No related merge requests found
This is release 970804 of Wine, the MS Windows emulator. This is still a
This is release 970824 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-970804: (see ChangeLog for details)
- Joystick support.
- More Win32 stuff.
WHAT'S NEW with Wine-970824: (see ChangeLog for details)
- Better Win32 menu support.
- Improved Winsock.
- UpDown control.
- More undocumented Win95 hacks.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -16,10 +18,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-970804.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970804.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970804.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-970804.tar.gz
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-970824.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970824.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970824.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-970824.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
......@@ -42,9 +42,6 @@ Miscellaneous:
* "Cursor XXXX has more than 1 bpp!"
* 32-bit Freecell segfaults when started from the Progman (looks like
a problem with cards.dll).
* Margins in edit controls are too wide.
* SGI window manager treats Wine windows as topmost.
......
----------------------------------------------------------------------
Sat Aug 23 00:05:23 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/kernel.spec] [if1632/mmsystem.spec]
Added some stubs.
* [include/neexe.h] [loader/module.c]
Added warning for OS/2 executables.
* [multimedia/midi.c]
Shortened MIDIOUT driver version string to be less than 31 chars.
* [objects/gdiobj.c]
Fixed DeleteObject32() to react properly when called with stock object.
Fri Aug 22 18:03:26 1997 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [controls/updown.c] [include/updown.h]
First attempt at implementiong the UpDown class.
* [controls/widgets.c]
Added the UpDown class to be initialized by InitCommonControls().
Wed Aug 20 18:01:33 1997 Doug Ridgway <ridgway@routh.UCSD.EDU>
* [graphics/*] [objects/*] [include/gdi.h]
Made all GDI objects (except DCs) moveable.
Mon Aug 18 03:25:30 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/event.c] [misc/winsock.c] [misc/winsock_dns.c]
Removed IPC communication to speed up winsock services
(tested only with 16-bit netscape 3.03).
* [graphics/x11drv/xfont.c] [documentation/fonts]
Miscellaneous improvements. Updated docs.
Sun Aug 17 20:39:55 1997 Ingo Schneider <schneidi@informatik.tu-muenchen.de>
* [misc/comm.c]
A couple of bug fixes.
Sun Aug 17 19:29:22 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/dbg.y]
Display next instruction after stepi/nexti.
* [if1632/relay.c] [include/callback.h] [tools/build.c]
Replaced CallTo32_LargeStack with the CALL_LARGE_STACK macro for
better Winelib support.
* [include/sigcontext.h]
Renamed to sig_context.h to avoid conflicts with libc.
* [*/*]
All API functions are now prefixed with WINAPI in prevision of
future Winelib integration.
* [loader/signal.c] [memory/ldt.c]
Fixed assembly code to be -fPIC compatible.
Thu Aug 14 14:38:15 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/crtdll.spec][win32/except.c]
_global_unwind, _local_unwind stub added.
* [objects/dib.c]
Don't read memory you don't even need for the target bitmap (fixes
one 'lazy' program).
* [if1632/relay.c][if1632/thunk.c][if1632/kernel32.spec]
[win32/ordinals.c][memory/selector.c][memory/global.c]
[include/callback.h]
Added/moved some more win95 ordinal stuff. Implemented QT_Thunk
(not 100% correct yet) and some friends.
* [loader/pe_image.c]
Add possibility to break at the DLL entrypoint.
* [controls/static.c][misc/commdlg.c][scheduler/thread.c]
Misc bugfixes and additions.
* [misc/registry.c]
The registry seems to be case-preserving but case-insensitive.
* [memory/global.c]
Adapted to new /proc/meminfo format.
* [objects/font.c][graphics/x11drv/xfont.c]
FONT_SelectObject and GetTextMetrics* get passed ranges in logical
and not device points (thanks to Marion Reyzl for pointing this
out).
* [windows/caret.c]
Use the windows own DC if present (The caret coordinates are
logical coordinates based on it). Fixes another AMIPRO problem.
Wed Aug 6 18:22:22 1997 Morten Welinder <terra@diku.dk>
* [controls/menu.c]
General clean-up and Win32 work: split item_flags into fType and
fState; split item_id into wID and hSubMenu. Improved
debug-printing. Implemented InsertMenuItem32[AW],
SetMenuDefaultItem32, and SetMenuItemInfo32[AW]. Fixed
GetMenuItemInfo32[AW].
* [if1632/user32.spec]
Define above new functions.
* [include/windows.h]
Define MF_DEFAULT and MF_RIGHTJUSTIFY. Prototype above functions.
* [include/menu.h]
Don't prototype now-static MENU_InitSysMenuPopup.
* [include/comm.h]
Reduce MAX_PORTS to 9 (which the profile code can handle).
Tue Aug 5 20:16:22 1997 Victor Schneider <vischne@ibm.net>
* [library/winestub.c] [libtest/expand.c]
These patches let people porting Windows apps compile them using
the same conventions regarding global _argc and _argv as those on
Windows C/C++ compilers.
----------------------------------------------------------------------
Sun Aug 3 14:03:43 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
......
......@@ -83,7 +83,8 @@ UPDATE: Windows 95 components are known to cause more crashes compared
The best place to get help or to report bugs is the Usenet newsgroup
comp.emulators.ms-windows.wine. The Wine FAQ is posted there every
month.
month. Also, you may want to browse old messages on www.dejanews.com
to check whether your problem is already fixed.
If you add something, or fix a bug, please send a patch ('diff -u'
format preferred) to julliard@lrc.epfl.ch for inclusion in the next
......
......@@ -16,6 +16,7 @@ C_SRCS = \
scroll.c \
static.c \
status.c \
updown.c \
widgets.c
all: $(MODULE).o
......
......@@ -71,7 +71,8 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0;
/***********************************************************************
* ButtonWndProc
*/
LRESULT ButtonWndProc(HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
WPARAM32 wParam, LPARAM lParam )
{
RECT16 rect;
WND *wndPtr = WIN_FindWndPtr(hWnd);
......
......@@ -83,30 +83,32 @@ static BOOL32 COMBO_Init()
*/
static LRESULT COMBO_NCCreate(WND* wnd, LPARAM lParam)
{
LPHEADCOMBO lphc;
LPHEADCOMBO lphc;
if ( wnd && COMBO_Init() &&
if ( wnd && COMBO_Init() &&
(lphc = HeapAlloc(GetProcessHeap(), 0, sizeof(HEADCOMBO))) )
{
LPCREATESTRUCT32A lpcs = (CREATESTRUCT32A*)lParam;
{
LPCREATESTRUCT32A lpcs = (CREATESTRUCT32A*)lParam;
memset( lphc, 0, sizeof(HEADCOMBO) );
memset( lphc, 0, sizeof(HEADCOMBO) );
*(LPHEADCOMBO*)wnd->wExtra = lphc;
/* some braindead apps do try to use scrollbar/border flags */
lphc->dwStyle = (lpcs->style & ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL));
wnd->dwStyle &= ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL);
lphc->dwStyle = (lpcs->style & ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL));
wnd->dwStyle &= ~(WS_BORDER | WS_HSCROLL | WS_VSCROLL);
if( !(lpcs->style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) )
lphc->dwStyle |= CBS_HASSTRINGS;
if( !(lpcs->style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) )
lphc->dwStyle |= CBS_HASSTRINGS;
if( !(wnd->dwExStyle & WS_EX_NOPARENTNOTIFY) )
lphc->wState |= CBF_NOTIFY;
dprintf_combo(stddeb, "COMBO_NCCreate: [0x%08x], style = %08x\n",
(UINT32)lphc, lphc->dwStyle );
dprintf_combo(stddeb, "COMBO_NCCreate: [0x%08x], style = %08x\n",
(UINT32)lphc, lphc->dwStyle );
return (LRESULT)(UINT32)wnd->hwndSelf;
}
return (LRESULT)FALSE;
return (LRESULT)(UINT32)wnd->hwndSelf;
}
return (LRESULT)FALSE;
}
/***********************************************************************
......@@ -1239,7 +1241,8 @@ static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM32 wParam, LPARAM lParam )
*
* http://www.microsoft.com/msdn/sdk/platforms/doc/sdk/win32/ctrl/src/combobox_15.htm
*/
LRESULT ComboWndProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 message,
WPARAM32 wParam, LPARAM lParam )
{
WND* pWnd = WIN_FindWndPtr(hwnd);
......
......@@ -131,8 +131,8 @@ static LRESULT DESKTOP_DoEraseBkgnd( HWND32 hwnd, HDC32 hdc,
*
* Window procedure for the desktop window.
*/
LRESULT DesktopWndProc( HWND32 hwnd, UINT32 message,
WPARAM32 wParam, LPARAM lParam )
LRESULT WINAPI DesktopWndProc( HWND32 hwnd, UINT32 message,
WPARAM32 wParam, LPARAM lParam )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
DESKTOPINFO *infoPtr = (DESKTOPINFO *)wndPtr->wExtra;
......@@ -169,7 +169,7 @@ LRESULT DesktopWndProc( HWND32 hwnd, UINT32 message,
/***********************************************************************
* SetDeskPattern (USER.279)
*/
BOOL16 SetDeskPattern(void)
BOOL16 WINAPI SetDeskPattern(void)
{
char buffer[100];
GetProfileString32A( "desktop", "Pattern", "(None)", buffer, 100 );
......@@ -180,7 +180,7 @@ BOOL16 SetDeskPattern(void)
/***********************************************************************
* SetDeskWallPaper16 (USER.285)
*/
BOOL16 SetDeskWallPaper16( LPCSTR filename )
BOOL16 WINAPI SetDeskWallPaper16( LPCSTR filename )
{
return SetDeskWallPaper32( filename );
}
......@@ -191,7 +191,7 @@ BOOL16 SetDeskWallPaper16( LPCSTR filename )
*
* FIXME: is there a unicode version?
*/
BOOL32 SetDeskWallPaper32( LPCSTR filename )
BOOL32 WINAPI SetDeskWallPaper32( LPCSTR filename )
{
HBITMAP32 hbitmap;
HDC32 hdc;
......
......@@ -148,7 +148,8 @@ static __inline__ void EDIT_WM_Cut(WND *wnd, EDITSTATE *es);
/*
* This is the only exported function
*/
LRESULT EditWndProc(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam);
LRESULT WINAPI EditWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
/*
* Helper functions only valid for one type of control
*/
......@@ -297,7 +298,8 @@ static __inline__ void EDIT_WM_Cut(WND *wnd, EDITSTATE *es)
* names).
*
*/
LRESULT EditWndProc(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI EditWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
{
WND *wnd = WIN_FindWndPtr(hwnd);
EDITSTATE *es = *(EDITSTATE **)((wnd)->wExtra);
......
......@@ -185,7 +185,8 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
/***********************************************************************
* IconTitleWndProc
*/
LRESULT IconTitleWndProc( HWND32 hWnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam )
LRESULT WINAPI IconTitleWndProc( HWND32 hWnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
{
WND *wnd = WIN_FindWndPtr( hWnd );
......
......@@ -233,7 +233,8 @@ static LRESULT LISTBOX_SetTopItem( WND *wnd, LB_DESCR *descr, INT32 index,
{
INT32 diff = (descr->top_item - index) / descr->page_size * descr->column_width;
if (scroll && (abs(diff) < descr->width))
ScrollWindow32( wnd->hwndSelf, diff, 0, NULL, NULL );
ScrollWindowEx32( wnd->hwndSelf, diff, 0, NULL, NULL, 0, NULL,
SW_INVALIDATE | SW_ERASE );
else
scroll = FALSE;
}
......@@ -259,7 +260,8 @@ static LRESULT LISTBOX_SetTopItem( WND *wnd, LB_DESCR *descr, INT32 index,
diff = (descr->top_item - index) * descr->item_height;
if (abs(diff) < descr->height)
ScrollWindow32( wnd->hwndSelf, 0, diff, NULL, NULL );
ScrollWindowEx32( wnd->hwndSelf, 0, diff, NULL, NULL, 0, NULL,
SW_INVALIDATE | SW_ERASE );
else
scroll = FALSE;
}
......@@ -1006,7 +1008,8 @@ static void LISTBOX_SetHorizontalPos( WND *wnd, LB_DESCR *descr, INT32 pos )
descr->horz_pos = pos;
LISTBOX_UpdateScroll( wnd, descr );
if (abs(diff) < descr->width)
ScrollWindow32( wnd->hwndSelf, diff, 0, NULL, NULL );
ScrollWindowEx32( wnd->hwndSelf, diff, 0, NULL, NULL, 0, NULL,
SW_INVALIDATE | SW_ERASE );
else
InvalidateRect32( wnd->hwndSelf, NULL, TRUE );
}
......@@ -2019,6 +2022,8 @@ static BOOL32 LISTBOX_Create( WND *wnd, LPHEADCOMBO lphc )
*(LB_DESCR **)wnd->wExtra = descr;
/* if (wnd->dwExStyle & WS_EX_NOPARENTNOTIFY) descr->style &= ~LBS_NOTIFY;
*/
if (descr->style & LBS_EXTENDEDSEL) descr->style |= LBS_MULTIPLESEL;
if (descr->style & LBS_MULTICOLUMN) descr->style &= ~LBS_OWNERDRAWVARIABLE;
if (descr->style & LBS_OWNERDRAWVARIABLE) descr->style |= LBS_NOINTEGRALHEIGHT;
......@@ -2066,7 +2071,8 @@ static BOOL32 LISTBOX_Destroy( WND *wnd, LB_DESCR *descr )
/***********************************************************************
* ListBoxWndProc
*/
LRESULT ListBoxWndProc(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI ListBoxWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
{
LRESULT ret;
LB_DESCR *descr;
......@@ -2491,7 +2497,8 @@ LRESULT COMBO_Directory( LPHEADCOMBO lphc, UINT32 attrib, LPSTR dir, BOOL32 bLon
* NOTE: in Windows, winproc address of the ComboLBox is the same
* as that of the Listbox.
*/
LRESULT ComboLBWndProc(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
LRESULT WINAPI ComboLBWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
{
LRESULT lRet = 0;
WND *wnd = WIN_FindWndPtr( hwnd );
......
This diff is collapsed.
......@@ -756,8 +756,8 @@ void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar, UINT32 msg, POINT32 pt)
/***********************************************************************
* ScrollBarWndProc
*/
LRESULT ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
LPARAM lParam )
LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
LPARAM lParam )
{
switch(message)
{
......@@ -893,8 +893,8 @@ LRESULT ScrollBarWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
/*************************************************************************
* SetScrollInfo16 (USER.475)
*/
INT16 SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info,
BOOL16 bRedraw )
INT16 WINAPI SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info,
BOOL16 bRedraw )
{
return (INT16)SetScrollInfo32( hwnd, nBar, info, bRedraw );
}
......@@ -903,8 +903,8 @@ INT16 SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info,
/*************************************************************************
* SetScrollInfo32 (USER32.500)
*/
INT32 SetScrollInfo32( HWND32 hwnd, INT32 nBar, const SCROLLINFO *info,
BOOL32 bRedraw )
INT32 WINAPI SetScrollInfo32( HWND32 hwnd, INT32 nBar, const SCROLLINFO *info,
BOOL32 bRedraw )
{
SCROLLBAR_INFO *infoPtr;
UINT32 new_flags;
......@@ -1007,7 +1007,7 @@ INT32 SetScrollInfo32( HWND32 hwnd, INT32 nBar, const SCROLLINFO *info,
/*************************************************************************
* GetScrollInfo16 (USER.476)
*/
BOOL16 GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
BOOL16 WINAPI GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
{
return GetScrollInfo32( hwnd, nBar, info );
}
......@@ -1016,7 +1016,7 @@ BOOL16 GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
/*************************************************************************
* GetScrollInfo32 (USER32.283)
*/
BOOL32 GetScrollInfo32( HWND32 hwnd, INT32 nBar, LPSCROLLINFO info )
BOOL32 WINAPI GetScrollInfo32( HWND32 hwnd, INT32 nBar, LPSCROLLINFO info )
{
SCROLLBAR_INFO *infoPtr;
......@@ -1041,7 +1041,8 @@ BOOL32 GetScrollInfo32( HWND32 hwnd, INT32 nBar, LPSCROLLINFO info )
/*************************************************************************
* SetScrollPos16 (USER.62)
*/
INT16 SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos, BOOL16 bRedraw )
INT16 WINAPI SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos,
BOOL16 bRedraw )
{
return (INT16)SetScrollPos32( hwnd, nBar, nPos, bRedraw );
}
......@@ -1050,7 +1051,8 @@ INT16 SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos, BOOL16 bRedraw )
/*************************************************************************
* SetScrollPos32 (USER32.501)
*/
INT32 SetScrollPos32( HWND32 hwnd, INT32 nBar, INT32 nPos, BOOL32 bRedraw )
INT32 WINAPI SetScrollPos32( HWND32 hwnd, INT32 nBar, INT32 nPos,
BOOL32 bRedraw )
{
SCROLLINFO info;
SCROLLBAR_INFO *infoPtr;
......@@ -1069,7 +1071,7 @@ INT32 SetScrollPos32( HWND32 hwnd, INT32 nBar, INT32 nPos, BOOL32 bRedraw )
/*************************************************************************
* GetScrollPos16 (USER.63)
*/
INT16 GetScrollPos16( HWND16 hwnd, INT16 nBar )
INT16 WINAPI GetScrollPos16( HWND16 hwnd, INT16 nBar )
{
return (INT16)GetScrollPos32( hwnd, nBar );
}
......@@ -1078,7 +1080,7 @@ INT16 GetScrollPos16( HWND16 hwnd, INT16 nBar )
/*************************************************************************
* GetScrollPos32 (USER32.284)
*/
INT32 GetScrollPos32( HWND32 hwnd, INT32 nBar )
INT32 WINAPI GetScrollPos32( HWND32 hwnd, INT32 nBar )
{
SCROLLBAR_INFO *infoPtr;
......@@ -1090,8 +1092,8 @@ INT32 GetScrollPos32( HWND32 hwnd, INT32 nBar )
/*************************************************************************
* SetScrollRange16 (USER.64)
*/
void SetScrollRange16( HWND16 hwnd, INT16 nBar, INT16 MinVal, INT16 MaxVal,
BOOL16 bRedraw )
void WINAPI SetScrollRange16( HWND16 hwnd, INT16 nBar,
INT16 MinVal, INT16 MaxVal, BOOL16 bRedraw )
{
/* Invalid range -> range is set to (0,0) */
if ((INT32)MaxVal - (INT32)MinVal > 0x7fff) MinVal = MaxVal = 0;
......@@ -1102,8 +1104,8 @@ void SetScrollRange16( HWND16 hwnd, INT16 nBar, INT16 MinVal, INT16 MaxVal,
/*************************************************************************
* SetScrollRange32 (USER32.502)
*/
BOOL32 SetScrollRange32( HWND32 hwnd, INT32 nBar, INT32 MinVal, INT32 MaxVal,
BOOL32 bRedraw )
BOOL32 WINAPI SetScrollRange32( HWND32 hwnd, INT32 nBar,
INT32 MinVal, INT32 MaxVal, BOOL32 bRedraw )
{
SCROLLINFO info;
......@@ -1153,7 +1155,8 @@ DWORD SCROLL_SetNCSbState(WND* wndPtr, int vMin, int vMax, int vPos,
/*************************************************************************
* GetScrollRange16 (USER.65)
*/
BOOL16 GetScrollRange16( HWND16 hwnd, INT16 nBar, LPINT16 lpMin, LPINT16 lpMax)
BOOL16 WINAPI GetScrollRange16( HWND16 hwnd, INT16 nBar,
LPINT16 lpMin, LPINT16 lpMax)
{
INT32 min, max;
BOOL16 ret = GetScrollRange32( hwnd, nBar, &min, &max );
......@@ -1166,7 +1169,8 @@ BOOL16 GetScrollRange16( HWND16 hwnd, INT16 nBar, LPINT16 lpMin, LPINT16 lpMax)
/*************************************************************************
* GetScrollRange32 (USER32.285)
*/
BOOL32 GetScrollRange32( HWND32 hwnd, INT32 nBar, LPINT32 lpMin, LPINT32 lpMax)
BOOL32 WINAPI GetScrollRange32( HWND32 hwnd, INT32 nBar,
LPINT32 lpMin, LPINT32 lpMax)
{
SCROLLBAR_INFO *infoPtr;
......@@ -1185,7 +1189,7 @@ BOOL32 GetScrollRange32( HWND32 hwnd, INT32 nBar, LPINT32 lpMin, LPINT32 lpMax)
/*************************************************************************
* ShowScrollBar16 (USER.267)
*/
void ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
void WINAPI ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
{
ShowScrollBar32( hwnd, nBar, fShow );
}
......@@ -1194,7 +1198,7 @@ void ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
/*************************************************************************
* ShowScrollBar32 (USER32.531)
*/
BOOL32 ShowScrollBar32( HWND32 hwnd, INT32 nBar, BOOL32 fShow )
BOOL32 WINAPI ShowScrollBar32( HWND32 hwnd, INT32 nBar, BOOL32 fShow )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
......@@ -1261,7 +1265,7 @@ BOOL32 ShowScrollBar32( HWND32 hwnd, INT32 nBar, BOOL32 fShow )
/*************************************************************************
* EnableScrollBar16 (USER.482)
*/
BOOL16 EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
{
return EnableScrollBar32( hwnd, nBar, flags );
}
......@@ -1270,7 +1274,7 @@ BOOL16 EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
/*************************************************************************
* EnableScrollBar32 (USER32.170)
*/
BOOL32 EnableScrollBar32( HWND32 hwnd, INT32 nBar, UINT32 flags )
BOOL32 WINAPI EnableScrollBar32( HWND32 hwnd, INT32 nBar, UINT32 flags )
{
SCROLLBAR_INFO *infoPtr;
......
......@@ -50,13 +50,17 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
{
HICON16 prevIcon;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
CURSORICONINFO *info = hicon?(CURSORICONINFO *) GlobalLock16( hicon ):NULL;
if ((wndPtr->dwStyle & 0x0f) != SS_ICON) return 0;
if (hicon && !info) {
fprintf(stderr,"STATIC_SetIcon: huh? hicon!=0, but info=0???\n");
return 0;
}
prevIcon = infoPtr->hIcon;
infoPtr->hIcon = hicon;
if (hicon)
{
CURSORICONINFO *info = (CURSORICONINFO *) GlobalLock16( hicon );
SetWindowPos32( wndPtr->hwndSelf, 0, 0, 0, info->nWidth, info->nHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
GlobalUnlock16( hicon );
......@@ -95,8 +99,8 @@ static HICON16 STATIC_LoadIcon( WND *wndPtr, LPCSTR name )
/***********************************************************************
* StaticWndProc
*/
LRESULT StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
LPARAM lParam )
LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
LPARAM lParam )
{
LRESULT lResult = 0;
WND *wndPtr = WIN_FindWndPtr(hWnd);
......
......@@ -38,7 +38,8 @@ static STATUSWINDOWINFO *GetStatusInfo(HWND32 hwnd)
/***********************************************************************
* DrawStatusText32A (COMCTL32.3)
*/
void DrawStatusText32A( HDC32 hdc, LPRECT32 lprc, LPCSTR text, UINT32 style )
void WINAPI DrawStatusText32A( HDC32 hdc, LPRECT32 lprc, LPCSTR text,
UINT32 style )
{
RECT32 r, rt;
int oldbkmode;
......@@ -435,8 +436,8 @@ SW_Paint(STATUSWINDOWINFO *self, HWND32 hwnd)
return 0;
}
LRESULT StatusWindowProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
LRESULT WINAPI StatusWindowProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam )
{
STATUSWINDOWINFO *self;
......@@ -480,8 +481,8 @@ LRESULT StatusWindowProc( HWND32 hwnd, UINT32 msg,
/***********************************************************************
* CreateStatusWindow32A (COMCTL32.4)
*/
HWND32 CreateStatusWindow32A( INT32 style, LPCSTR text, HWND32 parent,
UINT32 wid )
HWND32 WINAPI CreateStatusWindow32A( INT32 style, LPCSTR text, HWND32 parent,
UINT32 wid )
{
HWND32 ret;
ATOM atom;
......
This diff is collapsed.
......@@ -12,6 +12,7 @@
#include "static.h"
#include "status.h"
#include "scroll.h"
#include "updown.h"
#include "desktop.h"
#include "mdi.h"
#include "gdi.h"
......@@ -20,18 +21,18 @@
/* Window procedures */
extern LRESULT EditWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT ComboWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT ComboLBWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT ListBoxWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT PopupMenuWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT IconTitleWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT WINAPI EditWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI ComboLBWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI ListBoxWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI PopupMenuWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
extern LRESULT WINAPI IconTitleWndProc( HWND32 hwnd, UINT32 msg,
WPARAM32 wParam, LPARAM lParam );
/* Win16 class info */
......@@ -102,6 +103,8 @@ 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 }
};
#define NB_COMMON_CONTROLS32 \
......@@ -160,7 +163,7 @@ BOOL32 WIDGETS_Init(void)
/***********************************************************************
* InitCommonControls (COMCTL32.15)
*/
void InitCommonControls(void)
void WINAPI InitCommonControls(void)
{
int i;
char name[30];
......
......@@ -504,8 +504,10 @@ static void DEBUG_Main( int signal )
DEBUG_SilentBackTrace();
}
if( signal != SIGTRAP )
{
if ((signal != SIGTRAP) ||
(dbg_exec_mode == EXEC_STEPI_OVER) ||
(dbg_exec_mode == EXEC_STEPI_INSTR))
{
/* Show where we crashed */
curr_frame = 0;
DEBUG_PrintAddress( &addr, dbg_mode, TRUE );
......@@ -515,7 +517,7 @@ static void DEBUG_Main( int signal )
DEBUG_Disasm( &addr, TRUE );
fprintf(stderr,"\n");
}
}
}
ret_ok = 0;
do
......
......@@ -2,7 +2,7 @@
How To Convert Windows Fonts
============================
If you have access to Windows installation you should use
If you have access to a Windows installation you should use
fnt2bdf utility (found in the 'tools)' directory to convert
bitmap fonts (VGASYS.FON, SSERIFE.FON, and SERIFE.FON) into
the format that X Window System can recognize.
......@@ -21,18 +21,21 @@ Step 4. Run 'mkfontdir' for the directory you copied fonts to.
If you are already in X you should run 'xset fp rehash'
to make X server aware of the new fonts.
Step 5. Edit wine.conf file to remove aliases for the fonts
Step 5. Edit WINE.CONF file to remove aliases for the fonts
you've just installed.
Wine can get by without these fonts but 'the look and feel'
will be quite different. Also, some applications try to load
their custom fonts on the fly (WinWord 6.0) and since Wine does
WINE can get by without these fonts but 'the look and feel'
may be quite different. Also, some applications try to load
their custom fonts on the fly (WinWord 6.0) and since WINE does
not implement this yet it instead prints out something like;
STUB: AddFontResource( somefile.FON )
STUB: AddFontResource( SOMEFILE.FON )
You can convert this file too. Note that .FON file may not hold
any bitmap fonts and fnt2bdf will fail if this is the case.
any bitmap fonts and fnt2bdf will fail if this is the case. Also
note that although the above message will not disappear WINE will
work around the problem by using the font you extracted from the
SOMEFILE.FON.
What to do with TrueType fonts? There are several commercial
font tools that can convert them to the Type1 format but the
......@@ -44,53 +47,75 @@ However, there is a possibility of the native TrueType support
via FreeType renderer in the future (hint, hint :-)
WINE.CONF And Font Mapper
=========================
How To Add Font Aliases To WINE.CONF
====================================
Many Windows applications assume that fonts included in original Windows 3.1
distribution (Arial, Times New Roman, MS Sans Serif, etc.) are always present.
In order to make font mapper choose a closely related font you can add aliases
to the [fonts] section.
distribution are always present. By default Wine creates a number of aliases
that map them on the existing X fonts:
Windows font ...is mapped to... X font
"MS Sans Serif" -> "-adobe-helvetica-"
"MS Serif" -> "-bitstream-charter-"
"Times New Roman" -> "-adobe-times-"
"Arial" -> "-adobe-helvetica-"
There is no default alias for the "System" font. Also, no aliases are
created for the fonts that applications install at runtime. The recommended
way to deal with this problem is to convert the missing font (see above).
If it proves impossible, like in the case with TrueType fonts, you can force
the font mapper to choose a closely related X font by adding an alias to the
[fonts] section. Make sure that the X font actually exists (with xfontsel
tool).
AliasN = [Windows font], [X font] <, optional "mask X font" flag>
Example:
Alias0 = System, --international-, mask
Alias1 = Arial, -adobe-helvetica-
Alias2 = Times New Roman, -adobe-times-
Alias0 = System, --international-, subst
Alias1 = ...
...
Comments:
There must be no gaps in the sequence {0, ..., N} otherwise all aliases
* There must be no gaps in the sequence {0, ..., N} otherwise all aliases
after the first gap won't be read.
Usually font mapper translates X font names into font names visible to
* Usually font mapper translates X font names into font names visible to
Windows programs in the following fashion:
X font Converted name
X font ...will show up as... Extracted name
-adobe-helvetica-... "Helvetica"
-adobe-utopia-... "Utopia"
-misc-fixed-... "Fixed"
--international-... -> "International"
-adobe-helvetica-... -> "Helvetica"
-adobe-utopia-... -> "Utopia"
-misc-fixed-... -> "Fixed"
-...
-sony-fixed-... "Sony Fixed" (already have "Fixed")
-sony-fixed-... -> "Sony Fixed"
-...
Only converted names appear in the font selection dialogs. However,
if there is an alias with the "mask" flag set converted name will be
replaced by this alias.
Note that since -misc-fixed- and -sony-fixed- are different fonts
Wine modified the second extracted name to make sure Windows programs
can distinguish them because only extracted names appear in the font
selection dialogs.
* "Masking" alias replaces the original extracted name so that in the
example case we will have the following mapping:
--international- -> "System"
--international- "System"
"Nonmasking" aliases are transparent to the user and they do not
replace extracted names.
Nonmasking aliases are translated only when program asks for a font
with the name that matches an alias.
Wine discards an alias when it sees that the native X font is
available.
If you do not have an access to Windows fonts mentioned in the first
paragraph you should try to substitute them with similar X fonts.
* If you do not have access to Windows fonts mentioned in the first
paragraph you should try to substitute the "System" font with
nonmasking alias. 'xfontsel' will show you the fonts available to
X.
Alias.. = System, ...bold font without serifs
Alias.. = MS Sans Serif, ...helvetica-like font
Also, some Windows applications request fonts without specifying the
typeface name of the font. Font table starts with Arial in most Windows
......@@ -106,15 +131,16 @@ Comments:
It is better to have a scalable font family (bolds and italics included)
as the default choice because mapper checks all available fonts until
requested height and other attributes match perfectly or the end of the
font table is reached.
font table is reached. Typical X installations have scalable fonts in
the ../fonts/Type1 and ../fonts/Speedo directories.
Cached Font Metrics
===================
How To Manage Cached Font Metrics
=================================
WINE stores detailed information about available fonts in the ~/.wine/.cachedmetrics
file. You can copy it elsewhere and add this entry to the [fonts] section
in the WINE.CONF:
in your WINE.CONF:
FontMetrics = <file with metrics>
......@@ -122,3 +148,27 @@ If WINE detects changes in the X font configuration it will rebuild font
metrics from scratch and then it will overwrite ~/.wine/.cachedmetrics with
the new information. This process can take a while.
Too Small Or Too Large Fonts
============================
Windows programs may ask WINE to render a font with the height specified
in points. However, point-to-pixel ratio depends on the real physical size
of your display (15", 17", etc...). X tries to provide an estimate of that
but it can be quite different from the actual size. You can change this
ratio by adding the following entry to the [fonts] section:
Resolution = <integer value>
In general, higher numbers give you larger fonts. Try to experiment with
values in the 60 - 120 range. 96 is a good starting point.
"FONT_Init: failed to load ..." Messages On Startup
===================================================
The most likely cause is a broken fonts.dir file in one of your font
directories. You need to rerun 'mkfontdir' to rebuild this file. Read
its manpage for more information.
......@@ -45,12 +45,14 @@ the section entitled ``License, Warranty, and Authors of Wine''.
@sp 4
FIXME: UNIX and POSIX trademarks. @*
DOS @*
X11 @*
MS-Windows, Windows-NT, Windows 95 are registered trademarks of
Microsoft Corp. Postscript is a registered trademark of Adobe Systems
Inc. All other product names mentioned herein are the trademarks of
their respective owners.
Microsoft, Windows, MS-Windows, Windows-NT, Windows 95, and MS-DOS are
registered trademarks of Microsoft Corporation.
NT is a trademark of Northern Telecom Limited.
C++Builder is a trademark of Borland International, Inc.
Postscript is a registered trademark of Adobe Systems Inc.
Other trademarks are the property of their respective owners, which may
be registered in certain jurisdictions.
@end ifinfo
@c begin chapters on right pages
......@@ -60,7 +62,7 @@ their respective owners.
@sp 10
@center @titlefont{The Wine Reference Manual}
@center Edition 0.0.2, 21 July 1997
@center Edition 0.0.3, 14 August 1997
@c The following two commands start the copyright page.
......@@ -81,10 +83,14 @@ the section entitled ``License, Warranty, and Authors of Wine''.
@sp 4
FIXME: UNIX and POSIX trademarks. @*
MS-Windows, Windows-NT, Windows 95 are registered trademarks of
Microsoft Corp. Postscript is a registered trademark of Adobe Systems
Inc. All other product names mentioned herein are the trademarks of
their respective owners.
X11 @*
Microsoft, Windows, MS-Windows, Windows-NT, Windows 95, and MS-DOS are
registered trademarks of Microsoft Corporation.
NT is a trademark of Northern Telecom Limited.
C++Builder is a trademark of Borland International, Inc.
Postscript is a registered trademark of Adobe Systems Inc.
Other trademarks are the property of their respective owners, which may
be registered in certain jurisdictions.
@end titlepage
......@@ -95,12 +101,12 @@ their respective owners.
@c Edit this macro manually in the above parts of the document
@macro winemanualversion
0.0.2
0.0.3
@end macro
@c Edit this macro manually in the above parts of the document
@macro winemanualdate
21 July 1997
14 August 1997
@end macro
@c Edit this macro manually into the TeX titlepage
......@@ -135,6 +141,11 @@ WIN16
Windows NT
@end macro
@c FIXME: automatical trademark reference
@macro WINNT40
Windows NT 4.0
@end macro
@c FIXME: automatical trademark reference
@macro WIN95
Windows 95
......@@ -409,12 +420,12 @@ You should consult the files @file{README}, @file{ANNOUNCE},
@file{RELEASE-NOTES}, @file{BUGS}, @file{LICENSE}, and @file{WARRANTY},
in the root directory of the Wine distribution.
The Wine FAQ, available from
@url{ftp://ftp.asgardpro.com/wine/dave/Wine.FAQ},
@url{ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/Wine.FAQ},
@url{ftp://rtfm.mit.edu/pub/usenet-by-group/comp.emulators.ms-windows.wine/WINE_(WINdows_Emulator)_Frequently_Asked_Questions},
@url{ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/Wine.FAQ},
@url{http://www.asgardpro.com/wine/index.html},
The Wine FAQ, available from @*
@url{ftp://ftp.asgardpro.com/wine/dave/Wine.FAQ}, @*
@url{ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/Wine.FAQ}, @*
@url{ftp://rtfm.mit.edu/pub/usenet-by-group/comp.emulators.ms-windows.wine/WINE_(WINdows_Emulator)_Frequently_Asked_Questions}, @*
@url{ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/Wine.FAQ}, @*
@url{http://www.asgardpro.com/wine/index.html}, @*
gives answer to a lot of questions.
The Wine USENET newsgroup is interesting for developers. It discusses technical
......@@ -702,8 +713,10 @@ This is not present in the @mswindows{} API. (Wine value: 0x0008).
The file is a directory. (Wine value: 0x0010).
@end defvr
@defvr_cw32 FILE_ATTRIBUTE_ARCHIVE
The file is an archive file. All non-directory files are reported by Wine
to have this attribute. (Wine value: 0x0020).
The file is an archive file. Currently, all non-directory files are
reported by Wine to have this attribute. This attribute is normally set
by @mswindows{} to indicate that a file is to be archived; when the file
is archived, the flag is cleared. (Wine value: 0x0020).
@end defvr
@defvr_cw32 FILE_ATTRIBUTE_NORMAL
The file does not have any other attributes set. This value must be used
......@@ -948,7 +961,21 @@ variable by specifying its name or its ordinal. Although reference by
name is the common usage, some program parts (notably DLL's themselves)
sometimes refer to DLL entries by ordinal. Therefore, the ordinals
cannot be chosen arbitrarily.
@* FIXME: is that correct?
Regular programs that are compiled and linked against @mswindows{} DLL's
will import DLL functions by name. This is therefore the default
behaviour. Most DLL functions will be imported by name in all cases.
Apparently, the @WIN32{} DLL's even show some difference in the mapping
of functions and ordinals on @WINNT{} and @WIN95{}. For most DLL
functions, the ordinal number will not matter.
There are some exceptions to that. Notable the KERNEL32 ordinals below
100 are (presently) unnamed and undocumented functions which can only be
imported by ordinal. These functions are called by some @mswindows{}
programs. Also the @file{shell32.dll} functions are reported to be
imported by ordinal in some other DLL's.
@xref{Getting information on the API}, for sources of further information.
@node Spec file header, Variable entry points, Ordinals, The spec files
@subsubsection The header of a @file{.spec}-file
......@@ -1034,7 +1061,8 @@ A @WIN16{} function that returns a 32 bit value.
@item register
A function using CPU registers to pass arguments.
@item stdcall
A normal @WIN32{} function.
A normal @WIN32{} function. @xref{Investigating the undocumented API},
for an explanation of the stdcall calling convention.
@item cdecl
A @WIN32{} function using the C calling conventions. (This is presently
only used for the built-in functions of the C runtime system).
......@@ -1097,6 +1125,9 @@ the called function will be passed a pointer to the first arg; in
See the @code{wsprintf}* functions in @file{user.spec} and
@file{user32.spec} for an example.
Sometimes it is not known how many arguments an undocumented DLL
function takes. @xref{Getting information on the API}, for some hints on
how to proceed in such a case.
@node Special entries, , Function entry points, The spec files
@subsubsection Special entries of @file{.spec}-files
......@@ -1132,8 +1163,10 @@ should do nothing but return a value.
@var{ORDINAL} is replaced by the ordinal number corresponding to the
function. @var{ARGLENGTH} is the number of bytes that need to be removed
from the stack before returning to the caller. @var{RETVALUE} is the
return value which will be passed back to the caller.
from the stack before returning to the caller. @xref{Investigating the
undocumented API}, for an explanation of the stdcall calling convention.
@var{RETVALUE} is the return value which will be passed back to the
caller.
@strong{Extern ordinals}
......@@ -1182,6 +1215,10 @@ If you are new to Wine and want to support this project, here are
some suggestions.
@menu
* Getting information on the API:: Official and unofficial sources
of information on the @WIN32{} API.
* Investigating the undocumented API:: You can find out some API
information on your own.
* Implementing an API type:: How to implement a data type
of the API (a checklist).
* Implementing an API function:: How to implement one function
......@@ -1198,9 +1235,268 @@ some suggestions.
@xref{Debugging}, for advice on how to debug Wine.
@xref{Applying patches}, for instructions on applying patches.
FIXME: what is most urgently needed
@node Implementing an API type, Implementing an API function, , The Wine Project
@node Getting information on the API, Investigating the undocumented API, , The Wine Project
@section Official and unofficial documentation on the @mswindows{} API
@cindex documentation of API functions
@cindex undocumented API functions
@strong{Official documentation}
For documentation on @WIN32{} API functions, you might try one of these
sources:
@itemize @bullet
@item
There is a free online version of the MSDN library (including
documentation for the @WIN32{} API) on
@url{http://www.microsoft.com/msdn/}.
@item
The @WINNT{} DDK gives information about some kernel (``executive'')
routines. Some of the function documentation might also apply to user
accessible DLL's.
@end itemize
@strong{Unofficial documentation}
Not all of the @WIN32{} API is well documented. Some functions are
obscured, and undocumented. @xref{Ordinals}, for information about
undocumented functions imported by ordinal. Getting to know what these
functions do can be tiresome and tedious. Here is a quote from a
news posting concerning two books that might help:
@c From: vischne@ibm.net-nospam (root)
@c Subject: Re: Functions
@c Newsgroups: comp.emulators.ms-windows.wine
@c Date: 24 Jul 97 16:45:11 GMT
@c Organization: The Light
@c NNTP-Posting-Host: 129.37.246.203
@c Message-ID: <33d78697.0@news3.ibm.net>
@quotation
Well actually, there are at least _two_ books that address these problems.
One is by Matt Pietrek, ``Windows 95 System Programming Secrets'', which
gives some auxiliary programs for helping ferret out the information, and
the other is by Shulman, ``Undocumented Windows 95''.
@end quotation
@xref{Ordinals}, for some notes on undocumented kernel functions.
@itemize @bullet
@item
@cindex book on undocumented API features by Pietrik
``Windows 95 System Programming Secrets'' @*
by Matt Pietrek @*
Book & Disk Edition @*
Paperback, 778 pages @*
Published by IDG Books Worldwide @*
Publication date: November 1, 1995 @*
Dimensions (in inches): 9.25 x 7.42 x 2.06 @*
ISBN: 1568843186 @*
@item
@cindex book on undocumented API features by Schulman
``Undocumented Windows; A Programmers Guide
to Reserved Microsoft Windows API Functions'' @*
by Andrew Schulman @*
Paperback, 715 pages @*
Published by Addison-Wesley Pub Co @*
Publication date: February 1, 1994 @*
Dimensions (in inches): 9.11 x 7.37 x 1.53 @*
ISBN: 0201608340 @*
@item
More books on these topics (including Schulman and Pietrik): @*
@url{http://www.sonic.net/~undoc/bookstore.html}
@item
More details about calling undocumented functions can be found at
@url{http://ftp.uni-mannheim.de/info/OReilly/windows/win95.update/dirty.html}.
@item
In 1993 Dr. Dobbs Journal published a column called ``Undocumented
Corner''.
@item
You might want to check out BYTE from December 1983 as well.
@* FIXME: is that to be taken seriously?
@item
And you might try to find out something on your own. @xref{Investigating
the undocumented API}, for details.
@end itemize
But, all in all, @url{news:comp.emulators.ms-windows.wine} says
@c From: dacut@henry.ece.cmu.edu (David A. Cuthbert)
@c Subject: Re: Getting Internet Explorer to work
@c Newsgroups: comp.emulators.ms-windows.wine
@c Date: 24 Jul 1997 03:10:30 GMT
@c Organization: Electrical & Computer Engineering, Carnegie Mellon University
@c Reply-To: henry.ece.cmu.edu!dacut
@c Message-ID: <5r6h36$86c@fs7.ece.cmu.edu>
@c NNTP-Posting-Host: henry.ece.cmu.edu
@quotation
Unfortunately, short of getting something like NuMega's SoftIce, I
don't think there's a ``good'' reference on the mystery <100 ordinals in
KERNEL32.DLL.
@end quotation
@node Investigating the undocumented API, Implementing an API type, Getting information on the API, The Wine Project
@section Investigating the undocumented API
@cindex undocumented API investigation
@cindex parameters of undocumented API functions
@cindex stdcall calling convention
@cindex C calling convention
@cindex API function parameters investigation
@cindex stack handling under stdcall calling
Besides reading the documentation in @ref{Getting information on the API},
you can find out some properties of API functions on your own.
Sometimes it is not known how many arguments an undocumented DLL
function takes. Here is a text from a news posting that gives some
hints on how you might proceed in this case.
@c The following text is closely quoted from:
@c From: dacut@henry.ece.cmu.edu (David A. Cuthbert)
@c Subject: Win32 stub functions (Claus Fischer, please read)
@c Newsgroups: comp.emulators.ms-windows.wine
@c Date: 7 Aug 1997 22:33:09 GMT
@c Organization: Electrical & Computer Engineering, Carnegie Mellon University
@c Reply-To: henry.ece.cmu.edu!dacut
@c Message-ID: <5sdif5$qt3@fs7.ece.cmu.edu>
The problem with implementing stubs for @WIN32{} functions is that it is
not sufficient to return a default value (usually 0) and leave the
stack the way we found it. For most @WIN32{} functions -- those that use
the @dfn{stdcall} calling convention -- the arguments sent to the function
are removed from the stack.
Some background: On the i386 class of machines, stack entries are
usually dword (4 bytes) in size, little-endian. The stack grows
downward in memory. The stack pointer, maintained in the @samp{esp}
register, points to the last valid entry; thus, the operation of
pushing a value onto the stack involves decrementing @samp{esp} and then
moving the value into the memory pointed to by esp (i.e., @code{push p}
in assembly resembles @code{*(--esp) = p;} in C). Removing (popping)
values off the stack is the reverse (i.e., @code{pop p} corresponds to
@code{p = *(esp++);}).
In the @dfn{stdcall} calling convention, arguments are pushed onto the
stack right-to-left. For example, the C call
@example
myfunction(40, 20, 70, 30);
@end example
is expressed in Intel assembly as:
@example
push 30
push 70
push 20
push 40
call myfunction
@end example
In addition, the called function is responsible for removing the
arguments off the stack. Thus, before the call to myfunction, the
stack would look like:
@example
[local variable or temporary]
[local variable or temporary]
30
70
20
esp -> 40
@end example
After the call returns, it should look like:
@example
[local variable or temporary]
esp -> [local variable or temporary]
@end example
To restore the stack to this state, the called function must know how
many arguments to remove (which is the number of arguments it takes).
This is a problem if the function is undocumented.
One way to attempt to document the number of arguments each function
takes is to create a wrapper around that function that detects the
stack offset. @file{WinRelay} (see below) was written to create such
wrappers. Essentially, each wrapper assumes that the function will take
a large number of arguments (by default, 64 in @file{WinRelay}). The
wrapper copies each of these arguments into its stack, calls the actual
function, and then calculates the number of arguments by checking esp
before and after the call.
@cindex bsod (blue screen of death)
@cindex blue screen of death
The main problem with this scheme is that the function must actually
be called from another program. Many of these functions are seldom
used. An attempt was made to aggressively query each function in a
given library (@file{ntdll.dll}) by passing 64 arguments, all 0, to each
function. Unfortunately, @WINNT40{} quickly goes to a blue screen
of death (@dfn{bsod}), even if the program is run from a
non-administrator account.
Another method that has been much more successful is to attempt to
figure out how many arguments each function is removing from the
stack. This instruction, @code{ret hhll} (where @samp{hhll} is the
number of bytes to remove, i.e. the number of arguments times 4), contains
the bytes @samp{0xc2 ll hh} in memory. It is a reasonable assumption
that few, if any, functions take more than 16 arguments; therefore,
@samp{hh} is 0x0 and @samp{ll} is less than 0x40. This utility,
@file{MakeSpec} (see below), simply queries the address of a function
and looks for the first occurrence of the bytes @samp{0xc2 ll 0x0},
where @math{@samp{ll} <= 0x40}.
Of course, this is not without errors. @code{ret 00ll} is not the only
instruction that can have the byte sequence @samp{0xc2 ll 0x0}; for
example, @code{push 0x000040c2} has the byte sequence
@samp{0x68 0xc2 0x40 0x0 0x0}, which matches the above. Properly, the
utility should look for this sequence only on an instruction boundary;
unfortunately, finding instruction boundaries on an i386 requires
implementing a full disassemble -- quite a daunting task. Besides,
the probability of having such a byte sequence that is not the actual
return instruction is fairly low.
Much more troublesome is the non-linear flow of a function. For
example, consider the following two functions:
@example
somefunction1:
jmp somefunction1_impl
somefunction2:
ret 0004
somefunction1_impl:
ret 0008
@end example
@file{MakeSpec} would incorrectly list both @code{somefunction1} and
@code{somefunction2} as taking only a single argument, whereas
@code{somefunction1} really takes two arguments.
With these limitations in mind, it is possible to implement more stubs
in Wine and, eventually, the functions themselves.
@c end of quote
The program @file{WinRelay} can be downloaded from
@url{http://www.ece.cmu.edu/afs/ece/usr/dacut/www/src},
and @file{MakeSpec} will be available from the same location. You can
compile them with Borland's C++Builder; you should not optimize when
compiling (@file{WinRelay} needs the stack frames).
@node Implementing an API type, Implementing an API function, Investigating the undocumented API, The Wine Project
@section Implementing an API type
Here is a checklist that should help you writing your first API type. It
......@@ -1278,6 +1574,11 @@ declared in Wine. Otherwise, start with the data types.
Find out how the function should be named in Wine and in the DLL's.
@xref{API function and type naming}, for details.
@item
Find out what the function should do. This may be tricky for
undocumented functions. @xref{Getting information on the API}, for some
hints.
@item
Find out where the function should go:
@enumerate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment