Release 971101

Thu Oct 30 21:52:23 1997  Martin Boehme <boehme@informatik.mu-luebeck.de>

	* [windows/nonclient.c]
	Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
	i.e. system menu already appears when mouse button is depressed.
	Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
	bar arrows are handled the same way as single clicks.

	* [windows/winpos.c]
	Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
	set; this is the way MS-Windows behaves.

Thu Oct 30 21:08:57 1997  Morten Welinder  <terra@diku.dk>

	* [controls/status.c]
	In SW_SetText, fix condition, I hope.

	* [controls/menu.c]
 	(GetMenuState32): Don't mask return value. Print more debug info.
	(MENU_MenuBarCalcSize): Be more careful when printing debug
	information.
	(MENU_SetItemData): Empty strings are separators.

	* [graphics/x11drv/text.c]
	Don't prototype CLIPPING_IntersectClipRect.

	* [include/dc.h]
	Prototype CLIPPING_IntersectClipRect.

	* [objects/font.c]
	Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
	In CreateFont32W and CreateFont16, handle null font name.

	* [objects/text.c]
 	(TEXT_NextLine): Fix end-of-line bug.

	* [if1632/shell32.spec]
	Activate existing implementation of ExtractIconA.

	* [misc/shell.c]
	For Control_RunDLL, add types for parameters.

Thu Oct 30 14:54:11 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [controls/static.c] [include/windows.h] [misc/spy.c]
	Added some win32 defines to static controls, basic SS_BITMAP style
	handling implemented. [please add more, I am lacking knowledge and
	time]

	* [controls/status.c]
	part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)

	* [if1632/thunk.c] [tools/build.c]
	Support lret and 0x66 lret calls for CallTo16_regs
	(needed for KERNEL32_45)
	Fixed KERNEL32_45, QT_Thunk (should work now).

	* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
	Added string dumping to relay debugging for win32 apifuncs.

	* [misc/ver.c]
	Fixed and cleaned up VerQueryValue*.

	* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
	  [if1632/winmm.spec]
	Win32 support for lowlevel multimedia functions.
	Added some mixer* lowlevel functions.
	Some small fixes in the audio lowlevel queue handling, code
	reformatting/cleanups.

	* [debugger/hash.c]
	Don't show difference between 16bit symbols if they are in
	different segments.

	* [objects/cursoricon.c]
	Added GetIconInfo (partial) and CreateIconIndirect.

	* [windows/mdi.c]
	Fixed some "bad class" problems and crashes in MDICreateChild,
	which happen in Win32 (jwp32.exe).

Wed Oct 29 00:57:27 1997  Bruce Milner  <Bruce.Milner@genetics.utah.edu>

	* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
	  [documentation/aspi] [include/callback.h]
	Added support for 16 bit ASPI calls to linux generic SCSI.
	The support is not complete, but appears to run my Mustek
	scanner from within ipplus.exe.

Mon Oct 27 00:59:41 1997  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [windows/dce.c]
	DC reuse framework.

Sun Oct 26 18:41:21 1997  Huw D M Davies <h.davies1@physics.oxford.ac.uk>

	* [graphics/x11drv/xfont.c]
	Substituted fonts are removed from the alias table. References to
	the old name are also updated.

	* [controls/combo.c]
	LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
	ComboLBox.

Sun Oct 26 14:25:00 1997  Nikita V. Youshchenko <yoush@cs.msu.su>

	* [include/drive.h] [files/drive.c] [msdos/int21.c]
	Partially implemented DOS drive mapping (int21 AX=440F).

Sat Oct 25 13:03:29 1997  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [debugger/debug.l]
	Support '.' in identifiers. Use "x . y" to access structure
	fields.

	* [debugger/hash.c] [loader/pe_image.c]
	Load entry points of Win32 modules only when entering the
	debugger.

	* [debugger/break.c]
	New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
	the start of every module.

	* [files/file.c]
	FILE_mmap() can now fake mmap() for unaligned offsets or broken
	filesystems.

	* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
	Use a table of callbacks instead of macros to differentiate
	between emulator and Winelib.

	* [loader/task.c]
	Initialize current directory from cwd, not from module path.

	* [tools/build.c]
	Read CallTo16 prototypes directly from thunk.c source file.

	* [windows/winproc.c] [windows/mdi.c]
	Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.

Fri Oct 24 21:41:25 1997  Uwe Bonnes  <bon@elektron.ikp.tu-darmstadt.de>

	* [files/drive.c]
	Allow arguments like "a" for the drive related apis.

	* [memory/global.c]
	Keep the calculation for dwMemoryLoad in range.

	* [misc/crtdll.c]
	Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
	its memory if requested.
	Implemented CRTDLL_rename and CRTDLL_stat needed for
	lcc-win32:wedit.exe.
	Implemented CRTDLL__fullpath.

	* [misc/comm.c]
	High speed modes for the 16-bit mode Comm functions.

	* [misc/cpu.c]
	As applications may treat lpMaximumApplicationAddress as long,
	use a valid long number.

	* [misc/main.c]
	In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.

	* [misc/ole2nls.c]
	Implement LCMAP_UPPERCASE for LCMapString32.

	* [misc/wsprintf]
	Made WPRINTF_ParseFormatA understand %ws.

	* [win32/file.c]
	Ignore FILE_ATTRIBUTE_NORMAL.
	Stub for ReadFileEx.

Fri Oct 24 15:36:02 1997  Doug Ridgway <ridgway@routh.ucsd.edu>

	* [memory/local.c]
	Local heap exhaustion message now prints which builtin heap filled.

Fri Oct 24 00:46:34 1997  Huw D M Davies <h.davies1@physics.oxford.ac.uk>

	* [windows/dialog.c]
	Reversed CreateFont16/32W typo.

Thu Oct 23 23:44:20 1997  Kristian Nielsen  <kristian.nielsen@risoe.dk>

	* [if1632/user.spec]
	Fixed argument list for ChangeClipboardChain.

	* [windows/mdi.c]
	Pass correct hInstance to CreateWindow16() in MDICreateChild().

Mon Oct 20 11:51:24 1997  Carsten Fallesen <cf@it.dtu.dk>

	* [objects/metafile.c]
	Added support for META_SETTEXTCHAREXTRA.

	* [objects/region.c]
	Fixed crash in XPolygonRegion if there is only one point in 
	in the region.

	* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
	  [objects/gdiobj.c]
	Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c 
	and included gdi.h instead. Implemented GetObjectType32().

Thu Oct 16 17:21:32 1997  Philippe De Muyter  <phdm@info.ucl.ac.be>

	* [documentation/wine.texinfo]
	Fixed WIN32 and Makefiles entries of Reference manual node, that
	made makeinfo dump core.

Mon Oct 13 17:15:57 1997  Robert Wilhelm  <robert@physiol.med.tu-muenchen.de>

	* [if1632/crtdll.spec]
	Added missing math functions y0(), y1(), y2(), floor(), frexp(),
	ldexp(), modf().
This commit is contained in:
Alexandre Julliard 1997-11-01 19:08:16 +00:00
parent 17216f5637
commit 491502b951
135 changed files with 9494 additions and 4550 deletions

View File

@ -1,14 +1,14 @@
This is release 971012 of Wine, the MS Windows emulator. This is still a
This is release 971101 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-971012: (see ChangeLog for details)
- Improvements to printer driver support.
- More common controls functions.
- Win32 relay code changes.
WHAT'S NEW with Wine-971101: (see ChangeLog for details)
- Win32 version of multimedia functions.
- ASPI support.
- Better DCE handling (in progress).
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
@ -17,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-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
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-971101.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-971101.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-971101.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-971101.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.

18
BUGS
View File

@ -5,12 +5,10 @@ done something for one of the problems. You are encouraged to
add new entries and, more importantly, remove those for the
bugs you fixed ;-)
------------------------------------------------------------
As of Sept 1997 -
As of Oct 1997 -
General:
* Catch/Throw() do not save SI and DI registers (quite fatal).
* We need to do InsertMenuItem32[AW] and then code most of the other
inserting function in terms of this. Without this, we cannot support
all the new extended menus. Not hard, but slightly big.
@ -38,6 +36,14 @@ General:
Miscellaneous:
* Missing menu separators in BCW, other programs.
* BCW fails with "bad class 'MessageWindow'" message.
* MIRC is unable to show 'Options' dialog.
* Tab switching in MIRC 'Setup' dialog leaks memory.
* nBytesWidth in CURSORICONINFO is bogus for some bpp
(doesn't reflect the fact that bits are packed and 16-bit aligned).
@ -47,16 +53,12 @@ Miscellaneous:
* Netscape displays partially downloaded inline graphics with
wrong offsets. Bitmap is missing in the splash-window.
* BCW 4.5 crashes after SwitchStackBack().
* Text alignment problems in Word and Write (variable pitch fonts).
* Font mapper weights
* Font mapper weights are rather crude.
* "Cursor XXXX has more than 1 bpp!"
* Margins in edit controls are too wide.
* SGI window manager treats Wine windows as topmost.
* Write shows blank space instead of Paintbrush OLE1 object ( GetDIBits()? ).

220
ChangeLog
View File

@ -1,3 +1,223 @@
----------------------------------------------------------------------
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <Alexandre.Julliard@urbanet.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
----------------------------------------------------------------------
Sun Oct 12 15:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch>

View File

@ -170,12 +170,14 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_SETTEXT:
DEFWND_SetText( wndPtr, (LPSTR)lParam );
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
if( wndPtr->dwStyle & WS_VISIBLE )
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
return 0;
case WM_SETFONT:
infoPtr->hFont = (HFONT16)wParam;
if (lParam) PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
if (lParam && (wndPtr->dwStyle & WS_VISIBLE))
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
break;
case WM_GETFONT:

View File

@ -1128,7 +1128,7 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT32 index, INT32 height
*/
static LRESULT COMBO_SelectString( LPHEADCOMBO lphc, INT32 start, LPCSTR pText )
{
INT32 index = SendMessage32A( lphc->hWndLBox, CB_SELECTSTRING32,
INT32 index = SendMessage32A( lphc->hWndLBox, LB_SELECTSTRING32,
(WPARAM32)start, (LPARAM)pText );
if( index >= 0 )
if( lphc->wState & CBF_EDIT )

View File

@ -978,7 +978,7 @@ static INT32 EDIT_CallWordBreakProc(WND *wnd, EDITSTATE *es, INT32 start, INT32
if (es->word_break_proc16) {
HLOCAL16 hloc16 = EDIT_EM_GetHandle16(wnd, es);
SEGPTR segptr = LocalLock16(hloc16);
INT32 ret = (INT32)CallWordBreakProc16((FARPROC16)es->word_break_proc16,
INT32 ret = (INT32)Callbacks->CallWordBreakProc(es->word_break_proc16,
segptr + start, index, count, action);
LocalUnlock16(hloc16);
return ret;

View File

@ -754,10 +754,10 @@ static void MENU_MenuBarCalcSize( HDC32 hdc, LPRECT32 lprect,
if ((i != start) &&
(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
dprintf_menu( stddeb, "MENU_MenuBarCalcSize: calling "
"MENU_CalcItemSize on item '%s', org=(%d, %d)\n",
lpitem->text, orgX, orgY );
dprintf_menu( stddeb,
"MENU_MenuBarCalcSize: calling MENU_CalcItemSize"
" org=(%d, %d)\n", orgX, orgY );
debug_print_menuitem (" item: ", lpitem, "\n");
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, TRUE );
if (lpitem->rect.right > lprect->right)
{
@ -1396,7 +1396,7 @@ static BOOL32 MENU_SetItemData( MENUITEM *item, UINT32 flags, UINT32 id,
if (IS_STRING_ITEM(flags))
{
if (!str)
if (!str || !*str)
{
flags |= MF_SEPARATOR;
item->text = NULL;
@ -1904,7 +1904,7 @@ static BOOL32 MENU_ButtonUp( MTRACKER* pmt, HMENU32 hPtMenu )
else
item = MENU_FindItemByCoords( ptmenu, pmt->pt, &id );
if( ptmenu->FocusedItem == id )
if( item && (ptmenu->FocusedItem == id ))
{
if( !(item->fType & MF_POPUP) )
return MENU_ExecFocusedItem( pmt, hPtMenu );
@ -2861,6 +2861,7 @@ UINT32 WINAPI GetMenuState32( HMENU32 hMenu, UINT32 wItemID, UINT32 wFlags )
dprintf_menu(stddeb,"GetMenuState(%04x, %04x, %04x);\n",
hMenu, wItemID, wFlags);
if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return -1;
debug_print_menuitem (" item: ", item, "\n");
if (item->fType & MF_POPUP)
{
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( item->hSubMenu );
@ -2868,9 +2869,12 @@ UINT32 WINAPI GetMenuState32( HMENU32 hMenu, UINT32 wItemID, UINT32 wFlags )
else return (menu->nItems << 8) | (menu->wFlags & 0xff);
}
else
/* Non POPUP Menus only return flags in the lower byte */
/* XXX ??? */
return ((item->fType | item->fState) & 0x00ff);
{
/* We used to (from way back then) mask the result to 0xff. */
/* I don't know why and it seems wrong as the documented */
/* return flag MF_SEPARATOR is outside that mask. */
return (item->fType | item->fState);
}
}

View File

@ -410,18 +410,20 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
r = *rect;
if (vertical)
{
r.top += arrowSize;
r.top += arrowSize - 1;
r.bottom -= arrowSize;
r.right--;
}
else
{
r.left += arrowSize;
r.left += arrowSize - 1;
r.right -= arrowSize;
r.bottom--;
}
/* Draw the scroll bar frame */
GRAPH_DrawRectangle( hdc, r.left, r.top, r.right - 1, r.bottom - 1, 0);
GRAPH_DrawRectangle( hdc, r.left, r.top, r.right - r.left, r.bottom - r.top, 0);
/* Draw the scroll rectangles and thumb */
@ -443,7 +445,7 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
r.right - r.left - 2,
r.bottom - r.top - thumbSize - 2,
bottom_selected ? 0x0f0000 : PATCOPY );
r.bottom = r.top + thumbSize + 1;
r.bottom = r.top + thumbSize + 2;
}
else /* horizontal */
{
@ -456,7 +458,7 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
r.right - r.left - thumbSize - 2,
r.bottom - r.top - 2,
bottom_selected ? 0x0f0000 : PATCOPY );
r.right = r.left + thumbSize + 1;
r.right = r.left + thumbSize + 2;
}
/* Draw the thumb */

View File

@ -8,12 +8,15 @@
#include <stdio.h>
#include "windows.h"
#include "win.h"
#include "bitmap.h"
#include "cursoricon.h"
#include "static.h"
#include "heap.h"
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintBitmapfn( WND *wndPtr, HDC32 hdc );
static COLORREF color_windowframe, color_background, color_window;
@ -21,9 +24,7 @@ static COLORREF color_windowframe, color_background, color_window;
typedef void (*pfPaint)( WND *, HDC32 );
#define LAST_STATIC_TYPE SS_LEFTNOWORDWRAP
static pfPaint staticPaintFunc[LAST_STATIC_TYPE+1] =
static pfPaint staticPaintFunc[SS_TYPEMASK+1] =
{
STATIC_PaintTextfn, /* SS_LEFT */
STATIC_PaintTextfn, /* SS_CENTER */
@ -37,7 +38,13 @@ static pfPaint staticPaintFunc[LAST_STATIC_TYPE+1] =
STATIC_PaintRectfn, /* SS_WHITEFRAME */
NULL, /* Not defined */
STATIC_PaintTextfn, /* SS_SIMPLE */
STATIC_PaintTextfn /* SS_LEFTNOWORDWRAP */
STATIC_PaintTextfn, /* SS_LEFTNOWORDWRAP */
NULL, /* SS_OWNERDRAW */
STATIC_PaintBitmapfn, /* SS_BITMAP */
NULL, /* SS_ENHMETAFILE */
NULL, /* SS_ETCHEDHORIZ */
NULL, /* SS_ETCHEDVERT */
NULL, /* SS_ETCHEDFRAME */
};
@ -52,7 +59,7 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
CURSORICONINFO *info = hicon?(CURSORICONINFO *) GlobalLock16( hicon ):NULL;
if ((wndPtr->dwStyle & 0x0f) != SS_ICON) return 0;
if ((wndPtr->dwStyle & SS_TYPEMASK) != SS_ICON) return 0;
if (hicon && !info) {
fprintf(stderr,"STATIC_SetIcon: huh? hicon!=0, but info=0???\n");
return 0;
@ -68,6 +75,33 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
return prevIcon;
}
/***********************************************************************
* STATIC_SetBitmap
*
* Set the bitmap for an SS_BITMAP control.
*/
static HICON16 STATIC_SetBitmap( WND *wndPtr, HICON16 hicon )
{
HICON16 prevIcon;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
BITMAPOBJ *info = GDI_HEAP_LOCK(hicon);
if ((wndPtr->dwStyle & SS_TYPEMASK) != SS_BITMAP) return 0;
if (hicon && !info) {
fprintf(stderr,"STATIC_SetBitmap: huh? hicon!=0, but info=0???\n");
return 0;
}
prevIcon = infoPtr->hIcon;
infoPtr->hIcon = hicon;
if (hicon)
{
SetWindowPos32( wndPtr->hwndSelf, 0, 0, 0, info->bitmap.bmWidth, info->bitmap.bmHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
}
GDI_HEAP_UNLOCK( hicon );
return prevIcon;
}
/***********************************************************************
* STATIC_LoadIcon
@ -95,6 +129,32 @@ static HICON16 STATIC_LoadIcon( WND *wndPtr, LPCSTR name )
return hicon;
}
/***********************************************************************
* STATIC_LoadBitmap
*
* Load the bitmap for an SS_BITMAP control.
*/
static HBITMAP16 STATIC_LoadBitmap( WND *wndPtr, LPCSTR name )
{
HBITMAP16 hbitmap;
if (wndPtr->flags & WIN_ISWIN32)
{
hbitmap = LoadBitmap32A( wndPtr->hInstance, name );
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */
hbitmap = LoadBitmap32A( 0, name );
}
else
{
LPSTR segname = SEGPTR_STRDUP(name);
hbitmap = LoadBitmap16( wndPtr->hInstance, SEGPTR_GET(segname) );
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */
hbitmap = LoadBitmap32A( 0, segname );
SEGPTR_FREE(segname);
}
return hbitmap;
}
/***********************************************************************
* StaticWndProc
@ -104,7 +164,7 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
{
LRESULT lResult = 0;
WND *wndPtr = WIN_FindWndPtr(hWnd);
LONG style = wndPtr->dwStyle & 0x0000000F;
LONG style = wndPtr->dwStyle & SS_TYPEMASK;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
switch (uMsg)
@ -118,10 +178,19 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
STATIC_LoadIcon( wndPtr, cs->lpszName ));
return 1;
}
if (style == SS_BITMAP)
{
CREATESTRUCT32A *cs = (CREATESTRUCT32A *)lParam;
if (cs->lpszName)
STATIC_SetBitmap( wndPtr,
STATIC_LoadBitmap( wndPtr, cs->lpszName ));
fprintf(stderr,"STATIC:style SS_BITMAP, dwStyle is 0x%08lx\n",wndPtr->dwStyle);
return 1;
}
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
case WM_CREATE:
if (style < 0L || style > LAST_STATIC_TYPE)
if (style < 0L || style > SS_TYPEMASK)
{
fprintf( stderr, "STATIC: Unknown style 0x%02lx\n", style );
lResult = -1L;
@ -136,7 +205,7 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
case WM_NCDESTROY:
if (style == SS_ICON)
DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
else
else
lResult = DefWindowProc32A( hWnd, uMsg, wParam, lParam );
break;
@ -165,7 +234,9 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
if (style == SS_ICON)
/* FIXME : should we also return the previous hIcon here ??? */
STATIC_SetIcon( wndPtr, STATIC_LoadIcon( wndPtr, (LPCSTR)lParam ));
else
else if (style == SS_BITMAP)
STATIC_SetBitmap(wndPtr,STATIC_LoadBitmap(wndPtr,(LPCSTR)lParam ));
else
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
@ -173,6 +244,7 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
case WM_SETFONT:
if (style == SS_ICON) return 0;
if (style == SS_BITMAP) return 0;
infoPtr->hFont = (HFONT16)wParam;
if (LOWORD(lParam))
{
@ -190,10 +262,20 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
case WM_GETDLGCODE:
return DLGC_STATIC;
case STM_GETICON:
return infoPtr->hIcon;
case STM_GETIMAGE:
case STM_GETICON16:
case STM_GETICON32:
return infoPtr->hIcon;
case STM_SETICON:
case STM_SETIMAGE:
/* FIXME: handle wParam */
lResult = STATIC_SetBitmap( wndPtr, (HBITMAP32)lParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
break;
case STM_SETICON16:
case STM_SETICON32:
lResult = STATIC_SetIcon( wndPtr, (HICON16)wParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
@ -219,7 +301,7 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
GetClientRect32( wndPtr->hwndSelf, &rc);
switch (style & 0x0000000F)
switch (style & SS_TYPEMASK)
{
case SS_LEFT:
wFormat = DT_LEFT | DT_EXPANDTABS | DT_WORDBREAK | DT_NOCLIP;
@ -263,7 +345,7 @@ static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc )
GetClientRect32( wndPtr->hwndSelf, &rc);
switch (wndPtr->dwStyle & 0x0f)
switch (wndPtr->dwStyle & SS_TYPEMASK)
{
case SS_BLACKRECT:
hBrush = CreateSolidBrush32(color_windowframe);
@ -308,3 +390,28 @@ static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc )
FillRect32( hdc, &rc, hbrush );
if (infoPtr->hIcon) DrawIcon32( hdc, rc.left, rc.top, infoPtr->hIcon );
}
static void STATIC_PaintBitmapfn(WND *wndPtr, HDC32 hdc )
{
RECT32 rc;
HBRUSH32 hbrush;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
HDC32 hMemDC;
HBITMAP32 oldbitmap;
GetClientRect32( wndPtr->hwndSelf, &rc );
hbrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
FillRect32( hdc, &rc, hbrush );
if (infoPtr->hIcon) {
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_HEAP_LOCK( infoPtr->hIcon );
if (!bmp) return;
if (!(hMemDC = CreateCompatibleDC32( hdc ))) return;
oldbitmap = SelectObject32(hMemDC,infoPtr->hIcon);
BitBlt32(hdc,bmp->size.cx,bmp->size.cy,bmp->bitmap.bmWidth,bmp->bitmap.bmHeight,hMemDC,0,0,SRCCOPY);
DeleteDC32(hMemDC);
GDI_HEAP_UNLOCK(infoPtr->hIcon);
}
}

View File

@ -118,10 +118,10 @@ SW_SetText(STATUSWINDOWINFO *self, HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
part_num = ((INT32) wParam) & 0x00ff;
style = ((INT32) wParam) & 0xff00;
if (part_num > 255)
if (part_num >= 255)
return FALSE;
if (self->simple)
if ((self->simple) || (part_num==255))
part = &self->part0;
else
part = &self->parts[part_num];

View File

@ -9,6 +9,9 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include "module.h"
#include "process.h"
#include "toolhelp.h"
#include "windows.h"
#include "debugger.h"
@ -225,6 +228,7 @@ void DEBUG_AddBreakpoint( const DBG_ADDR *address )
addr.off = DEBUG_GetExprValue(&addr, NULL);
addr.seg = seg2;
}
if (!DBG_CHECK_READ_PTR( &addr, 1 )) return;
if (next_bp < MAX_BREAKPOINTS)
num = next_bp++;
@ -238,7 +242,6 @@ void DEBUG_AddBreakpoint( const DBG_ADDR *address )
return;
}
}
if (!DBG_CHECK_READ_PTR( &addr, 1 )) return;
p = DBG_ADDR_TO_LIN( &addr );
breakpoints[num].addr = addr;
breakpoints[num].addrlen = !addr.seg ? 32 :
@ -325,6 +328,54 @@ void DEBUG_InfoBreakpoints(void)
}
/***********************************************************************
* DEBUG_AddModuleBreakpoints
*
* Add a breakpoint at the start of every loaded module.
*/
void DEBUG_AddModuleBreakpoints(void)
{
MODULEENTRY entry;
NE_MODULE *pModule;
BOOL32 ok;
DBG_ADDR addr = { NULL, 0, 0 };
for (ok = ModuleFirst(&entry); ok; ok = ModuleNext(&entry))
{
if (!(pModule = MODULE_GetPtr( entry.hModule ))) continue;
if (pModule->flags & NE_FFLAGS_LIBMODULE) continue; /* Library */
if (pModule->flags & NE_FFLAGS_WIN32) /* PE module */
{
PE_MODULE *pe = pModule->pe_module;
PE_MODREF *pem;
if (!pCurrentProcess) continue;
pem = pCurrentProcess->modref_list;
while (pem)
{
if (pem->pe_module == pe) break;
pem = pem->next;
}
if (!pem) continue;
addr.seg = 0;
addr.off = pem->load_addr +
(DWORD)pe->pe_header->OptionalHeader.AddressOfEntryPoint;
fprintf( stderr, "Win32 task '%s': ", entry.szModule );
DEBUG_AddBreakpoint( &addr );
}
else /* NE module */
{
addr.seg = NE_SEG_TABLE(pModule)[pModule->cs-1].selector;
addr.off = pModule->ip;
fprintf( stderr, "Win16 task '%s': ", entry.szModule );
DEBUG_AddBreakpoint( &addr );
}
}
DEBUG_SetBreakpoints( TRUE ); /* Setup breakpoints */
}
/***********************************************************************
* DEBUG_ShouldContinue
*

View File

@ -34,7 +34,7 @@ static int syntax_error;
DIGIT [0-9]
HEXDIGIT [0-9a-fA-F]
FORMAT [bcdiswx]
IDENTIFIER [_a-zA-Z~][_a-zA-Z0-9~@]*
IDENTIFIER [_a-zA-Z\.~][_a-zA-Z0-9\.~@]*
PATHNAME [/_a-zA-Z\.~][/_a-zA-Z0-9\.~@]*
STRING \"[^\n"]+\"

View File

@ -12,6 +12,7 @@
#include <sys/types.h>
#include <neexe.h>
#include "module.h"
#include "process.h"
#include "selectors.h"
#include "debugger.h"
#include "toolhelp.h"
@ -264,8 +265,7 @@ DEBUG_AddSymbol( const char * name, const DBG_ADDR *addr, const char * source,
c++;
if( (strcmp(c, "callfrom16.s") == 0)
|| (strcmp(c, "callto16.s") == 0)
|| (strcmp(c, "callfrom32.s") == 0)
|| (strcmp(c, "callto32.s") == 0) )
|| (strcmp(c, "call32.s") == 0) )
{
new->flags |= SYM_TRAMPOLINE;
}
@ -676,9 +676,13 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag,
{
if (addr->off == nearest->addr.off)
sprintf( name_buffer, "%s%s", nearest->name, arglist);
else
sprintf( name_buffer, "%s+0x%lx%s", nearest->name,
addr->off - nearest->addr.off, arglist);
else {
if (addr->seg && (nearest->addr.seg!=addr->seg))
return NULL;
else
sprintf( name_buffer, "%s+0x%lx%s", nearest->name,
addr->off - nearest->addr.off, arglist);
}
}
return name_buffer;
}
@ -733,6 +737,132 @@ void DEBUG_ReadSymbolTable( const char * filename )
}
/***********************************************************************
* DEBUG_LoadEntryPoints16
*
* Load the entry points of a Win16 module into the hash table.
*/
static void DEBUG_LoadEntryPoints16( HMODULE16 hModule, NE_MODULE *pModule,
const char *name )
{
DBG_ADDR addr;
char buffer[256];
FARPROC16 address;
/* First search the resident names */
unsigned char *cpnt = (unsigned char *)pModule + pModule->name_table;
while (*cpnt)
{
cpnt += *cpnt + 1 + sizeof(WORD);
sprintf( buffer, "%s.%.*s", name, *cpnt, cpnt + 1 );
if ((address = MODULE_GetEntryPoint( hModule,
*(WORD *)(cpnt + *cpnt + 1) )))
{
addr.seg = HIWORD(address);
addr.off = LOWORD(address);
addr.type = NULL;
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
}
}
/* Now search the non-resident names table */
if (!pModule->nrname_handle) return; /* No non-resident table */
cpnt = (char *)GlobalLock16( pModule->nrname_handle );
while (*cpnt)
{
cpnt += *cpnt + 1 + sizeof(WORD);
sprintf( buffer, "%s.%.*s", name, *cpnt, cpnt + 1 );
if ((address = MODULE_GetEntryPoint( hModule,
*(WORD *)(cpnt + *cpnt + 1) )))
{
addr.seg = HIWORD(address);
addr.off = LOWORD(address);
addr.type = NULL;
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
}
}
}
/***********************************************************************
* DEBUG_LoadEntryPoints32
*
* Load the entry points of a Win32 module into the hash table.
*/
static void DEBUG_LoadEntryPoints32( PE_MODULE *pe, const char *name )
{
#define RVA(x) (load_addr+(DWORD)(x))
DBG_ADDR addr;
char buffer[256];
int i, j;
IMAGE_EXPORT_DIRECTORY *exports;
DWORD load_addr;
WORD *ordinals;
void **functions;
const char **names;
PE_MODREF *pem = pCurrentProcess->modref_list;
while (pem && (pem->pe_module != pe)) pem = pem->next;
if (!pem) return;
load_addr = pem->load_addr;
exports = pem->pe_export;
addr.seg = 0;
addr.type = NULL;
/* Add start of DLL */
addr.off = load_addr;
DEBUG_AddSymbol( name, &addr, NULL, SYM_WIN32 | SYM_FUNC );
/* Add entry point */
sprintf( buffer, "%s.EntryPoint", name );
addr.off = RVA( pe->pe_header->OptionalHeader.AddressOfEntryPoint );
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
/* Add start of sections */
for (i = 0; i < pe->pe_header->FileHeader.NumberOfSections; i++)
{
sprintf( buffer, "%s.%s", name, pe->pe_seg[i].Name );
addr.off = RVA( pe->pe_seg[i].VirtualAddress );
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
}
/* Add exported functions */
if (!exports) return;
ordinals = (WORD *)RVA( exports->AddressOfNameOrdinals );
names = (const char **)RVA( exports->AddressOfNames );
functions = (void **)RVA( exports->AddressOfFunctions );
for (i = 0; i < exports->NumberOfNames; i++)
{
if (!names[i]) continue;
sprintf( buffer, "%s.%s", name, (char *)RVA(names[i]) );
addr.off = RVA( functions[ordinals[i]] );
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
}
for (i = 0; i < exports->NumberOfFunctions; i++)
{
if (!functions[i]) continue;
/* Check if we already added it with a name */
for (j = 0; j < exports->NumberOfNames; j++)
if ((ordinals[j] == i) && names[j]) break;
if (j < exports->NumberOfNames) continue;
sprintf( buffer, "%s.%ld", name, i + exports->Base );
addr.off = (DWORD)RVA( functions[i] );
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
}
#undef RVA
}
/***********************************************************************
* DEBUG_LoadEntryPoints
*
@ -742,58 +872,24 @@ void DEBUG_LoadEntryPoints(void)
{
MODULEENTRY entry;
NE_MODULE *pModule;
DBG_ADDR addr;
char buffer[256];
unsigned char *cpnt, *name;
FARPROC16 address;
BOOL32 ok;
for (ok = ModuleFirst(&entry); ok; ok = ModuleNext(&entry))
{
if (!(pModule = MODULE_GetPtr( entry.hModule ))) continue;
if (pModule->flags & NE_FFLAGS_WIN32) continue;
fprintf( stderr, " %s", entry.szModule );
name = (unsigned char *)pModule + pModule->name_table;
fprintf( stderr, " %.*s",*name, name + 1 );
/* First search the resident names */
cpnt = (unsigned char *)pModule + pModule->name_table;
while (*cpnt)
if (pModule->flags & NE_FFLAGS_WIN32) /* PE module */
{
cpnt += *cpnt + 1 + sizeof(WORD);
sprintf( buffer, "%.*s_%.*s", *name, name + 1, *cpnt, cpnt + 1 );
if ((address = MODULE_GetEntryPoint( entry.hModule,
*(WORD *)(cpnt + *cpnt + 1) )))
{
addr.seg = HIWORD(address);
addr.off = LOWORD(address);
addr.type = NULL;
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
}
}
/* Now search the non-resident names table */
if (!pModule->nrname_handle) continue; /* No non-resident table */
cpnt = (char *)GlobalLock16( pModule->nrname_handle );
while (*cpnt)
{
cpnt += *cpnt + 1 + sizeof(WORD);
sprintf( buffer, "%.*s_%.*s", *name, name + 1, *cpnt, cpnt + 1 );
if ((address = MODULE_GetEntryPoint( entry.hModule,
*(WORD *)(cpnt + *cpnt + 1) )))
{
addr.seg = HIWORD(address);
addr.off = LOWORD(address);
addr.type = NULL;
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32);
}
if (pModule->flags & NE_FFLAGS_BUILTIN) continue;
DEBUG_LoadEntryPoints32( pModule->pe_module, entry.szModule );
}
else /* NE module */
DEBUG_LoadEntryPoints16( entry.hModule, pModule, entry.szModule );
}
}
void
DEBUG_AddLineNumber( struct name_hash * func, int line_num,
unsigned long offset )

View File

@ -751,10 +751,13 @@ DEBUG_Print( const DBG_ADDR *addr, int count, char format, int level )
}
if( addr->type == NULL )
{
fprintf(stderr, "Unable to evaluate expression\n");
{
/* No type, just print the addr value */
if (addr->seg && (addr->seg != 0xffffffff))
DEBUG_nchar += fprintf( stderr, "0x%04lx: ", addr->seg );
DEBUG_nchar += fprintf( stderr, "0x%08lx", addr->off );
goto leave;
}
}
if( level == 0 )
{

78
documentation/aspi Normal file
View File

@ -0,0 +1,78 @@
This file describes setting up the Windows ASPI interface.
Warning/Warning/Warning!!!!!!
=============================
THIS MAY TRASH YOUR SYSTEM IF USED INCORRECTLY
THIS MAY TRASH YOUR SYSTEM IF USED CORRECTLY
Now that I have said that. ASPI is a direct link to SCSI devices from
windows programs. ASPI just forwards the SCSI commands that programs send
to it to the SCSI bus.
If you use the wrong scsi device in your setup file, you can send
completely bogus commands to the wrong device - An example would be
formatting your hard drives (assuming the device gave you permission -
if you're running as root, all bets are off).
Cookbook for setting up scanner: (At least how mine is to work)
================================
Windows requirements:
=====================
0) The scanner software needs to use the "Adaptec" compatible drivers
(ASPI). At least with Mustek, they allow you the choice of using
the builtin card or the "Adaptec (AHA)" compatible drivers. This will not
work any other way.
1) You probably need a real windows install of the software to set the
LUN's/SCSI id's up correctly. I'm not exactly sure.
LINUX requirements:
============================================================
0) Your scsi card must be supported under linux. This will not work with
an unknown scsi card.
1) Compile generic scsi drivers into your kernel.
2) Linux by default uses smaller scsi buffers than Windows. There is a
kernel build define SG_BIG_BUFF (in sg.h) that is by default set too low.
The SANE project recommends 130560 and this seems to work just fine. This
does require a kernel rebuild.
3) Make the devices for the scanner (generic scsi devices) - look at the scsi
programming how-to for device numbering.
4) I would recommend making the scanner device writable by a group.
I made a group called "scanner" and added myself to it. Running as root
increases your risk of sending bad scsi commands to the wrong device. With
a regular user, you are better protected.
5) Add a scsi device entry for your particular scanner to wine.conf.
The format is [scsi cCtTdD] where C=controller, T=target, D=LUN
ex. I set mine up as controller 0, Target 6, LUN 0.
[scsi c0t6d0]
Device=/dev/sgi
Yours will vary with your particular SCSI setup.
General Information:
====================
The mustek scanner I have was shipped with a package "ipplus". This
program uses the TWAIN driver specification to access scanners.
(TWAIN MANAGER)
ipplus.exe <---> (TWAIN INTERFACE) <---> (TWAIN DATA SOURCE . ASPI) -> WINASPI
NOTES/BUGS:
===========
The biggest is that it only works under linux at the moment.
The ASPI code was only tested using a Mustek 800SP with a Buslogic
controller under Linux.
I make no warranty to the aspi code. It makes my scanner work. Your scanner
may explode. I have no way of determining this. I take zero responsibility!
Bruce Milner

View File

@ -18,6 +18,9 @@ located in windows/, controls/, and misc/ directories.
1. Windowing subsystem
windows/win.c
windows/winpos.c
Windows are arranged into parent/child hierarchy with one
common ancestor for all windows (desktop window). Each window
structure contains a pointer to the immediate ancestor (parent
@ -63,7 +66,89 @@ located in windows/, controls/, and misc/ directories.
fake stub. In desktop mode, however, only desktop window has an X
window associated with it.
2. Messaging subsystem
2. Visible region, clipping region and update region
windows/dce.c
windows/winpos.c
windows/painting.c
________________________
|_________ | A and B are child windows of C
| A |______ |
| | | |
|---------' | |
| | B | |
| | | |
| `------------' |
| C |
`------------------------'
Visible region determines which part of the window is not obscured
by other windows. If a window has the WS_CLIPCHILDREN style then all
areas below its children are considered invisible. Similarily, if
the WS_CLIPSIBLINGS bit is in effect then all areas obscured by its
siblings are invisible. Child windows are always clipped by the
boundaries of their parent windows.
B has a WS_CLIPSIBLINGS style:
. ______
: | |
| ,-----' |
| | B | - visible region of B
| | |
: `------------'
When the program requests a display context (DC) for a window it
can specify an optional clipping region that further restricts the
area where the graphics output can appear. This area is calculated
as an intersection of the visible region and a clipping region.
Program asked for a DC with a clipping region:
______
,--|--. | . ,--.
,--+--' | | : _: |
| | B | | => | | | - DC region where the painting will
| | | | | | | be visible
`--|-----|---' : `----'
`-----'
When the window manager detects that some part of the window
became visible it adds this area to the update region of this
window and then generates WM_ERASEBKGND and WM_PAINT messages.
In addition, WM_NCPAINT message is sent when the uncovered area
intersects a nonclient part of the window. Application must reply
to the WM_PAINT message by calling BeginPaint()/EndPaint() pair of
functions. BeginPaint() returns a DC that uses accumulated update
region as a clipping region. This operation cleans up invalidated
area and the window will not receive another WM_PAINT until the
window manager creates a new update region.
A was moved to the left:
________________________ ... / C update region
|______ | : .___ /
| A |_________ | => | ...|___|..
| | | | | : | |
|------' | | | : '---'
| | B | | | : \
| | | | : \
| `------------' | B update region
| C |
`------------------------'
Windows maintains a display context cache consisting of entries that
include DC itself, window to which it belongs, and an optional clipping
region (visible region is stored in the DC itself). When an API call
changes the state of the window tree, window manager has to go through
the DC cache to recalculate visible regions for entries whose windows
were involved in the operation. DC entries (DCE) can be either private
to the window, or private to the window class, or shared between all
windows. Windows 3.1 limits the number of shared DCEs to 5.
3. Messaging subsystem
windows/queue.c
windows/message.c
Each Windows task/thread has its own message queue - this is where
it gets messages from. Messages can be generated on the fly

View File

@ -440,10 +440,10 @@ matters about Wine. The address is: @url{news:comp.emulators.ms-windows.wine}.
@node Reference Manual, Installation, Introduction, Top
@menu
* @WIN32{} Reference Manual:: The @WIN32{} function calls and data types.
* WIN32 Reference Manual:: The @WIN32{} function calls and data types.
* Resources and INI files:: How to determine the appearance and
behaviour of Wine programs.
* Metafiles--Icons--Bitmaps:: FIXME missing.
* Metafiles-Icons-Bitmaps:: FIXME missing.
* Debugging:: Debugging Wine.
* Programs:: Programs written to run in/with Wine.
* Tools:: Programs to support Wine.

View File

@ -5,6 +5,7 @@
* Copyright 1996 Alexandre Julliard
*/
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@ -501,6 +502,54 @@ int DRIVE_Enable( int drive )
}
/***********************************************************************
* DRIVE_SetLogicalMapping
*/
int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
{
/* If new_drive is already valid, do nothing and return 0
otherwise, copy DOSDrives[existing_drive] to DOSDrives[new_drive] */
DOSDRIVE *old, *new;
old = DOSDrives + existing_drive;
new = DOSDrives + new_drive;
if ((existing_drive < 0) || (existing_drive >= MAX_DOS_DRIVES) ||
!old->root ||
(new_drive < 0) || (new_drive >= MAX_DOS_DRIVES))
{
DOS_ERROR( ER_InvalidDrive, EC_MediaError, SA_Abort, EL_Disk );
return 0;
}
if ( new->root )
{
dprintf_dosfs ( stddeb, "Can\'t map drive %c to drive %c - "
"drive %c already exists\n",
'A' + existing_drive, 'A' + new_drive,
'A' + new_drive );
return 0;
}
new->root = HEAP_strdupA( SystemHeap, 0, old->root );
new->dos_cwd = HEAP_strdupA( SystemHeap, 0, old->dos_cwd );
new->unix_cwd = HEAP_strdupA( SystemHeap, 0, old->unix_cwd );
memcpy ( new->label, old->label, 12 );
new->serial = old->serial;
new->type = old->type;
new->flags = old->flags;
new->dev = old->dev;
new->ino = old->ino;
dprintf_dosfs ( stddeb, "Drive %c is now equal to drive %c\n",
'A' + new_drive, 'A' + existing_drive );
return 1;
}
/***********************************************************************
* DRIVE_GetFreeSpace
*/
@ -560,7 +609,7 @@ BOOL32 WINAPI GetDiskFreeSpace32A( LPCSTR root, LPDWORD cluster_sectors,
if (!root) drive = DRIVE_GetCurrentDrive();
else
{
if ((root[1] != ':') || (root[2] != '\\'))
if ((root[1]) && ((root[1] != ':') || (root[2] != '\\')))
{
fprintf( stderr, "GetDiskFreeSpaceA: invalid root '%s'\n", root );
return FALSE;
@ -622,7 +671,7 @@ UINT16 WINAPI GetDriveType16( UINT16 drive )
UINT32 WINAPI GetDriveType32A( LPCSTR root )
{
dprintf_dosfs( stddeb, "GetDriveType32A(%s)\n", root );
if (root[1] != ':')
if ((root[1]) && (root[1] != ':'))
{
fprintf( stderr, "GetDriveType32A: invalid root '%s'\n", root );
return DRIVE_DOESNOTEXIST;
@ -669,11 +718,7 @@ UINT32 WINAPI GetCurrentDirectory32A( UINT32 buflen, LPSTR buf )
{
char *pref = "A:\\";
const char *s = DRIVE_GetDosCwd( DRIVE_GetCurrentDrive() );
if (!s)
{
*buf = '\0';
return 0;
}
assert(s);
lstrcpyn32A( buf, pref, MIN( 4, buflen ) );
if (buflen) buf[0] += DRIVE_GetCurrentDrive();
if (buflen > 3) lstrcpyn32A( buf + 3, s, buflen - 3 );
@ -820,7 +865,7 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label,
if (!root) drive = DRIVE_GetCurrentDrive();
else
{
if ((root[1] != ':') || (root[2] != '\\'))
if ((root[1]) &&((root[1] != ':') || (root[2] != '\\')))
{
fprintf( stderr, "GetVolumeInformation: invalid root '%s'\n",root);
return FALSE;
@ -836,7 +881,7 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label,
if (filename_len) *filename_len = 12;
if (flags) *flags = 0;
if (fsname) lstrcpyn32A( fsname, "FAT", fsname_len );
if (fsname) lstrcpyn32A( fsname, "FAT16", fsname_len );
return TRUE;
}

View File

@ -1207,12 +1207,32 @@ BOOL32 FILE_SetFileType( HFILE32 hFile, DWORD type )
/***********************************************************************
* FILE_mmap
*/
LPVOID FILE_mmap( FILE_OBJECT *file, LPVOID start,
LPVOID FILE_mmap( HFILE32 hFile, LPVOID start,
DWORD size_high, DWORD size_low,
DWORD offset_high, DWORD offset_low,
int prot, int flags )
{
LPVOID ret;
FILE_OBJECT *file = FILE_GetFile( hFile );
if (!file) return (LPVOID)-1;
ret = FILE_dommap( file, start, size_high, size_low,
offset_high, offset_low, prot, flags );
FILE_ReleaseFile( file );
return ret;
}
/***********************************************************************
* FILE_dommap
*/
LPVOID FILE_dommap( FILE_OBJECT *file, LPVOID start,
DWORD size_high, DWORD size_low,
DWORD offset_high, DWORD offset_low,
int prot, int flags )
{
int fd = -1;
int pos;
LPVOID ret;
if (size_high || offset_high)
fprintf( stderr, "FILE_mmap: offsets larger than 4Gb not supported\n");
@ -1244,7 +1264,52 @@ LPVOID FILE_mmap( FILE_OBJECT *file, LPVOID start,
}
else fd = file->unix_handle;
return mmap( start, size_low, prot, flags, fd, offset_low );
if ((ret = mmap( start, size_low, prot,
flags, fd, offset_low )) != (LPVOID)-1)
return ret;
/* mmap() failed; if this is because the file offset is not */
/* page-aligned (EINVAL), or because the underlying filesystem */
/* does not support mmap() (ENOEXEC), we do it by hand. */
if (!file) return ret;
if ((errno != ENOEXEC) && (errno != EINVAL)) return ret;
if (prot & PROT_WRITE)
{
/* We cannot fake shared write mappings */
#ifdef MAP_SHARED
if (flags & MAP_SHARED) return ret;
#endif
#ifdef MAP_PRIVATE
if (!(flags & MAP_PRIVATE)) return ret;
#endif
}
/* printf( "FILE_mmap: mmap failed (%d), faking it\n", errno );*/
/* Reserve the memory with an anonymous mmap */
ret = FILE_mmap( NULL, start, size_high, size_low, 0, 0,
PROT_READ | PROT_WRITE, flags );
if (ret == (LPVOID)-1) return ret;
/* Now read in the file */
if ((pos = lseek( fd, offset_low, SEEK_SET )) == -1)
{
FILE_munmap( ret, size_high, size_low );
return (LPVOID)-1;
}
read( fd, ret, size_low );
lseek( fd, pos, SEEK_SET ); /* Restore the file pointer */
mprotect( ret, size_low, prot ); /* Set the right protection */
return ret;
}
/***********************************************************************
* FILE_munmap
*/
int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low )
{
if (size_high)
fprintf( stderr, "FILE_munmap: offsets larger than 4Gb not supported\n");
return munmap( start, size_low );
}
@ -1262,8 +1327,6 @@ DWORD WINAPI GetFileType( HFILE32 hFile )
/**************************************************************************
* MoveFileEx32A (KERNEL32.???)
*
*
*/
BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
{

View File

@ -47,6 +47,31 @@ INT32 WINAPI Escape32( HDC32 hdc, INT32 nEscape, INT32 cbInput,
case GETPRINTINGOFFSET:
segout = SEGPTR_GET(SEGPTR_NEW(POINT16));
break;
/* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */
case GETTECHNOLOGY: {
segout = SEGPTR_GET(SEGPTR_ALLOC(200)); /* enough I hope */
break;
}
/* Escape(hdc,ENABLEPAIRKERNING,LPINT16,LPINT16); */
case ENABLEPAIRKERNING: {
LPINT16 enab = SEGPTR_NEW(INT16);
segout = SEGPTR_GET(SEGPTR_NEW(INT16));
segin = SEGPTR_GET(enab);
*enab = *(INT32*)lpszInData;
break;
}
/* Escape(hdc,GETFACENAME,NULL,LPSTR); */
case GETFACENAME: {
segout = SEGPTR_GET(SEGPTR_ALLOC(200));
break;
}
}
ret = dc->funcs->pEscape( dc, nEscape, cbInput, segin, segout );
switch(nEscape) {
@ -63,6 +88,24 @@ INT32 WINAPI Escape32( HDC32 hdc, INT32 nEscape, INT32 cbInput,
SEGPTR_FREE(x);
break;
}
case GETTECHNOLOGY: {
LPSTR x=PTR_SEG_TO_LIN(segout);
lstrcpy32A(lpvOutData,x);
SEGPTR_FREE(x);
}
case ENABLEPAIRKERNING: {
LPINT16 enab = (LPINT16)PTR_SEG_TO_LIN(segout);
*(LPINT32)lpvOutData = *enab;
SEGPTR_FREE(enab);
SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
}
case GETFACENAME: {
LPSTR x = (LPSTR)PTR_SEG_TO_LIN(segout);
lstrcpy32A(lpvOutData,x);
SEGPTR_FREE(x);
break;
}
default:
break;
}

View File

@ -16,6 +16,7 @@
#include "dc.h"
#include "bitmap.h"
#include "callback.h"
#include "heap.h"
#include "metafile.h"
#include "syscolor.h"
#include "palette.h"
@ -23,7 +24,6 @@
#include "region.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
BOOL32 DrawDiagEdge32(HDC32 hdc, RECT32 *rect, UINT32 edge, UINT32 flags);
BOOL32 DrawRectEdge32(HDC32 hdc, RECT32 *rect, UINT32 edge, UINT32 flags);
@ -360,6 +360,17 @@ COLORREF WINAPI SetPixel32( HDC32 hdc, INT32 x, INT32 y, COLORREF color )
return dc->funcs->pSetPixel(dc,x,y,color);
}
/***********************************************************************
* SetPixel32 (GDI32.329)
*/
BOOL32 WINAPI SetPixelV32( HDC32 hdc, INT32 x, INT32 y, COLORREF color )
{
DC * dc = DC_GetDCPtr( hdc );
if (!dc || !dc->funcs->pSetPixel) return FALSE;
dc->funcs->pSetPixel(dc,x,y,color);
return TRUE;
}
/***********************************************************************
* GetPixel16 (GDI.83)
@ -534,12 +545,14 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
BOOL16 WINAPI Polyline16( HDC16 hdc, LPPOINT16 pt, INT16 count )
{
register int i;
LPPOINT32 pt32 = (LPPOINT32)xmalloc(count*sizeof(POINT32));
BOOL16 ret;
LPPOINT32 pt32 = (LPPOINT32)HeapAlloc( GetProcessHeap(), 0,
count*sizeof(POINT32) );
if (!pt32) return FALSE;
for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
ret = Polyline32(hdc,pt32,count);
free(pt32);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
@ -562,13 +575,14 @@ BOOL32 WINAPI Polyline32( HDC32 hdc, const LPPOINT32 pt, INT32 count )
BOOL16 WINAPI Polygon16( HDC16 hdc, LPPOINT16 pt, INT16 count )
{
register int i;
LPPOINT32 pt32 = (LPPOINT32)xmalloc(count*sizeof(POINT32));
BOOL32 ret;
LPPOINT32 pt32 = (LPPOINT32)HeapAlloc( GetProcessHeap(), 0,
count*sizeof(POINT32) );
if (!pt32) return FALSE;
for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
ret = Polygon32(hdc,pt32,count);
free(pt32);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
@ -599,15 +613,16 @@ BOOL16 WINAPI PolyPolygon16( HDC16 hdc, LPPOINT16 pt, LPINT16 counts,
nrpts=0;
for (i=polygons;i--;)
nrpts+=counts[i];
pt32 = (LPPOINT32)xmalloc(sizeof(POINT32)*nrpts);
pt32 = (LPPOINT32)HEAP_xalloc( GetProcessHeap(), 0, sizeof(POINT32)*nrpts);
for (i=nrpts;i--;)
CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
counts32 = (LPINT32)xmalloc(polygons*sizeof(INT32));
counts32 = (LPINT32)HEAP_xalloc( GetProcessHeap(), 0,
polygons*sizeof(INT32) );
for (i=polygons;i--;) counts32[i]=counts[i];
ret = PolyPolygon32(hdc,pt32,counts32,polygons);
free(counts32);
free(pt32);
HeapFree( GetProcessHeap(), 0, counts32 );
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}

View File

@ -4,6 +4,7 @@
* Copyright 1997 John Harvey
*/
#include "heap.h"
#include "win16drv.h"
/**********************************************************************
@ -64,7 +65,7 @@ WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
points[0].y = YLPTODP(dc, top);
points[1].x = XLPTODP(dc, right);
points[1].y = XLPTODP(dc, bottom);
points[1].y = YLPTODP(dc, bottom);
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_RECTANGLE, 2, points,
physDev->segptrPenInfo,
@ -86,7 +87,7 @@ WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count )
BOOL32 bRet = 0;
LPPOINT16 points;
int i;
points = malloc(count * sizeof(POINT16));
points = HEAP_xalloc( GetProcessHeap(), 0, count * sizeof(POINT16) );
for (i = 0; i<count ; i++)
{
points[i].x = ((pt[i].x - dc->wndOrgX) * dc->vportExtX/ dc->wndExtX) + dc->vportOrgX;
@ -97,9 +98,6 @@ WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count )
physDev->segptrPenInfo,
physDev->segptrBrushInfo,
win16drv_SegPtr_DrawMode, NULL);
HeapFree( GetProcessHeap(), 0, points );
return bRet;
}

View File

@ -413,6 +413,10 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
{
switch(nEscape)
{
case ENABLEPAIRKERNING:
fprintf(stderr,"Escape: ENABLEPAIRKERNING ignored.\n");
nRet = 1;
break;
case SETABORTPROC:
printf("Escape: SetAbortProc ignored should be stored in dc somewhere\n");
/* Make calling application believe this worked */

View File

@ -191,27 +191,17 @@ INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPT
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{
LONG lP1, lP3, lP4;
WORD wP2;
if (pLPD->fn[FUNC_CONTROL] == NULL)
{
dprintf_win16drv(stddeb, "PRTDRV_Control: Not supported by driver\n");
return 0;
}
lP1 = (SEGPTR)lpDestDev;
wP2 = wfunction;
lP3 = (SEGPTR)lpInData;
lP4 = (SEGPTR)lpOutData;
wRet = CallTo16_word_lwll(pLPD->fn[FUNC_CONTROL],
lP1, wP2, lP3, lP4);
wRet = Callbacks->CallDrvControlProc( pLPD->fn[FUNC_CONTROL],
(SEGPTR)lpDestDev, wfunction,
lpInData, lpOutData );
}
dprintf_win16drv(stddeb, "PRTDRV_Control: return %x\n", wRet);
return wRet;
return 0;
}
/*
@ -253,7 +243,7 @@ WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
lP4 = SEGPTR_STRDUP(lpOutputFile);
lP5 = (LONG)lpData;
wRet = CallTo16_word_lwlll(pLPD->fn[FUNC_ENABLE],
wRet = Callbacks->CallDrvEnableProc(pLPD->fn[FUNC_ENABLE],
(wStyle==INITPDEVICE)?lP1:SEGPTR_GET(lP1),
wP2,
SEGPTR_GET(lP3),
@ -286,7 +276,7 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{
LONG lP1, lP3, lP4;
LONG lP1, lP4;
LPBYTE lP2;
if (pLPD->fn[FUNC_ENUMDFONTS] == NULL) {
@ -296,11 +286,10 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
lP1 = (SEGPTR)lpDestDev;
lP2 = SEGPTR_STRDUP(lpFaceName);
lP3 = (LONG)lpCallbackFunc;
lP4 = (LONG)lpClientData;
wRet = CallTo16_word_llll(pLPD->fn[FUNC_ENUMDFONTS],
lP1, SEGPTR_GET(lP2), lP3, lP4);
wRet = Callbacks->CallDrvEnumDFontsProc( pLPD->fn[FUNC_ENUMDFONTS],
lP1, SEGPTR_GET(lP2),
lpCallbackFunc, lP4);
SEGPTR_FREE(lP2);
} else
fprintf(stderr,"Failed to find device\n");
@ -321,7 +310,8 @@ BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{
LONG lP1, lP3, lP4;
LONG lP1, lP4;
FARPROC16 lP3;
WORD wP2;
if (pLPD->fn[FUNC_ENUMDFONTS] == NULL)
@ -337,12 +327,12 @@ BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
/*
* Need to pass addres of function conversion function that will switch back to 32 bit code if necessary
*/
lP3 = (LONG)lpCallbackFunc;
lP3 = (FARPROC16)lpCallbackFunc;
lP4 = (LONG)lpClientData;
wRet = CallTo16_word_lwll(pLPD->fn[FUNC_ENUMOBJ],
lP1, wP2, lP3, lP4);
wRet = Callbacks->CallDrvEnumObjProc( pLPD->fn[FUNC_ENUMOBJ],
lP1, wP2, lP3, lP4 );
}
else
fprintf(stderr,"Failed to find device\n");
@ -399,9 +389,9 @@ WORD PRTDRV_Output(LPPDEVICE lpDestDev,
}
else
lP8 = 0L;
wRet = CallTo16_word_lwwlllll(pLPD->fn[FUNC_OUTPUT],
lP1, wP2, wP3, SEGPTR_GET(lP4), lP5,
lP6, lP7, SEGPTR_GET(lP8));
wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT],
lP1, wP2, wP3, SEGPTR_GET(lP4),
lP5, lP6, lP7, SEGPTR_GET(lP8));
SEGPTR_FREE(lP4);
SEGPTR_FREE(lP8);
}
@ -460,8 +450,9 @@ DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
lP5 = lpTextXForm;
dwRet = CallTo16_long_lwlll(pLPD->fn[FUNC_REALIZEOBJECT],
lP1, wP2, SEGPTR_GET(lP3), lP4, lP5);
dwRet = Callbacks->CallDrvRealizeProc(pLPD->fn[FUNC_REALIZEOBJECT],
lP1, wP2, SEGPTR_GET(lP3),
lP4, lP5);
SEGPTR_FREE(lP3);
}
@ -520,10 +511,11 @@ DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
}
else
lP14 = 0L;
wRet = CallTo16_word_lwwwwlwwwwllll(pLPD->fn[FUNC_STRETCHBLT],
lP1, wP2, wP3, wP4, wP5,
lP6, wP7, wP8, wP9, wP10,
lP11, lP12, lP13, SEGPTR_GET(lP14));
wRet = Callbacks->CallDrvStretchBltProc(pLPD->fn[FUNC_STRETCHBLT],
lP1, wP2, wP3, wP4, wP5,
lP6, wP7, wP8, wP9, wP10,
lP11, lP12, lP13,
SEGPTR_GET(lP14));
SEGPTR_FREE(lP14);
printf("Called StretchBlt ret %d\n",wRet);
}
@ -601,10 +593,12 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
"0x%lx 0x%lx %p 0x%x\n",lP1, wP2, wP3, lP4,
nSize,lP5, iP6, lP7, lP8, lP9, lP10,
lP11, wP12);
dwRet = CallTo16_long_lwwllwlllllw(pLPD->fn[FUNC_EXTTEXTOUT],
lP1, wP2, wP3, SEGPTR_GET(lP4),
SEGPTR_GET(lP5), iP6, lP7, lP8, lP9, lP10,
SEGPTR_GET(lP11), wP12);
dwRet = Callbacks->CallDrvExtTextOutProc(pLPD->fn[FUNC_EXTTEXTOUT],
lP1, wP2, wP3,
SEGPTR_GET(lP4),
SEGPTR_GET(lP5), iP6, lP7,
lP8, lP9, lP10,
SEGPTR_GET(lP11), wP12);
}
dprintf_win16drv(stddeb, "PRTDRV_ExtTextOut: return %lx\n", dwRet);
return dwRet;

View File

@ -97,7 +97,7 @@ BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
}
#endif
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, XLPTODP(dc,x), XLPTODP(dc,y),
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, XLPTODP(dc,x), YLPTODP(dc,y),
&clipRect, str,
wCount, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
win16drv_SegPtr_TextXForm, NULL, lpOpaqueRect, wOptions);

View File

@ -655,7 +655,8 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
widthDst = abs(widthDst);
heightDst = abs(heightDst);
if (!(rowSrc = (int *)malloc( (widthSrc+widthDst)*sizeof(int) ))) return;
if (!(rowSrc = (int *)HeapAlloc( GetProcessHeap(), 0,
(widthSrc+widthDst)*sizeof(int) ))) return;
rowDst = rowSrc + widthSrc;
/* When stretching, all modes are the same, and DELETESCANS is faster */
@ -799,7 +800,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
widthDst*sizeof(int) );
}
}
free( rowSrc );
HeapFree( GetProcessHeap(), 0, rowSrc );
}

View File

@ -16,14 +16,10 @@
#include "stddebug.h"
/* #define DEBUG_TEXT */
#include "debug.h"
#include "xmalloc.h"
#define SWAP_INT(a,b) { int t = a; a = b; b = t; }
extern int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
short right, short bottom, UINT16 flags);
/***********************************************************************
* X11DRV_ExtTextOut
*/
@ -195,7 +191,8 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
/* allocate max items */
pitem = items = xmalloc( count * sizeof(XTextItem) );
pitem = items = HEAP_xalloc( GetProcessHeap(), 0,
count * sizeof(XTextItem) );
delta = i = 0;
if( lpDx ) /* explicit character widths */
{
@ -245,7 +242,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
XDrawText( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + x, dc->w.DCOrgY + y, items, pitem - items );
free( items );
HeapFree( GetProcessHeap(), 0, items );
}
/* Draw underline and strike-out if needed */

View File

@ -56,11 +56,13 @@ typedef struct
/* Font alias table - these 2 aliases are always present */
static fontAlias aliasTable[2] = {
{ "Helvetica", "Helv", &aliasTable[1] },
static fontAlias __aliasTable[2] = {
{ "Helvetica", "Helv", &__aliasTable[1] },
{ "Times", "Tms Rmn", NULL }
};
static fontAlias *aliasTable = __aliasTable;
/* Optional built-in aliases, they are installed only when X
* cannot supply us with original MS fonts */
@ -961,6 +963,27 @@ static void XFONT_LoadAliases( char** buffer, int buf_size )
{
if( bSubst )
{
fontAlias *pfa, *prev = NULL;
for(pfa = aliasTable; pfa; pfa = pfa->next)
{
/* Remove lpAlias from aliasTable - we should free the old entry */
if(!lstrcmp32A(lpAlias, pfa->faAlias))
{
if(prev)
prev->next = pfa->next;
else
aliasTable = pfa->next;
}
/* Update any references to the substituted font in aliasTable */
if(!lstrcmp32A(frMatch->lfFaceName,
pfa->faTypeFace))
pfa->faTypeFace = HEAP_strdupA( SystemHeap, 0,
lpAlias );
prev = pfa;
}
#ifdef DEBUG_FONT_INIT
dprintf_font(stddeb, "\tsubstituted '%s' with %s\n",
frMatch->lfFaceName, lpAlias );

View File

@ -45,6 +45,7 @@ DLLS = \
version.spec \
w32sys.spec \
win87em.spec \
winaspi.spec \
wing.spec \
winmm.spec \
winsock.spec \
@ -84,7 +85,7 @@ callfrom16.s: $(SPEC_FILES)
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`
callto16.s: $(SRCDIR)/thunk.c $(BUILD)
$(BUILD) -o $@ -callto16 $(SRCDIR)/thunk.c
### Dependencies:

View File

@ -128,16 +128,16 @@ type win32
0124 stub ReadEventLogA
0125 stub ReadEventLogW
0126 stdcall RegCloseKey(long) RegCloseKey
0127 stdcall RegConnectRegistryA(ptr long ptr) RegConnectRegistry32A
0127 stdcall RegConnectRegistryA(str long ptr) RegConnectRegistry32A
0128 stub RegConnectRegistryW
0129 stdcall RegCreateKeyA(long ptr ptr) RegCreateKey32A
0130 stdcall RegCreateKeyExA(long ptr long ptr long long ptr ptr ptr) RegCreateKeyEx32A
0131 stdcall RegCreateKeyExW(long ptr long ptr long long ptr ptr ptr) RegCreateKeyEx32W
0132 stdcall RegCreateKeyW(long ptr ptr) RegCreateKey32W
0133 stdcall RegDeleteKeyA(long ptr) RegDeleteKey32A
0134 stdcall RegDeleteKeyW(long ptr) RegDeleteKey32W
0135 stdcall RegDeleteValueA(long ptr) RegDeleteValue32A
0136 stdcall RegDeleteValueW(long ptr) RegDeleteValue32W
0129 stdcall RegCreateKeyA(long str ptr) RegCreateKey32A
0130 stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr) RegCreateKeyEx32A
0131 stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr) RegCreateKeyEx32W
0132 stdcall RegCreateKeyW(long wstr ptr) RegCreateKey32W
0133 stdcall RegDeleteKeyA(long str) RegDeleteKey32A
0134 stdcall RegDeleteKeyW(long wstr) RegDeleteKey32W
0135 stdcall RegDeleteValueA(long str) RegDeleteValue32A
0136 stdcall RegDeleteValueW(long wstr) RegDeleteValue32W
0137 stdcall RegEnumKeyA(long long ptr long) RegEnumKey32A
0138 stdcall RegEnumKeyExA(long long ptr ptr ptr ptr ptr ptr) RegEnumKeyEx32A
0139 stdcall RegEnumKeyExW(long long ptr ptr ptr ptr ptr ptr) RegEnumKeyEx32W
@ -149,18 +149,18 @@ type win32
0145 stub RegLoadKeyA
0146 stub RegLoadKeyW
0147 stub RegNotifyChangeKeyValue
0148 stdcall RegOpenKeyA(long ptr ptr) RegOpenKey32A
0149 stdcall RegOpenKeyExA(long ptr long long ptr) RegOpenKeyEx32A
0150 stdcall RegOpenKeyExW(long ptr long long ptr) RegOpenKeyEx32W
0151 stdcall RegOpenKeyW(long ptr ptr) RegOpenKey32W
0148 stdcall RegOpenKeyA(long str ptr) RegOpenKey32A
0149 stdcall RegOpenKeyExA(long str long long ptr) RegOpenKeyEx32A
0150 stdcall RegOpenKeyExW(long wstr long long ptr) RegOpenKeyEx32W
0151 stdcall RegOpenKeyW(long wstr ptr) RegOpenKey32W
0152 stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKey32A
0153 stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKey32W
0154 stub RegQueryMultipleValuesA
0155 stub RegQueryMultipleValuesW
0156 stdcall RegQueryValueA(long ptr ptr ptr) RegQueryValue32A
0157 stdcall RegQueryValueExA(long ptr ptr ptr ptr ptr) RegQueryValueEx32A
0158 stdcall RegQueryValueExW(long ptr ptr ptr ptr ptr) RegQueryValueEx32W
0159 stdcall RegQueryValueW(long ptr ptr ptr) RegQueryValue32W
0156 stdcall RegQueryValueA(long str ptr ptr) RegQueryValue32A
0157 stdcall RegQueryValueExA(long str ptr ptr ptr ptr) RegQueryValueEx32A
0158 stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr) RegQueryValueEx32W
0159 stdcall RegQueryValueW(long wstr ptr ptr) RegQueryValue32W
0160 stub RegRemapPreDefKey
0161 stub RegReplaceKeyA
0162 stub RegReplaceKeyW
@ -169,10 +169,10 @@ type win32
0165 stub RegSaveKeyA
0166 stub RegSaveKeyW
0167 stub RegSetKeySecurity
0168 stdcall RegSetValueA(long ptr long ptr long) RegSetValue32A
0169 stdcall RegSetValueExA(long ptr long long ptr long) RegSetValueEx32A
0170 stdcall RegSetValueExW(long ptr long long ptr long) RegSetValueEx32W
0171 stdcall RegSetValueW(long ptr long ptr long) RegSetValue32W
0168 stdcall RegSetValueA(long str long ptr long) RegSetValue32A
0169 stdcall RegSetValueExA(long str long long ptr long) RegSetValueEx32A
0170 stdcall RegSetValueExW(long wstr long long ptr long) RegSetValueEx32W
0171 stdcall RegSetValueW(long wstr long ptr long) RegSetValue32W
0172 stub RegUnLoadKeyA
0173 stub RegUnLoadKeyW
0174 stub RegisterEventSourceA

View File

@ -41,6 +41,7 @@ typedef struct
const char * const *names; /* Pointer to names table */
const WORD *ordinals; /* Pointer to ordinals table */
const BYTE *args; /* Pointer to argument lengths */
const DWORD *argtypes; /* Pointer to argument types bitmask */
} WIN32_DESCRIPTOR;
typedef union
@ -101,6 +102,7 @@ extern const DLL_DESCRIPTOR LZEXPAND_Descriptor;
extern const DLL_DESCRIPTOR VER_Descriptor;
extern const DLL_DESCRIPTOR W32SYS_Descriptor;
extern const DLL_DESCRIPTOR WING_Descriptor;
extern const DLL_DESCRIPTOR WINASPI_Descriptor;
/* 32-bit DLLs */
@ -155,6 +157,7 @@ static BUILTIN_DLL BuiltinDLLs[] =
{ &VER_Descriptor, NULL, 0 },
{ &W32SYS_Descriptor, NULL, 0 },
{ &WING_Descriptor, NULL, 0 },
{ &WINASPI_Descriptor, NULL, 0 },
/* Win32 DLLs */
{ &ADVAPI32_Descriptor, NULL, DLL_FLAG_WIN32 },
{ &COMCTL32_Descriptor, NULL, DLL_FLAG_WIN32 | DLL_FLAG_NOT_USED },
@ -462,7 +465,7 @@ LPCSTR BUILTIN_GetEntryPoint16( WORD cs, WORD ip, WORD *pOrd )
* This function _must_ return the real entry point to call
* after the debug info is printed.
*/
FARPROC32 BUILTIN_GetEntryPoint32( char *buffer, void *relay )
FARPROC32 BUILTIN_GetEntryPoint32( char *buffer, void *relay, DWORD *typemask )
{
BUILTIN_DLL *dll;
int ordinal, i;
@ -487,6 +490,7 @@ FARPROC32 BUILTIN_GetEntryPoint32( char *buffer, void *relay )
assert( i < descr->nb_names );
sprintf( buffer, "%s.%d: %s", descr->name, ordinal, descr->names[i] );
*typemask = descr->argtypes[ordinal - descr->base];
return (FARPROC32)descr->functions[ordinal - descr->base];
}

View File

@ -114,8 +114,8 @@ type win32
110 stub _fsopen
111 stub _fstat
112 stub _ftime
113 stub _ftol
114 stub _fullpath
113 cdecl _ftol(double) CRTDLL__ftol
114 cdecl _fullpath(ptr ptr long) CRTDLL__fullpath
115 stub _futime
116 stub _gcvt
117 stub _get_osfhandle
@ -281,7 +281,7 @@ type win32
277 stub _spawnvp
278 stub _spawnvpe
279 stub _splitpath
280 stub _stat
280 cdecl _stat (ptr ptr) CRTDLL__stat
281 stub _statusfp
282 cdecl _strcmpi(ptr ptr) CRTDLL__strcmpi
283 stub _strdate
@ -336,9 +336,9 @@ type win32
332 cdecl _write(long ptr long) CRTDLL__write
333 stub _wtoi
334 stub _wtol
335 stub _y0
336 stub _y1
337 stub _yn
335 cdecl _y0(double) y0
336 cdecl _y1(double) y1
337 cdecl _yn(long double) yn
338 stub abort
339 cdecl abs(long) abs
340 cdecl acos(double) acos
@ -371,7 +371,7 @@ type win32
367 stub fgetpos
368 cdecl fgets(ptr long ptr) CRTDLL_fgets
369 stub fgetwc
370 stub floor
370 cdecl floor(double) floor
371 cdecl fmod(double double) fmod
372 cdecl fopen(ptr ptr) CRTDLL_fopen
373 varargs fprintf() CRTDLL_fprintf
@ -381,7 +381,7 @@ type win32
377 cdecl fread(ptr long long ptr) CRTDLL_fread
378 cdecl free(ptr) CRTDLL_free
379 stub freopen
380 stub frexp
380 cdecl frexp(double ptr) frexp
381 stub fscanf
382 cdecl fseek(ptr long long) CRTDLL_fseek
383 stub fsetpos
@ -421,7 +421,7 @@ type win32
417 stub iswxdigit
418 cdecl isxdigit(long) isxdigit
419 cdecl labs(long) labs
420 stub ldexp
420 cdecl ldexp(double long) ldexp
421 cdecl ldiv(long long) ldiv
422 stub localeconv
423 cdecl localtime(ptr) localtime
@ -438,7 +438,7 @@ type win32
434 cdecl memmove(ptr ptr long) memmove
435 cdecl memset(ptr long long) memset
436 cdecl mktime(ptr) mktime
437 stub modf
437 cdecl modf(double ptr) modf
438 stub perror
439 cdecl pow(double double) pow
440 varargs printf() printf
@ -450,7 +450,7 @@ type win32
446 cdecl rand() CRTDLL_rand
447 cdecl realloc(ptr long) CRTDLL_realloc
448 stub remove
449 stub rename
449 cdecl rename(str str) CRTDLL_rename
450 stub rewind
451 stub scanf
452 cdecl setbuf(ptr ptr) CRTDLL_setbuf

View File

@ -3,9 +3,9 @@ type win32
0 stub AbortDoc
1 stub AbortPath
2 stdcall AddFontResourceA(ptr) AddFontResource32A
2 stdcall AddFontResourceA(str) AddFontResource32A
3 stub AddFontResourceTracking
4 stdcall AddFontResourceW(ptr) AddFontResource32W
4 stdcall AddFontResourceW(wstr) AddFontResource32W
5 stub AngleArc
6 stdcall AnimatePalette(long long long ptr) AnimatePalette32
7 stdcall Arc(long long long long long long long long long) Arc32
@ -24,8 +24,8 @@ type win32
20 stub CombineTransform
21 stub CopyEnhMetaFileA
22 stub CopyEnhMetaFileW
23 stdcall CopyMetaFileA(long ptr) CopyMetaFile32A
24 stdcall CopyMetaFileW(long ptr) CopyMetaFile32W
23 stdcall CopyMetaFileA(long str) CopyMetaFile32A
24 stdcall CopyMetaFileW(long wstr) CopyMetaFile32W
25 stdcall CreateBitmap(long long long long ptr) CreateBitmap32
26 stdcall CreateBitmapIndirect(ptr) CreateBitmapIndirect32
27 stdcall CreateBrushIndirect(ptr) CreateBrushIndirect32
@ -33,8 +33,8 @@ type win32
29 stub CreateColorSpaceW
30 stdcall CreateCompatibleBitmap(long long long) CreateCompatibleBitmap32
31 stdcall CreateCompatibleDC(long) CreateCompatibleDC32
32 stdcall CreateDCA(ptr ptr ptr ptr) CreateDC32A
33 stdcall CreateDCW(ptr ptr ptr ptr) CreateDC32W
32 stdcall CreateDCA(str str str ptr) CreateDC32A
33 stdcall CreateDCW(wstr wstr wstr ptr) CreateDC32W
34 stdcall CreateDIBPatternBrush(long long) CreateDIBPatternBrush32
35 stub CreateDIBPatternBrushPt
36 stdcall CreateDIBSection(long ptr long ptr long long) CreateDIBSection
@ -45,15 +45,15 @@ type win32
41 stub CreateEnhMetaFileA
42 stub CreateEnhMetaFileW
43 stdcall CreateFontA(long long long long long long long long
long long long long long ptr) CreateFont32A
long long long long long str) CreateFont32A
44 stdcall CreateFontIndirectA(ptr) CreateFontIndirect32A
45 stdcall CreateFontIndirectW(ptr) CreateFontIndirect32W
46 stdcall CreateFontW(long long long long long long long long
long long long long long ptr) CreateFont32W
long long long long long wstr) CreateFont32W
47 stub CreateHalftonePalette
48 stdcall CreateHatchBrush(long long) CreateHatchBrush32
49 stdcall CreateICA(ptr ptr ptr ptr) CreateIC32A
50 stdcall CreateICW(ptr ptr ptr ptr) CreateIC32W
49 stdcall CreateICA(str str str ptr) CreateIC32A
50 stdcall CreateICW(wstr wstr wstr ptr) CreateIC32W
51 stub CreateMetaFileA
52 stub CreateMetaFileW
53 stdcall CreatePalette(ptr) CreatePalette32
@ -66,8 +66,8 @@ type win32
60 stdcall CreateRectRgnIndirect(ptr) CreateRectRgnIndirect32
61 stdcall CreateRoundRectRgn(long long long long long long)
CreateRoundRectRgn32
62 stdcall CreateScalableFontResourceA(long ptr ptr ptr) CreateScalableFontResource32A
63 stdcall CreateScalableFontResourceW(long ptr ptr ptr) CreateScalableFontResource32W
62 stdcall CreateScalableFontResourceA(long str str str) CreateScalableFontResource32A
63 stdcall CreateScalableFontResourceW(long wstr wstr wstr) CreateScalableFontResource32W
64 stdcall CreateSolidBrush(long) CreateSolidBrush32
65 stdcall DPtoLP(long ptr long) DPtoLP32
66 stub DeleteColorSpace
@ -84,12 +84,12 @@ type win32
77 stub EndPage
78 stub EndPath
79 stub EnumEnhMetaFile
80 stdcall EnumFontFamiliesA(long ptr ptr long) EnumFontFamilies32A
81 stdcall EnumFontFamiliesExA(long ptr ptr long long) EnumFontFamiliesEx32A
82 stdcall EnumFontFamiliesExW(long ptr ptr long long) EnumFontFamiliesEx32W
83 stdcall EnumFontFamiliesW(long ptr ptr long) EnumFontFamilies32W
84 stdcall EnumFontsA(long ptr ptr long) EnumFonts32A
85 stdcall EnumFontsW(long ptr ptr long) EnumFonts32W
80 stdcall EnumFontFamiliesA(long str ptr long) EnumFontFamilies32A
81 stdcall EnumFontFamiliesExA(long str ptr long long) EnumFontFamiliesEx32A
82 stdcall EnumFontFamiliesExW(long wstr ptr long long) EnumFontFamiliesEx32W
83 stdcall EnumFontFamiliesW(long wstr ptr long) EnumFontFamilies32W
84 stdcall EnumFontsA(long str ptr long) EnumFonts32A
85 stdcall EnumFontsW(long wstr ptr long) EnumFonts32W
86 stub EnumICMProfilesA
87 stub EnumICMProfilesW
88 stub EnumMetaFile
@ -102,8 +102,8 @@ type win32
95 stdcall ExtEscape(long long long ptr long ptr) ExtEscape32
96 stdcall ExtFloodFill(long long long long long) ExtFloodFill32
97 stub ExtSelectClipRgn
98 stdcall ExtTextOutA(long long long long ptr ptr long ptr) ExtTextOut32A
99 stdcall ExtTextOutW(long long long long ptr ptr long ptr) ExtTextOut32W
98 stdcall ExtTextOutA(long long long long ptr str long ptr) ExtTextOut32A
99 stdcall ExtTextOutW(long long long long ptr wstr long ptr) ExtTextOut32W
100 stub FillPath
101 stdcall FillRgn(long long long) FillRgn32
102 stub FixBrushOrgEx
@ -132,7 +132,7 @@ type win32
125 stub GdiCreateLocalRegion
126 stub GdiDeleteLocalDC
127 stub GdiDeleteLocalObject
128 stub GdiFlush
128 stdcall GdiFlush() GdiFlush
129 stdcall GdiGetBatchLimit() GdiGetBatchLimit
130 stub GdiGetLocalBrush
131 stub GdiGetLocalDC
@ -201,15 +201,15 @@ type win32
194 stub GetLogColorSpaceA
195 stub GetLogColorSpaceW
196 stdcall GetMapMode(long) GetMapMode32
197 stdcall GetMetaFileA(ptr) GetMetaFile32A
197 stdcall GetMetaFileA(str) GetMetaFile32A
198 stub GetMetaFileBitsEx
199 stdcall GetMetaFileW(ptr) GetMetaFile32W
199 stdcall GetMetaFileW(wstr) GetMetaFile32W
200 stub GetMetaRgn
201 stub GetMiterLimit
202 stdcall GetNearestColor(long long) GetNearestColor32
203 stdcall GetNearestPaletteIndex(long long) GetNearestPaletteIndex32
204 stdcall GetObjectA(long long ptr) GetObject32A
205 stub GetObjectType
205 stdcall GetObjectType(long) GetObjectType
206 stdcall GetObjectW(long long ptr) GetObject32W
207 stub GetOutlineTextMetricsA
208 stub GetOutlineTextMetricsW
@ -227,17 +227,17 @@ type win32
220 stdcall GetStockObject(long) GetStockObject32
221 stdcall GetStretchBltMode(long) GetStretchBltMode32
222 stdcall GetSystemPaletteEntries(long long long ptr) GetSystemPaletteEntries32
223 stdcall GetSystemPaletteUse() GetSystemPaletteUse32
223 stdcall GetSystemPaletteUse(long) GetSystemPaletteUse32
224 stdcall GetTextAlign(long) GetTextAlign32
225 stdcall GetTextCharacterExtra(long) GetTextCharacterExtra32
226 stdcall GetTextCharset(long) GetTextCharset32
227 stdcall GetTextColor(long) GetTextColor32
228 stdcall GetTextExtentExPointA(long ptr long long ptr ptr ptr) GetTextExtentExPoint32A
229 stdcall GetTextExtentExPointW(long ptr long long ptr ptr ptr) GetTextExtentExPoint32W
230 stdcall GetTextExtentPoint32A(long ptr long ptr) GetTextExtentPoint32A
231 stdcall GetTextExtentPoint32W(long ptr long ptr) GetTextExtentPoint32W
232 stdcall GetTextExtentPointA(long ptr long ptr) GetTextExtentPoint32ABuggy
233 stdcall GetTextExtentPointW(long ptr long ptr) GetTextExtentPoint32WBuggy
228 stdcall GetTextExtentExPointA(long str long long ptr ptr ptr) GetTextExtentExPoint32A
229 stdcall GetTextExtentExPointW(long wstr long long ptr ptr ptr) GetTextExtentExPoint32W
230 stdcall GetTextExtentPoint32A(long str long ptr) GetTextExtentPoint32A
231 stdcall GetTextExtentPoint32W(long wstr long ptr) GetTextExtentPoint32W
232 stdcall GetTextExtentPointA(long str long ptr) GetTextExtentPoint32ABuggy
233 stdcall GetTextExtentPointW(long wstr long ptr) GetTextExtentPoint32WBuggy
234 stdcall GetTextFaceA(long long ptr) GetTextFace32A
235 stdcall GetTextFaceW(long long ptr) GetTextFace32W
236 stdcall GetTextMetricsA(long ptr) GetTextMetrics32A
@ -288,9 +288,9 @@ type win32
281 stdcall RectInRegion(long ptr) RectInRegion32
282 stdcall RectVisible(long ptr) RectVisible32
283 stdcall Rectangle(long long long long long) Rectangle32
284 stdcall RemoveFontResourceA(ptr) RemoveFontResource32A
284 stdcall RemoveFontResourceA(str) RemoveFontResource32A
285 stub RemoveFontResourceTracking
286 stdcall RemoveFontResourceW(ptr) RemoveFontResource32W
286 stdcall RemoveFontResourceW(wstr) RemoveFontResource32W
287 stdcall ResetDCA(long ptr) ResetDC32A
288 stdcall ResetDCW(long ptr) ResetDC32W
289 stdcall ResizePalette(long long) ResizePalette32
@ -334,7 +334,7 @@ type win32
326 stdcall SetPaletteEntries(long long long ptr) SetPaletteEntries32
327 stdcall SetPixel(long long long long) SetPixel32
328 stub SetPixelFormat
329 stub SetPixelV
329 stdcall SetPixelV(long long long long) SetPixelV32
330 stdcall SetPolyFillMode(long long) SetPolyFillMode32
331 stdcall SetROP2(long long) SetROP232
332 stdcall SetRectRgn(long long long long long) SetRectRgn32
@ -362,8 +362,8 @@ type win32
352 stub StrokeAndFillPath
353 stub StrokePath
354 stub SwapBuffers
355 stdcall TextOutA(long long long ptr long) TextOut32A
356 stdcall TextOutW(long long long ptr long) TextOut32W
355 stdcall TextOutA(long long long str long) TextOut32A
356 stdcall TextOutW(long long long wstr long) TextOut32W
357 stub UnloadNetworkFonts
358 stdcall UnrealizeObject(long) UnrealizeObject32
359 stdcall UpdateColors(long) UpdateColors32

View File

@ -321,7 +321,7 @@ file krnl386.exe
511 stub KERNEL_511
513 pascal LoadLibraryEx32W(ptr long long) LoadLibraryEx32W16
514 pascal16 FreeLibrary32W(long) FreeLibrary32
515 pascal GetProcAddress32W(long ptr) GetProcAddress32
515 pascal GetProcAddress32W(long str) GetProcAddress32
516 pascal GetVDMPointer32W(segptr long) GetVDMPointer32W
517 pascal CallProc32W() WIN16_CallProc32W
518 stub CallProcEx32W

View File

@ -26,19 +26,19 @@ type win32
31 stub _KERNEL32_31
34 stdcall _KERNEL32_34() _KERNEL32_34
35 stdcall LoadLibrary16(ptr) LoadLibrary16
35 stdcall LoadLibrary16(str) LoadLibrary16
36 stdcall FreeLibrary16(long) FreeLibrary16
37 stdcall GetProcAddress16(long ptr) WIN32_GetProcAddress16
37 stdcall GetProcAddress16(long str) WIN32_GetProcAddress16
40 stub _KERNEL32_40
41 stdcall _KERNEL32_41(long long long long long) _KERNEL32_41
40 register _KERNEL32_40() _KERNEL32_40
41 stdcall _KERNEL32_41(long str long str str) _KERNEL32_41
42 stub _KERNEL32_42
43 stdcall _KERNEL32_43(long ptr long ptr ptr) _KERNEL32_43
43 stdcall _KERNEL32_43(long str long str str) _KERNEL32_43
45 register _KERNEL32_45() _KERNEL32_45
46 stdcall _KERNEL32_46(long long long long long) _KERNEL32_46
46 stdcall _KERNEL32_46(long str long str str) _KERNEL32_46
47 stub _KERNEL32_47
50 stdcall AddAtomA(ptr) AddAtom32A
50 stdcall AddAtomA(str) AddAtom32A
52 stdcall _KERNEL32_52() _KERNEL32_52
@ -48,10 +48,10 @@ type win32
56 stdcall WOWGetVDMPointer(long long long) WOWGetVDMPointer
57 stub WOWHandle32
58 stub WOWHandle16
59 stub WOWGlobalAlloc16
60 stub WOWGlobalLock16
61 stub WOWGlobalUnlock16
62 stub WOWGlobalFree16
59 stdcall WOWGlobalAlloc16(long long) GlobalAlloc16
60 stdcall WOWGlobalLock16(long) WIN16_GlobalLock16
61 stdcall WOWGlobalUnlock16(long) GlobalUnlock16
62 stdcall WOWGlobalFree16(long) GlobalFree16
63 stdcall WOWGlobalAllocLock16(long long ptr) WOWGlobalAllocLock16
64 stub WOWGlobalUnlockFree16
65 stub WOWGlobalLockSize16
@ -78,7 +78,7 @@ type win32
87 stdcall _KERNEL32_87() _KERNEL32_87
88 varargs _KERNEL32_88() _KERNEL32_88
89 stub _KERNEL32_89
89 stdcall FT_PrologPrime(ptr ptr) FT_PrologPrime
90 register _KERNEL32_90() _KERNEL32_90
91 stub _KERNEL32_91
92 stub _KERNEL32_92
@ -90,7 +90,7 @@ type win32
101 stub _KERNEL32_100
102 stdcall AddAtomW(ptr) AddAtom32W
102 stdcall AddAtomW(wstr) AddAtom32W
103 stub AllocConsole
104 stub AllocLSCallback
105 stdcall AllocSLCallback(ptr ptr) AllocSLCallback
@ -101,10 +101,10 @@ type win32
110 stdcall Beep(long long) Beep
111 stub BeginUpdateResourceA
112 stub BeginUpdateResourceW
113 stdcall BuildCommDCBA(ptr ptr) BuildCommDCB32A
114 stdcall BuildCommDCBAndTimeoutsA(ptr ptr ptr) BuildCommDCBAndTimeouts32A
115 stdcall BuildCommDCBAndTimeoutsW(ptr ptr ptr) BuildCommDCBAndTimeouts32W
116 stdcall BuildCommDCBW(ptr ptr) BuildCommDCB32W
113 stdcall BuildCommDCBA(str ptr) BuildCommDCB32A
114 stdcall BuildCommDCBAndTimeoutsA(str ptr ptr) BuildCommDCBAndTimeouts32A
115 stdcall BuildCommDCBAndTimeoutsW(wstr ptr ptr) BuildCommDCBAndTimeouts32W
116 stdcall BuildCommDCBW(wstr ptr) BuildCommDCB32W
117 stub CallNamedPipeA
118 stub CallNamedPipeW
119 stub Callback12
@ -131,39 +131,39 @@ type win32
140 stub CommConfigDialogA
141 stub CommConfigDialogW
142 stdcall CompareFileTime(ptr ptr) CompareFileTime
143 stdcall CompareStringA(long long ptr long ptr long) CompareString32A
144 stdcall CompareStringW(long long ptr long ptr long) CompareString32W
143 stdcall CompareStringA(long long str long str long) CompareString32A
144 stdcall CompareStringW(long long wstr long wstr long) CompareString32W
145 stub ConnectNamedPipe
146 stdcall ContinueDebugEvent(long long long) ContinueDebugEvent
147 stub ConvertDefaultLocale
148 stdcall ConvertToGlobalHandle(long) ConvertToGlobalHandle
149 stdcall CopyFileA(ptr ptr long) CopyFile32A
150 stdcall CopyFileW(ptr ptr long) CopyFile32W
149 stdcall CopyFileA(str str long) CopyFile32A
150 stdcall CopyFileW(wstr wstr long) CopyFile32W
151 stub CreateConsoleScreenBuffer
152 stdcall CreateDirectoryA(ptr ptr) CreateDirectory32A
153 stdcall CreateDirectoryExA(ptr ptr ptr) CreateDirectoryEx32A
154 stdcall CreateDirectoryExW(ptr ptr ptr) CreateDirectoryEx32W
155 stdcall CreateDirectoryW(ptr ptr) CreateDirectory32W
156 stdcall CreateEventA(ptr long long ptr) CreateEvent32A
157 stdcall CreateEventW(ptr long long ptr) CreateEvent32W
158 stdcall CreateFileA(ptr long long ptr long long long) CreateFile32A
159 stdcall CreateFileMappingA(long ptr long long long ptr) CreateFileMapping32A
160 stdcall CreateFileMappingW(long ptr long long long ptr) CreateFileMapping32W
161 stdcall CreateFileW(ptr long long ptr long long long) CreateFile32W
152 stdcall CreateDirectoryA(str ptr) CreateDirectory32A
153 stdcall CreateDirectoryExA(str str ptr) CreateDirectoryEx32A
154 stdcall CreateDirectoryExW(wstr wstr ptr) CreateDirectoryEx32W
155 stdcall CreateDirectoryW(wstr ptr) CreateDirectory32W
156 stdcall CreateEventA(ptr long long str) CreateEvent32A
157 stdcall CreateEventW(ptr long long wstr) CreateEvent32W
158 stdcall CreateFileA(str long long ptr long long long) CreateFile32A
159 stdcall CreateFileMappingA(long ptr long long long str) CreateFileMapping32A
160 stdcall CreateFileMappingW(long ptr long long long wstr) CreateFileMapping32W
161 stdcall CreateFileW(wstr long long ptr long long long) CreateFile32W
162 stub CreateIoCompletionPort
163 stub CreateKernelThread
164 stub CreateMailslotA
165 stub CreateMailslotW
166 stdcall CreateMutexA(ptr long ptr) CreateMutex32A
167 stdcall CreateMutexW(ptr long ptr) CreateMutex32W
166 stdcall CreateMutexA(ptr long str) CreateMutex32A
167 stdcall CreateMutexW(ptr long wstr) CreateMutex32W
168 stub CreateNamedPipeA
169 stub CreateNamedPipeW
170 stub CreatePipe
171 stdcall CreateProcessA(ptr ptr ptr ptr long long ptr ptr ptr ptr) CreateProcess32A
171 stdcall CreateProcessA(str str ptr ptr long long ptr str ptr ptr) CreateProcess32A
172 stub CreateProcessW
173 stub CreateRemoteThread
174 stdcall CreateSemaphoreA(ptr long long ptr) CreateSemaphore32A
175 stdcall CreateSemaphoreW(ptr long long ptr) CreateSemaphore32W
174 stdcall CreateSemaphoreA(ptr long long str) CreateSemaphore32A
175 stdcall CreateSemaphoreW(ptr long long wstr) CreateSemaphore32W
176 stub CreateSocketHandle
177 stub CreateTapePartition
178 stdcall CreateThread(ptr long ptr long long ptr) CreateThread
@ -174,8 +174,8 @@ type win32
183 stub DefineDosDeviceW
184 stdcall DeleteAtom(long) DeleteAtom32
185 stdcall DeleteCriticalSection(ptr) DeleteCriticalSection
186 stdcall DeleteFileA(ptr) DeleteFile32A
187 stdcall DeleteFileW(ptr) DeleteFile32W
186 stdcall DeleteFileA(str) DeleteFile32A
187 stdcall DeleteFileW(wstr) DeleteFile32W
188 stub DeviceIoControl
189 stdcall DisableThreadLibraryCalls(long) DisableThreadLibraryCalls
190 stub DisconnectNamedPipe
@ -188,10 +188,10 @@ type win32
197 stub EnumCalendarInfoW
198 stub EnumDateFormatsA
199 stub EnumDateFormatsW
200 stdcall EnumResourceLanguagesA(long ptr ptr ptr long) EnumResourceLanguages32A
201 stdcall EnumResourceLanguagesW(long ptr ptr ptr long) EnumResourceLanguages32W
202 stdcall EnumResourceNamesA(long ptr ptr long) EnumResourceNames32A
203 stdcall EnumResourceNamesW(long ptr ptr long) EnumResourceNames32W
200 stdcall EnumResourceLanguagesA(long str str ptr long) EnumResourceLanguages32A
201 stdcall EnumResourceLanguagesW(long wstr wstr ptr long) EnumResourceLanguages32W
202 stdcall EnumResourceNamesA(long str ptr long) EnumResourceNames32A
203 stdcall EnumResourceNamesW(long wstr ptr long) EnumResourceNames32W
204 stdcall EnumResourceTypesA(long ptr long) EnumResourceTypes32A
205 stdcall EnumResourceTypesW(long ptr long) EnumResourceTypes32W
206 stdcall EnumSystemCodePagesA(ptr long) EnumSystemCodePages32A
@ -204,8 +204,8 @@ type win32
213 stdcall EscapeCommFunction(long long) EscapeCommFunction32
214 stdcall ExitProcess(long) ExitProcess
215 stub ExitThread
216 stdcall ExpandEnvironmentStringsA(ptr ptr long) ExpandEnvironmentStrings32A
217 stdcall ExpandEnvironmentStringsW(ptr ptr long) ExpandEnvironmentStrings32W
216 stdcall ExpandEnvironmentStringsA(str ptr long) ExpandEnvironmentStrings32A
217 stdcall ExpandEnvironmentStringsW(wstr ptr long) ExpandEnvironmentStrings32W
218 stub FT_Exit0
219 stub FT_Exit12
220 stub FT_Exit16
@ -223,8 +223,8 @@ type win32
232 stub FT_Exit8
233 stub FT_Prolog
234 stub FT_Thunk
235 stdcall FatalAppExitA(long ptr) FatalAppExit32A
236 stdcall FatalAppExitW(long ptr) FatalAppExit32W
235 stdcall FatalAppExitA(long str) FatalAppExit32A
236 stdcall FatalAppExitW(long wstr) FatalAppExit32W
237 stub FatalExit
238 stdcall FileTimeToDosDateTime(ptr ptr ptr) FileTimeToDosDateTime
239 stdcall FileTimeToLocalFileTime(ptr ptr) FileTimeToLocalFileTime
@ -232,21 +232,21 @@ type win32
241 stub FillConsoleOutputAttribute
242 stub FillConsoleOutputCharacterA
243 stub FillConsoleOutputCharacterW
244 stdcall FindAtomA(ptr) FindAtom32A
245 stdcall FindAtomW(ptr) FindAtom32W
244 stdcall FindAtomA(str) FindAtom32A
245 stdcall FindAtomW(wstr) FindAtom32W
247 stub FindCloseChangeNotification
246 stdcall FindClose(long) FindClose32
248 stub FindFirstChangeNotificationA
249 stub FindFirstChangeNotificationW
250 stdcall FindFirstFileA(ptr ptr) FindFirstFile32A
251 stdcall FindFirstFileW(ptr ptr) FindFirstFile32W
250 stdcall FindFirstFileA(str ptr) FindFirstFile32A
251 stdcall FindFirstFileW(wstr ptr) FindFirstFile32W
252 stub FindNextChangeNotification
253 stdcall FindNextFileA(long ptr) FindNextFile32A
254 stdcall FindNextFileW(long ptr) FindNextFile32W
255 stdcall FindResourceA(long ptr ptr) FindResource32A
256 stdcall FindResourceExA(long ptr ptr long) FindResourceEx32A
257 stdcall FindResourceExW(long ptr ptr long) FindResourceEx32W
258 stdcall FindResourceW(long ptr ptr) FindResource32W
255 stdcall FindResourceA(long str str) FindResource32A
256 stdcall FindResourceExA(long str str long) FindResourceEx32A
257 stdcall FindResourceExW(long wstr wstr long) FindResourceEx32W
258 stdcall FindResourceW(long wstr wstr) FindResource32W
259 stdcall FlushConsoleInputBuffer(long) FlushConsoleInputBuffer
260 stdcall FlushFileBuffers(long) FlushFileBuffers
261 stub FlushInstructionCache
@ -298,31 +298,31 @@ type win32
307 stdcall GetCurrentProcessId() GetCurrentProcessId
308 stdcall GetCurrentThread() GetCurrentThread
309 stdcall GetCurrentThreadId() GetCurrentThreadId
310 stub GetDateFormatA
310 stdcall GetDateFormatA(long long ptr ptr ptr long) GetDateFormat32A
311 stub GetDateFormatW
312 stub GetDaylightFlag
313 stub GetDefaultCommConfigA
314 stub GetDefaultCommConfigW
315 stdcall GetDiskFreeSpaceA(ptr ptr ptr ptr ptr) GetDiskFreeSpace32A
316 stdcall GetDiskFreeSpaceW(ptr ptr ptr ptr ptr) GetDiskFreeSpace32W
317 stdcall GetDriveTypeA(ptr) GetDriveType32A
318 stdcall GetDriveTypeW(ptr) GetDriveType32W
315 stdcall GetDiskFreeSpaceA(str ptr ptr ptr ptr) GetDiskFreeSpace32A
316 stdcall GetDiskFreeSpaceW(wstr ptr ptr ptr ptr) GetDiskFreeSpace32W
317 stdcall GetDriveTypeA(str) GetDriveType32A
318 stdcall GetDriveTypeW(wstr) GetDriveType32W
320 stdcall GetEnvironmentStringsA() GetEnvironmentStrings32A
321 stdcall GetEnvironmentStringsW() GetEnvironmentStrings32W
319 stdcall GetEnvironmentStrings() GetEnvironmentStrings32A
322 stdcall GetEnvironmentVariableA(ptr ptr long) GetEnvironmentVariable32A
323 stdcall GetEnvironmentVariableW(ptr ptr long) GetEnvironmentVariable32W
322 stdcall GetEnvironmentVariableA(str ptr long) GetEnvironmentVariable32A
323 stdcall GetEnvironmentVariableW(wstr ptr long) GetEnvironmentVariable32W
324 stub GetErrorMode
325 stub GetExitCodeProcess
326 stdcall GetExitCodeThread(long ptr) GetExitCodeThread
327 stdcall GetFileAttributesA(ptr) GetFileAttributes32A
328 stdcall GetFileAttributesW(ptr) GetFileAttributes32W
327 stdcall GetFileAttributesA(str) GetFileAttributes32A
328 stdcall GetFileAttributesW(wstr) GetFileAttributes32W
329 stdcall GetFileInformationByHandle(long ptr) GetFileInformationByHandle
330 stdcall GetFileSize(long ptr) GetFileSize
331 stdcall GetFileTime(long ptr ptr ptr) GetFileTime
332 stdcall GetFileType(long) GetFileType
333 stdcall GetFullPathNameA(ptr long ptr ptr) GetFullPathName32A
334 stdcall GetFullPathNameW(ptr long ptr ptr) GetFullPathName32W
333 stdcall GetFullPathNameA(str long ptr ptr) GetFullPathName32A
334 stdcall GetFullPathNameW(wstr long ptr ptr) GetFullPathName32W
335 stub GetHandleContext
336 stub GetHandleInformation
337 stub GetLSCallbackTarget
@ -338,8 +338,8 @@ type win32
347 stub GetMailslotInfo
348 stdcall GetModuleFileNameA(long ptr long) GetModuleFileName32A
349 stdcall GetModuleFileNameW(long ptr long) GetModuleFileName32W
350 stdcall GetModuleHandleA(ptr) GetModuleHandle32A
351 stdcall GetModuleHandleW(ptr) GetModuleHandle32W
350 stdcall GetModuleHandleA(str) GetModuleHandle32A
351 stdcall GetModuleHandleW(wstr) GetModuleHandle32W
352 stub GetNamedPipeHandleStateA
353 stub GetNamedPipeHandleStateW
354 stub GetNamedPipeInfo
@ -350,18 +350,18 @@ type win32
359 stdcall GetOEMCP() GetOEMCP
360 stub GetOverlappedResult
361 stdcall GetPriorityClass(long) GetPriorityClass
362 stdcall GetPrivateProfileIntA(ptr ptr long ptr) GetPrivateProfileInt32A
363 stdcall GetPrivateProfileIntW(ptr ptr long ptr) GetPrivateProfileInt32W
364 stdcall GetPrivateProfileSectionA(ptr ptr long ptr) GetPrivateProfileSection32A
362 stdcall GetPrivateProfileIntA(str str long str) GetPrivateProfileInt32A
363 stdcall GetPrivateProfileIntW(wstr wstr long wstr) GetPrivateProfileInt32W
364 stdcall GetPrivateProfileSectionA(str str long str) GetPrivateProfileSection32A
365 stub GetPrivateProfileSectionNamesA
366 stub GetPrivateProfileSectionNamesW
367 stub GetPrivateProfileSectionW
368 stdcall GetPrivateProfileStringA(ptr ptr ptr ptr long ptr) GetPrivateProfileString32A
369 stdcall GetPrivateProfileStringW(ptr ptr ptr ptr long ptr) GetPrivateProfileString32W
368 stdcall GetPrivateProfileStringA(str str str ptr long str) GetPrivateProfileString32A
369 stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr) GetPrivateProfileString32W
370 stub GetPrivateProfileStructA
371 stub GetPrivateProfileStructW
372 stdcall GetProcAddress(long ptr) GetProcAddress32
373 stdcall GetProcessAffinityMask(long ptr ptr) GetProcessAffinityMask
372 stdcall GetProcAddress(long str) GetProcAddress32
373 stdcall GetProcessAffinityMask(long ptr ptr) GetProcessAffinityMask
374 stub GetProcessFlags
375 stdcall GetProcessHeap() GetProcessHeap
376 stub GetProcessHeaps
@ -370,24 +370,24 @@ type win32
379 stdcall GetProcessVersion(long) GetProcessVersion
380 stdcall GetProcessWorkingSetSize(long ptr ptr) GetProcessWorkingSetSize
381 stub GetProductName
382 stdcall GetProfileIntA(ptr ptr long) GetProfileInt32A
383 stdcall GetProfileIntW(ptr ptr long) GetProfileInt32W
384 stdcall GetProfileSectionA(ptr ptr long) GetProfileSection32A
382 stdcall GetProfileIntA(str str long) GetProfileInt32A
383 stdcall GetProfileIntW(wstr wstr long) GetProfileInt32W
384 stdcall GetProfileSectionA(str str long) GetProfileSection32A
385 stub GetProfileSectionW
386 stdcall GetProfileStringA(ptr ptr ptr ptr long) GetProfileString32A
387 stdcall GetProfileStringW(ptr ptr ptr ptr long) GetProfileString32W
386 stdcall GetProfileStringA(str str str ptr long) GetProfileString32A
387 stdcall GetProfileStringW(wstr wstr wstr ptr long) GetProfileString32W
388 stub GetQueuedCompletionStatus
389 stub GetSLCallbackTarget
390 stub GetSLCallbackTemplate
391 stdcall GetShortPathNameA(ptr ptr long) GetShortPathName32A
392 stdcall GetShortPathNameW(ptr ptr long) GetShortPathName32W
391 stdcall GetShortPathNameA(str ptr long) GetShortPathName32A
392 stdcall GetShortPathNameW(wstr ptr long) GetShortPathName32W
393 stdcall GetStartupInfoA(ptr) GetStartupInfo32A
394 stdcall GetStartupInfoW(ptr) GetStartupInfo32W
395 stdcall GetStdHandle(long) GetStdHandle
396 stdcall GetStringTypeA(long long ptr long ptr) GetStringType32A
397 stdcall GetStringTypeExA(long long ptr long ptr) GetStringTypeEx32A
398 stdcall GetStringTypeExW(long long ptr long ptr) GetStringTypeEx32W
399 stdcall GetStringTypeW(long ptr long ptr) GetStringType32W
396 stdcall GetStringTypeA(long long str long ptr) GetStringType32A
397 stdcall GetStringTypeExA(long long str long ptr) GetStringTypeEx32A
398 stdcall GetStringTypeExW(long long wstr long ptr) GetStringTypeEx32W
399 stdcall GetStringTypeW(long wstr long ptr) GetStringType32W
400 stdcall GetSystemDefaultLCID() GetSystemDefaultLCID
401 stdcall GetSystemDefaultLangID() GetSystemDefaultLangID
402 stdcall GetSystemDirectoryA(ptr long) GetSystemDirectory32A
@ -400,8 +400,8 @@ type win32
409 stub GetTapeParameters
410 stub GetTapePosition
411 stub GetTapeStatus
412 stdcall GetTempFileNameA(ptr ptr long ptr) GetTempFileName32A
413 stdcall GetTempFileNameW(ptr ptr long ptr) GetTempFileName32W
412 stdcall GetTempFileNameA(str str long ptr) GetTempFileName32A
413 stdcall GetTempFileNameW(wstr wstr long ptr) GetTempFileName32W
414 stdcall GetTempPathA(long ptr) GetTempPath32A
415 stdcall GetTempPathW(long ptr) GetTempPath32W
416 stdcall GetThreadContext(long ptr) GetThreadContext
@ -410,7 +410,7 @@ type win32
419 stdcall GetThreadSelectorEntry(long long ptr) GetThreadSelectorEntry
420 stub GetThreadTimes
421 stdcall GetTickCount() GetTickCount
422 stub GetTimeFormatA
422 stdcall GetTimeFormatA(long long ptr str ptr long) GetTimeFormat32A
423 stub GetTimeFormatW
424 stdcall GetTimeZoneInformation(ptr) GetTimeZoneInformation
425 stdcall GetUserDefaultLCID() GetUserDefaultLCID
@ -418,17 +418,17 @@ type win32
427 stdcall GetVersion() GetVersion32
428 stdcall GetVersionExA(ptr) GetVersionEx32A
429 stdcall GetVersionExW(ptr) GetVersionEx32W
430 stdcall GetVolumeInformationA(ptr ptr long ptr ptr ptr ptr long) GetVolumeInformation32A
431 stdcall GetVolumeInformationW(ptr ptr long ptr ptr ptr ptr long) GetVolumeInformation32W
430 stdcall GetVolumeInformationA(str ptr long ptr ptr ptr ptr long) GetVolumeInformation32A
431 stdcall GetVolumeInformationW(wstr ptr long ptr ptr ptr ptr long) GetVolumeInformation32W
432 stdcall GetWindowsDirectoryA(ptr long) GetWindowsDirectory32A
433 stdcall GetWindowsDirectoryW(ptr long) GetWindowsDirectory32W
434 stdcall GlobalAddAtomA(ptr) GlobalAddAtom32A
435 stdcall GlobalAddAtomW(ptr) GlobalAddAtom32W
434 stdcall GlobalAddAtomA(str) GlobalAddAtom32A
435 stdcall GlobalAddAtomW(wstr) GlobalAddAtom32W
436 stdcall GlobalAlloc(long long) GlobalAlloc32
437 stdcall GlobalCompact(long) GlobalCompact32
438 stdcall GlobalDeleteAtom(long) GlobalDeleteAtom
439 stdcall GlobalFindAtomA(ptr) GlobalFindAtom32A
440 stdcall GlobalFindAtomW(ptr) GlobalFindAtom32W
439 stdcall GlobalFindAtomA(str) GlobalFindAtom32A
440 stdcall GlobalFindAtomW(wstr) GlobalFindAtom32W
441 stdcall GlobalFix(long) GlobalFix32
442 stdcall GlobalFlags(long) GlobalFlags32
443 stdcall GlobalFree(long) GlobalFree32
@ -480,14 +480,14 @@ type win32
489 stdcall IsValidLocale(long long) IsValidLocale
490 stub K32Thk1632Epilog
491 stub K32Thk1632Prolog
492 stdcall LCMapStringA(long long ptr long ptr long) LCMapString32A
493 stdcall LCMapStringW(long long ptr long ptr long) LCMapString32W
492 stdcall LCMapStringA(long long str long ptr long) LCMapString32A
493 stdcall LCMapStringW(long long wstr long ptr long) LCMapString32W
494 stdcall LeaveCriticalSection(ptr) LeaveCriticalSection
495 stdcall LoadLibraryA(ptr) LoadLibrary32A
496 stdcall LoadLibraryExA(ptr long long) LoadLibraryEx32A
495 stdcall LoadLibraryA(str) LoadLibrary32A
496 stdcall LoadLibraryExA(str long long) LoadLibraryEx32A
497 stub LoadLibraryExW
498 stdcall LoadLibraryW(ptr) LoadLibrary32W
499 stub LoadModule
498 stdcall LoadLibraryW(wstr) LoadLibrary32W
499 stdcall LoadModule(str ptr) LoadModule32
500 stdcall LoadResource(long long) LoadResource32
501 stdcall LocalAlloc(long long) LocalAlloc32
502 stdcall LocalCompact(long) LocalCompact32
@ -517,27 +517,27 @@ type win32
526 stdcall MapViewOfFileEx(long long long long long ptr) MapViewOfFileEx
527 stub Module32First
528 stub Module32Next
529 stdcall MoveFileA(ptr ptr) MoveFile32A
530 stdcall MoveFileExA(ptr ptr long) MoveFileEx32A
531 stdcall MoveFileExW(ptr ptr long) MoveFileEx32W
532 stdcall MoveFileW(ptr ptr) MoveFile32W
529 stdcall MoveFileA(str str) MoveFile32A
530 stdcall MoveFileExA(str str long) MoveFileEx32A
531 stdcall MoveFileExW(wstr wstr long) MoveFileEx32W
532 stdcall MoveFileW(wstr wstr) MoveFile32W
533 stdcall MulDiv(long long long) MulDiv32
534 stdcall MultiByteToWideChar(long long ptr long ptr long) MultiByteToWideChar
534 stdcall MultiByteToWideChar(long long str long ptr long) MultiByteToWideChar
535 stub NotifyNLSUserCache
536 stdcall OpenEventA(long long ptr) OpenEvent32A
537 stdcall OpenEventW(long long ptr) OpenEvent32W
538 stdcall OpenFile(ptr ptr long) OpenFile32
539 stdcall OpenFileMappingA(long long ptr) OpenFileMapping32A
540 stdcall OpenFileMappingW(long long ptr) OpenFileMapping32W
541 stdcall OpenMutexA(long long ptr) OpenMutex32A
542 stdcall OpenMutexW(long long ptr) OpenMutex32W
536 stdcall OpenEventA(long long str) OpenEvent32A
537 stdcall OpenEventW(long long wstr) OpenEvent32W
538 stdcall OpenFile(str ptr long) OpenFile32
539 stdcall OpenFileMappingA(long long str) OpenFileMapping32A
540 stdcall OpenFileMappingW(long long wstr) OpenFileMapping32W
541 stdcall OpenMutexA(long long str) OpenMutex32A
542 stdcall OpenMutexW(long long wstr) OpenMutex32W
543 stub OpenProcess
544 stub OpenProfileUserMapping
545 stdcall OpenSemaphoreA(long long ptr) OpenSemaphore32A
546 stdcall OpenSemaphoreW(long long ptr) OpenSemaphore32W
545 stdcall OpenSemaphoreA(long long str) OpenSemaphore32A
546 stdcall OpenSemaphoreW(long long wstr) OpenSemaphore32W
547 stub OpenVxDHandle
548 stdcall OutputDebugStringA(ptr) OutputDebugString32A
549 stdcall OutputDebugStringW(ptr) OutputDebugString32W
548 stdcall OutputDebugStringA(str) OutputDebugString32A
549 stdcall OutputDebugStringW(wstr) OutputDebugString32W
550 stub PeekConsoleInputA
551 stub PeekConsoleInputW
552 stub PeekNamedPipe
@ -548,8 +548,8 @@ type win32
557 stub PulseEvent
558 stdcall PurgeComm(long long) PurgeComm
559 register QT_Thunk() QT_Thunk
560 stdcall QueryDosDeviceA(ptr ptr long) QueryDosDevice32A
561 stdcall QueryDosDeviceW(ptr ptr long) QueryDosDevice32W
560 stdcall QueryDosDeviceA(str ptr long) QueryDosDevice32A
561 stdcall QueryDosDeviceW(wstr ptr long) QueryDosDevice32W
562 stub QueryNumberOfEventLogRecords
563 stub QueryOldestEventLogRecord
564 stdcall QueryPerformanceCounter(ptr) QueryPerformanceCounter
@ -566,14 +566,14 @@ type win32
575 stub ReadConsoleOutputW
576 stdcall ReadConsoleW(long ptr long ptr ptr) ReadConsole32W
577 stdcall ReadFile(long ptr long ptr ptr) ReadFile
578 stub ReadFileEx
578 stdcall ReadFileEx(long ptr long ptr ptr) ReadFileEx
579 stdcall ReadProcessMemory(long ptr ptr long ptr) ReadProcessMemory
580 stub RegisterServiceProcess
581 stdcall ReinitializeCriticalSection(ptr) ReinitializeCriticalSection
582 stdcall ReleaseMutex(long) ReleaseMutex
583 stdcall ReleaseSemaphore(long long ptr) ReleaseSemaphore
584 stdcall RemoveDirectoryA(ptr) RemoveDirectory32A
585 stdcall RemoveDirectoryW(ptr) RemoveDirectory32W
584 stdcall RemoveDirectoryA(str) RemoveDirectory32A
585 stdcall RemoveDirectoryW(wstr) RemoveDirectory32W
586 stdcall ResetEvent(long) ResetEvent
587 stdcall ResumeThread(long) ResumeThread
588 stdcall RtlFillMemory(ptr long long) RtlFillMemory
@ -602,8 +602,8 @@ type win32
611 register SUnMapLS_IP_EBP_8() SUnMapLS_IP_EBP_8
612 stub ScrollConsoleScreenBufferA
613 stub ScrollConsoleScreenBufferW
614 stdcall SearchPathA(ptr ptr ptr long ptr ptr) SearchPath32A
615 stdcall SearchPathW(ptr ptr ptr long ptr ptr) SearchPath32W
614 stdcall SearchPathA(str str str long ptr ptr) SearchPath32A
615 stdcall SearchPathW(wstr wstr wstr long ptr ptr) SearchPath32W
616 stdcall SetCommBreak(long) SetCommBreak32
617 stub SetCommConfig
618 stdcall SetCommMask(long ptr) SetCommMask
@ -620,23 +620,23 @@ type win32
629 stub SetConsoleOutputCP
630 stub SetConsoleScreenBufferSize
631 stub SetConsoleTextAttribute
632 stdcall SetConsoleTitleA(ptr) SetConsoleTitle32A
633 stdcall SetConsoleTitleW(ptr) SetConsoleTitle32W
632 stdcall SetConsoleTitleA(str) SetConsoleTitle32A
633 stdcall SetConsoleTitleW(wstr) SetConsoleTitle32W
634 stub SetConsoleWindowInfo
635 stdcall SetCurrentDirectoryA(ptr) SetCurrentDirectory32A
636 stdcall SetCurrentDirectoryW(ptr) SetCurrentDirectory32W
635 stdcall SetCurrentDirectoryA(str) SetCurrentDirectory32A
636 stdcall SetCurrentDirectoryW(wstr) SetCurrentDirectory32W
637 stub SetDaylightFlag
638 stub SetDefaultCommConfigA
639 stub SetDefaultCommConfigW
640 stdcall SetEndOfFile(long) SetEndOfFile
641 stdcall SetEnvironmentVariableA(ptr ptr) SetEnvironmentVariable32A
642 stdcall SetEnvironmentVariableW(ptr ptr) SetEnvironmentVariable32W
641 stdcall SetEnvironmentVariableA(str str) SetEnvironmentVariable32A
642 stdcall SetEnvironmentVariableW(wstr wstr) SetEnvironmentVariable32W
643 stdcall SetErrorMode(long) SetErrorMode32
644 stdcall SetEvent(long) SetEvent
644 stdcall SetEvent(long) SetEvent
645 stdcall SetFileApisToANSI() SetFileApisToANSI
646 stdcall SetFileApisToOEM() SetFileApisToOEM
647 stdcall SetFileAttributesA(ptr long) SetFileAttributes32A
648 stdcall SetFileAttributesW(ptr long) SetFileAttributes32W
647 stdcall SetFileAttributesA(str long) SetFileAttributes32A
648 stdcall SetFileAttributesW(wstr long) SetFileAttributes32W
649 stdcall SetFilePointer(long long ptr long) SetFilePointer
650 stdcall SetFileTime(long ptr ptr ptr) SetFileTime
651 stub SetHandleContext
@ -644,7 +644,7 @@ type win32
653 stub SetHandleInformation
654 stdcall SetLastError(long) SetLastError
655 stub SetLocalTime
656 stdcall SetLocaleInfoA(long long ptr) SetLocaleInfoA
656 stdcall SetLocaleInfoA(long long str) SetLocaleInfoA
657 stub SetLocaleInfoW
658 stub SetMailslotInfo
659 stub SetNamedPipeHandleState
@ -676,7 +676,7 @@ type win32
685 stdcall TerminateThread(long long) TerminateThread
686 stub Thread32First
687 stub Thread32Next
688 stdcall ThunkConnect32(ptr ptr ptr ptr ptr ptr) ThunkConnect32
688 stdcall ThunkConnect32(ptr str str str ptr ptr) ThunkConnect32
689 stdcall TlsAlloc() TlsAlloc
690 stub TlsAllocInternal
691 stdcall TlsFree(long) TlsFree
@ -686,7 +686,7 @@ type win32
695 stub Toolhelp32ReadProcessMemory
696 stub TransactNamedPipe
697 stdcall TransmitCommChar(long long) TransmitCommChar32
698 stdcall UTRegister(long ptr ptr ptr ptr ptr ptr) UTRegister
698 stdcall UTRegister(long str str str ptr ptr ptr) UTRegister
699 stdcall UTUnRegister(long) UTUnRegister
700 stdcall UnMapLS(long) UnMapLS
701 stub UnMapSLFixArray
@ -715,8 +715,8 @@ type win32
724 stdcall WaitForSingleObjectEx(long long long) WaitForSingleObjectEx
725 stub WaitNamedPipeA
726 stub WaitNamedPipeW
727 stdcall WideCharToMultiByte(long long ptr long ptr long ptr ptr) WideCharToMultiByte
728 stdcall WinExec(ptr long) WinExec32
727 stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr) WideCharToMultiByte
728 stdcall WinExec(str long) WinExec32
729 stdcall WriteConsoleA(long ptr long ptr ptr) WriteConsole32A
730 stub WriteConsoleInputA
731 stub WriteConsoleInputW
@ -730,15 +730,15 @@ type win32
739 stub WriteFileEx
740 stub WritePrivateProfileSectionA
741 stub WritePrivateProfileSectionW
742 stdcall WritePrivateProfileStringA(ptr ptr ptr ptr) WritePrivateProfileString32A
743 stdcall WritePrivateProfileStringW(ptr ptr ptr ptr) WritePrivateProfileString32W
742 stdcall WritePrivateProfileStringA(str str str str) WritePrivateProfileString32A
743 stdcall WritePrivateProfileStringW(wstr wstr wstr wstr) WritePrivateProfileString32W
744 stub WritePrivateProfileStructA
745 stub WritePrivateProfileStructW
746 stub WriteProcessMemory
747 stub WriteProfileSectionA
748 stub WriteProfileSectionW
749 stdcall WriteProfileStringA(ptr ptr ptr) WriteProfileString32A
750 stdcall WriteProfileStringW(ptr ptr ptr) WriteProfileString32W
749 stdcall WriteProfileStringA(str str str) WriteProfileString32A
750 stdcall WriteProfileStringW(wstr wstr wstr) WriteProfileString32W
751 stub WriteTapemark
752 stub _DebugOut
753 stub _DebugPrintf
@ -751,24 +751,24 @@ type win32
760 stdcall _lread(long ptr long) _lread32
761 stdcall _lwrite(long ptr long) _lwrite32
762 stub dprintf
763 stdcall lstrcat(ptr ptr) lstrcat32A
764 stdcall lstrcatA(ptr ptr) lstrcat32A
765 stdcall lstrcatW(ptr ptr) lstrcat32W
766 stdcall lstrcmp(ptr ptr) lstrcmp32A
767 stdcall lstrcmpA(ptr ptr) lstrcmp32A
768 stdcall lstrcmpW(ptr ptr) lstrcmp32W
769 stdcall lstrcmpi(ptr ptr) lstrcmpi32A
770 stdcall lstrcmpiA(ptr ptr) lstrcmpi32A
771 stdcall lstrcmpiW(ptr ptr) lstrcmpi32W
772 stdcall lstrcpy(ptr ptr) lstrcpy32A
773 stdcall lstrcpyA(ptr ptr) lstrcpy32A
774 stdcall lstrcpyW(ptr ptr) lstrcpy32W
775 stdcall lstrcpyn(ptr ptr long) lstrcpyn32A
776 stdcall lstrcpynA(ptr ptr long) lstrcpyn32A
777 stdcall lstrcpynW(ptr ptr long) lstrcpyn32W
778 stdcall lstrlen(ptr) lstrlen32A
779 stdcall lstrlenA(ptr) lstrlen32A
780 stdcall lstrlenW(ptr) lstrlen32W
763 stdcall lstrcat(str str) lstrcat32A
764 stdcall lstrcatA(str str) lstrcat32A
765 stdcall lstrcatW(wstr wstr) lstrcat32W
766 stdcall lstrcmp(str str) lstrcmp32A
767 stdcall lstrcmpA(str str) lstrcmp32A
768 stdcall lstrcmpW(wstr wstr) lstrcmp32W
769 stdcall lstrcmpi(str str) lstrcmpi32A
770 stdcall lstrcmpiA(str str) lstrcmpi32A
771 stdcall lstrcmpiW(wstr wstr) lstrcmpi32W
772 stdcall lstrcpy(ptr str) lstrcpy32A
773 stdcall lstrcpyA(ptr str) lstrcpy32A
774 stdcall lstrcpyW(ptr wstr) lstrcpy32W
775 stdcall lstrcpyn(ptr str long) lstrcpyn32A
776 stdcall lstrcpynA(ptr str long) lstrcpyn32A
777 stdcall lstrcpynW(ptr wstr long) lstrcpyn32W
778 stdcall lstrlen(str) lstrlen32A
779 stdcall lstrlenA(str) lstrlen32A
780 stdcall lstrlenW(wstr) lstrlen32W
#
# Functions exported by kernel32.dll in NT 3.51
#

View File

@ -3,14 +3,15 @@ type win16
#1 pascal MMSYSTEM_WEP(word word word ptr) MMSYSTEM_WEP
2 pascal SNDPLAYSOUND(ptr word) sndPlaySound
5 pascal MMSYSTEMGETVERSION() mmsystemGetVersion
3 stub PLAYSOUND
5 pascal mmsystemGetVersion() mmsystemGetVersion16
6 pascal DriverProc(long word word long long) DriverProc
8 stub WMMMIDIRUNONCE
30 pascal16 OutputDebugStr(ptr) OutputDebugString16
31 pascal DriverCallback(long word word word long long long)
DriverCallback
#32 pascal STACKENTER
#33 pascal STACKLEAVE
#34 pascal MMDRVINSTALL
31 pascal DriverCallback(long word word word long long long) DriverCallback
32 stub STACKENTER
33 stub STACKLEAVE
34 stub MMDRVINSTALL
101 pascal JOYGETNUMDEVS() JoyGetNumDevs
102 pascal JOYGETDEVCAPS(word ptr word) JoyGetDevCaps
103 pascal JOYGETPOS(word ptr) JoyGetPos
@ -19,75 +20,85 @@ type win16
106 pascal JOYSETCAPTURE(word word word word) JoySetCapture
107 pascal JOYSETTHRESHOLD(word word) JoySetThreshold
109 pascal JOYSETCALIBRATION(word) JoySetCalibration
201 pascal MIDIOUTGETNUMDEVS() midiOutGetNumDevs
202 pascal MIDIOUTGETDEVCAPS(word segptr word) midiOutGetDevCaps
203 pascal MIDIOUTGETERRORTEXT(word ptr word) midiOutGetErrorText
204 pascal MIDIOUTOPEN(ptr word ptr long long) midiOutOpen
205 pascal MIDIOUTCLOSE(word) midiOutClose
206 pascal MIDIOUTPREPAREHEADER(word segptr word) midiOutPrepareHeader
207 pascal MIDIOUTUNPREPAREHEADER(word segptr word) midiOutUnprepareHeader
208 pascal MIDIOUTSHORTMSG(word long) midiOutShortMsg
209 pascal MIDIOUTLONGMSG(word ptr word) midiOutLongMsg
210 pascal MIDIOUTRESET(word) midiOutReset
211 pascal MIDIOUTGETVOLUME(word segptr) midiOutGetVolume
212 pascal MIDIOUTSETVOLUME(word long) midiOutSetVolume
213 pascal MIDIOUTCACHEPATCHES(word word segptr word) midiOutCachePatches
214 pascal MIDIOUTCACHEDRUMPATCHES(word word segptr word) midiOutCacheDrumPatches
215 pascal MIDIOUTGETID(word ptr) midiOutGetID
216 pascal MIDIOUTMESSAGE(word word long long) midiOutMessage
301 pascal MIDIINGETNUMDEVS() midiInGetNumDevs
302 pascal MIDIINGETDEVCAPS(word segptr word) midiInGetDevCaps
303 pascal MIDIINGETERRORTEXT(word ptr word) midiInGetErrorText
304 pascal MIDIINOPEN(ptr word ptr long long long) midiInOpen
305 pascal MIDIINCLOSE(word) midiInClose
306 pascal MIDIINPREPAREHEADER(word segptr word) midiInPrepareHeader
307 pascal MIDIINUNPREPAREHEADER(word segptr word) midiInUnprepareHeader
308 pascal MIDIINADDBUFFER(word segptr word) midiInAddBuffer
309 pascal MIDIINSTART(word) midiInStart
310 pascal MIDIINSTOP(word) midiInStop
311 pascal MIDIINRESET(word) midiInReset
312 pascal MIDIINGETID(word ptr) midiInGetID
313 pascal MIDIINMESSAGE(word word long long) midiInMessage
350 pascal AUXGETNUMDEVS() auxGetNumDevs
351 pascal AUXGETDEVCAPS(word segptr word) auxGetDevCaps
352 pascal AUXGETVOLUME(word segptr) auxGetVolume
353 pascal AUXSETVOLUME(word long) auxSetVolume
354 pascal AUXOUTMESSAGE(word word long long) auxOutMessage
401 pascal WAVEOUTGETNUMDEVS() waveOutGetNumDevs
402 pascal WAVEOUTGETDEVCAPS(word segptr word) waveOutGetDevCaps
403 pascal WAVEOUTGETERRORTEXT(word ptr word) waveOutGetErrorText
404 pascal WAVEOUTOPEN(ptr word segptr long long long) waveOutOpen
405 pascal WAVEOUTCLOSE(word) waveOutClose
406 pascal WAVEOUTPREPAREHEADER(word segptr word) waveOutPrepareHeader
407 pascal WAVEOUTUNPREPAREHEADER(word segptr word) waveOutUnprepareHeader
408 pascal WAVEOUTWRITE(word segptr word) waveOutWrite
409 pascal WAVEOUTPAUSE(word) waveOutPause
410 pascal WAVEOUTRESTART(word) waveOutRestart
411 pascal WAVEOUTRESET(word) waveOutReset
412 pascal WAVEOUTGETPOSITION(word segptr word) waveOutGetPosition
413 pascal WAVEOUTGETPITCH(word ptr) waveOutGetPitch
414 pascal WAVEOUTSETPITCH(word long) waveOutSetPitch
415 pascal WAVEOUTGETVOLUME(word segptr) waveOutGetVolume
416 pascal WAVEOUTSETVOLUME(word long) waveOutSetVolume
417 pascal WAVEOUTGETPLAYBACKRATE(word ptr) waveOutGetPlaybackRate
418 pascal WAVEOUTSETPLAYBACKRATE(word long) waveOutSetPlaybackRate
419 pascal WAVEOUTBREAKLOOP(word) waveOutBreakLoop
420 pascal WAVEOUTGETID(word ptr) waveOutGetID
421 pascal WAVEOUTMESSAGE(word word long long) waveOutMessage
501 pascal WAVEINGETNUMDEVS() waveInGetNumDevs
502 pascal WAVEINGETDEVCAPS(word segptr word) waveInGetDevCaps
503 pascal WAVEINGETERRORTEXT(word ptr word) waveInGetErrorText
504 pascal WAVEINOPEN(ptr word segptr long long long) waveInOpen
505 pascal WAVEINCLOSE(word) waveInClose
506 pascal WAVEINPREPAREHEADER(word segptr word) waveInPrepareHeader
507 pascal WAVEINUNPREPAREHEADER(word segptr word) waveInUnprepareHeader
508 pascal WAVEINADDBUFFER(word segptr word) waveInAddBuffer
509 pascal WAVEINSTART(word) waveInStart
510 pascal WAVEINSTOP(word) waveInStop
511 pascal WAVEINRESET(word) waveInReset
512 pascal WAVEINGETPOSITION(word segptr word) waveInGetPosition
513 pascal WAVEINGETID(word ptr) waveInGetID
514 pascal WAVEINMESSAGE(word word long long) waveInMessage
110 stub JOYGETPOSEX
111 stub JOYCONFIGCHANGED
201 pascal midiOutGetNumDevs() midiOutGetNumDevs16
202 pascal midiOutGetDevCaps(word str word) midiOutGetDevCaps16
203 pascal midiOutGetErrorText(word ptr word) midiOutGetErrorText16
204 pascal midiOutOpen(ptr word long long long) midiOutOpen16
205 pascal midiOutClose(word) midiOutClose16
206 pascal midiOutPrepareHeader(word ptr word) midiOutPrepareHeader16
207 pascal midiOutUnprepareHeader(word ptr word) midiOutUnprepareHeader16
208 pascal midiOutShortMsg(word long) midiOutShortMsg16
209 pascal midiOutLongMsg(word ptr word) midiOutLongMsg16
210 pascal midiOutReset(word) midiOutReset16
211 pascal midiOutGetVolume(word ptr) midiOutGetVolume16
212 pascal midiOutSetVolume(word long) midiOutSetVolume16
213 pascal midiOutCachePatches(word word ptr word) midiOutCachePatches16
214 pascal midiOutCacheDrumPatches(word word ptr word) midiOutCacheDrumPatches16
215 pascal midiOutGetID(word ptr) midiOutGetID16
216 pascal midiOutMessage(word word long long) midiOutMessage16
250 stub MIDISTREAMPROPERTY
251 stub MIDISTREAMOPEN
252 stub MIDISTREAMCLOSE
253 stub MIDISTREAMPOSITION
254 stub MIDISTREAMOUT
255 stub MIDISTREAMPAUSE
256 stub MIDISTREAMRESTART
257 stub MIDISTREAMSTOP
301 pascal midiInGetNumDevs() midiInGetNumDevs16
302 pascal midiInGetDevCaps(word ptr word) midiInGetDevCaps16
303 pascal midiInGetErrorText(word ptr word) midiInGetErrorText16
304 pascal midiInOpen(ptr word ptr long long long) midiInOpen16
305 pascal midiInClose(word) midiInClose16
306 pascal midiInPrepareHeader(word ptr word) midiInPrepareHeader16
307 pascal midiInUnprepareHeader(word ptr word) midiInUnprepareHeader16
308 pascal midiInAddBuffer(word ptr word) midiInAddBuffer16
309 pascal midiInStart(word) midiInStart16
310 pascal midiInStop(word) midiInStop16
311 pascal midiInReset(word) midiInReset16
312 pascal midiInGetID(word ptr) midiInGetID16
313 pascal midiInMessage(word word long long) midiInMessage16
350 pascal auxGetNumDevs() auxGetNumDevs16
351 pascal auxGetDevCaps(word ptr word) auxGetDevCaps16
352 pascal auxGetVolume(word ptr) auxGetVolume16
353 pascal auxSetVolume(word long) auxSetVolume16
354 pascal auxOutMessage(word word long long) auxOutMessage16
401 pascal waveOutGetNumDevs() waveOutGetNumDevs16
402 pascal waveOutGetDevCaps(word ptr word) waveOutGetDevCaps16
403 pascal waveOutGetErrorText(word ptr word) waveOutGetErrorText16
404 pascal waveOutOpen(ptr word ptr long long long) waveOutOpen16
405 pascal waveOutClose(word) waveOutClose16
406 pascal waveOutPrepareHeader(word ptr word) waveOutPrepareHeader16
407 pascal waveOutUnprepareHeader(word ptr word) waveOutUnprepareHeader16
408 pascal waveOutWrite(word ptr word) waveOutWrite16
409 pascal waveOutPause(word) waveOutPause16
410 pascal waveOutRestart(word) waveOutRestart16
411 pascal waveOutReset(word) waveOutReset16
412 pascal waveOutGetPosition(word ptr word) waveOutGetPosition16
413 pascal waveOutGetPitch(word ptr) waveOutGetPitch16
414 pascal waveOutSetPitch(word long) waveOutSetPitch16
415 pascal waveOutGetVolume(word ptr) waveOutGetVolume16
416 pascal waveOutSetVolume(word long) waveOutSetVolume16
417 pascal waveOutGetPlaybackRate(word ptr) waveOutGetPlaybackRate16
418 pascal waveOutSetPlaybackRate(word long) waveOutSetPlaybackRate16
419 pascal waveOutBreakLoop(word) waveOutBreakLoop16
420 pascal waveOutGetID(word ptr) waveOutGetID16
421 pascal waveOutMessage(word word long long) waveOutMessage16
501 pascal waveInGetNumDevs() waveInGetNumDevs16
502 pascal waveInGetDevCaps(word ptr word) waveInGetDevCaps16
503 pascal waveInGetErrorText(word ptr word) waveInGetErrorText16
504 pascal waveInOpen(ptr word ptr long long long) waveInOpen16
505 pascal waveInClose(word) waveInClose16
506 pascal waveInPrepareHeader(word ptr word) waveInPrepareHeader16
507 pascal waveInUnprepareHeader(word ptr word) waveInUnprepareHeader16
508 pascal waveInAddBuffer(word ptr word) waveInAddBuffer16
509 pascal waveInStart(word) waveInStart16
510 pascal waveInStop(word) waveInStop16
511 pascal waveInReset(word) waveInReset16
512 pascal waveInGetPosition(word ptr word) waveInGetPosition16
513 pascal waveInGetID(word ptr) waveInGetID16
514 pascal waveInMessage(word word long long) waveInMessage16
601 pascal timeGetSystemTime(ptr word) timeGetSystemTime
602 pascal timeSetEvent(word word segptr long word) timeSetEvent
603 pascal timeKillEvent(word) timeKillEvent
@ -98,18 +109,46 @@ type win16
701 pascal MCISENDCOMMAND(word word long long) mciSendCommand
702 pascal MCISENDSTRING(str ptr word word) mciSendString
703 pascal MCIGETDEVICEID(ptr) mciGetDeviceID
706 pascal MCIGETERRORSTRING(long ptr word) mciGetErrorString
#900 pascal MMTASKCREATE
#902 pascal MMTASKBLOCK
#903 pascal MMTASKSIGNAL
#904 pascal MMGETCURRENTTASK
#905 pascal MMTASKYIELD
705 stub MCILOADCOMMANDRESOURCE
706 pascal mciGetErrorString(long ptr word) mciGetErrorString16
707 stub MCISETDRIVERDATA
708 stub MCIGETDRIVERDATA
710 stub MCIDRIVERYIELD
711 stub MCIDRIVERNOTIFY
712 stub MCIEXECUTE
713 stub MCIFREECOMMANDRESOURCE
714 stub MCISETYIELDPROC
715 stub MCIGETDEVICEIDFROMELEMENTID
716 stub MCIGETYIELDPROC
717 stub MCIGETCREATORTASK
800 pascal mixerGetNumDevs() mixerGetNumDevs16
801 pascal mixerGetDevCaps(word ptr long) mixerGetDevCaps16
802 pascal mixerOpen(ptr word long long) mixerOpen16
803 pascal mixerClose(word) mixerClose16
804 pascal mixerMessage(word word long long) mixerMessage16
805 pascal mixerGetLineInfo(word ptr long) mixerGetLineInfo16
806 pascal mixerGetID(word) mixerGetID16
807 pascal mixerGetLineControls(word ptr long) mixerGetLineControls16
808 pascal mixerGetControlDetails(word ptr long) mixerGetControlDetails16
809 pascal mixerSetControlDetails(word ptr long) mixerSetControlDetails16
900 stub MMTASKCREATE
902 stub MMTASKBLOCK
903 stub MMTASKSIGNAL
904 stub MMGETCURRENTTASK
905 stub MMTASKYIELD
1100 pascal DRVOPEN(str str long) DrvOpen
1101 pascal DRVCLOSE(word long long) DrvClose
1102 pascal DRVSENDMESSAGE(word word long long) DrvSendMessage
1103 pascal DRVGETMODULEHANDLE(word) DrvGetModuleHandle
1104 pascal DRVDEFDRIVERPROC(long word word long long) DrvDefDriverProc
1210 pascal MMIOOPEN(ptr ptr long) mmioOpen
1120 stub MMTHREADCREATE
1121 stub MMTHREADSIGNAL
1122 stub MMTHREADBLOCK
1123 stub MMTHREADISCURRENT
1124 stub MMTHREADISVALID
1125 stub MMTHREADGETTASK
1150 stub MMSHOWMMCPLPROPERTYSHEET
1210 pascal mmioOpen(str ptr long) mmioOpen16
1211 pascal MMIOCLOSE(word word) mmioClose
1212 pascal MMIOREAD(word ptr long) mmioRead
1213 pascal MMIOWRITE(word ptr long) mmioWrite
@ -119,12 +158,16 @@ type win16
1217 pascal MMIOSETBUFFER(word ptr long word) mmioSetBuffer
1218 pascal MMIOFLUSH(word word) mmioFlush
1219 pascal MMIOADVANCE(word ptr word) mmioAdvance
1220 pascal MMIOSTRINGTOFOURCC(ptr word) mmioStringToFOURCC
1220 pascal mmioStringToFOURCC(str word) mmioStringToFOURCC16
1221 pascal MMIOINSTALLIOPROC(long ptr long) mmioInstallIOProc16
1222 pascal MMIOSENDMESSAGE(word word long long) mmioSendMessage
1223 pascal MMIODESCEND(word ptr ptr word) mmioDescend
1224 pascal MMIOASCEND(word ptr word) mmioAscend
1225 pascal MMIOCREATECHUNK(word ptr word) mmioCreateChunk
1226 pascal MMIORENAME(ptr ptr ptr long) mmioRename
#2000 stub WINMMF_THUNKDATA16
#2001 stub RING3_DEVLOADER
#2002 stub WINMMTILEBUFFER
#2003 stub WINMMUNTILEBUFFER
#2005 stub MCIGETTHUNKTABLE
#2006 stub WINMMSL_THUNKDATA16

View File

@ -864,7 +864,7 @@ type win32
861 stub _alloca_probe
862 cdecl _chkstk() NTDLL_chkstk
863 stub _fltused
864 stub _ftol
864 cdecl _ftol(double) CRTDLL__ftol
865 stub _itoa
866 stub _ltoa
867 stub _memccpy

View File

@ -9,10 +9,10 @@
#include "windows.h"
#include "winnt.h"
#include "global.h"
#include "heap.h"
#include "module.h"
#include "stackframe.h"
#include "task.h"
#include "xmalloc.h"
#include "stddebug.h"
/* #define DEBUG_RELAY */
#include "debug.h"
@ -53,8 +53,10 @@ BOOL32 RELAY_Init(void)
CALLTO16_RetAddr_regs=MAKELONG( (int)CALLTO16_Ret_regs-(int)CALLTO16_Start,
codesel );
/* Initialize thunking */
/* Create built-in modules */
if (!BUILTIN_Init()) return FALSE;
/* Initialize thunking */
return THUNK_Init();
}
@ -245,6 +247,7 @@ int RELAY_CallFrom32( int ret_addr, ... )
int i, ret;
char buffer[80];
FARPROC32 func;
DWORD mask, typemask;
int *args = &ret_addr;
/* Relay addr is the return address for this function */
@ -252,13 +255,23 @@ int RELAY_CallFrom32( int ret_addr, ... )
WORD nb_args = *(WORD *)(relay_addr + 1) / sizeof(int);
assert(debugging_relay);
func = BUILTIN_GetEntryPoint32( buffer, relay_addr - 5 );
func = BUILTIN_GetEntryPoint32( buffer, relay_addr - 5, &typemask );
printf( "Call %s(", buffer );
args++;
for (i = 0; i < nb_args; i++)
for (i = 0, mask = 3; i < nb_args; i++, mask <<= 2)
{
if (i) printf( "," );
printf( "%08x", args[i] );
if ((typemask & mask) && HIWORD(args[i]))
{
if (typemask & (2<<(2*i)))
{
char buff[80];
lstrcpynWtoA( buff, (LPWSTR)args[i], sizeof(buff) );
printf( "%08x L\"%s\"", args[i], buff );
}
else printf( "%08x \"%s\"", args[i], (char *)args[i] );
}
else printf( "%08x", args[i] );
}
printf( ") ret=%08x\n", ret_addr );
if (*relay_addr == 0xc3) /* cdecl */
@ -371,14 +384,16 @@ void RELAY_CallFrom32Regs( CONTEXT context,
else
{
char buffer[80];
DWORD typemask;
__RESTORE_ES;
/* Fixup the context structure because of the extra parameter */
/* pushed by the relay debugging code */
EIP_reg(&context) = ret_addr;
ESP_reg(&context) += sizeof(int);
BUILTIN_GetEntryPoint32( buffer, relay_addr - 5 );
BUILTIN_GetEntryPoint32( buffer, relay_addr - 5, &typemask );
printf("Call %s(regs) ret=%08x\n", buffer, ret_addr );
printf(" EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx ESI=%08lx EDI=%08lx\n",
EAX_reg(&context), EBX_reg(&context), ECX_reg(&context),
@ -524,8 +539,9 @@ DWORD WINAPI WIN16_CallProc32W()
argconvmask = VA_ARG16( valist, DWORD );
proc32 = VA_ARG16( valist, FARPROC32 );
fprintf(stderr,"CallProc32W(%ld,%ld,%p,args[",nrofargs,argconvmask,proc32);
args = (DWORD*)xmalloc(sizeof(DWORD)*nrofargs);
for (i=nrofargs;i--;) {
args = (DWORD*)HEAP_xalloc( GetProcessHeap(), 0,
sizeof(DWORD)*nrofargs );
for (i=0;i<nrofargs;i++) {
if (argconvmask & (1<<i))
{
SEGPTR ptr = VA_ARG16( valist, SEGPTR );
@ -568,6 +584,6 @@ DWORD WINAPI WIN16_CallProc32W()
STACK16_POP( (3 + nrofargs) * sizeof(DWORD) );
fprintf(stderr,"returns %08lx\n",ret);
free(args);
HeapFree( GetProcessHeap(), 0, args );
return ret;
}

View File

@ -39,7 +39,7 @@ type win32
101 stub ExtractAssociatedIconExA
124 stub ExtractAssociatedIconExW
125 stub ExtractAssociatedIconW
133 stub ExtractIconA
133 stdcall ExtractIconA(long ptr long) ExtractIcon32A
135 stub ExtractIconEx
138 stub ExtractIconExA
148 stub ExtractIconResInfoA

View File

@ -2,8 +2,8 @@ name system
type win16
1 pascal InquireSystem(word word) InquireSystem
2 pascal16 CreateSystemTimer(word segptr) THUNK_CreateSystemTimer
3 pascal16 KillSystemTimer(word) THUNK_KillSystemTimer
2 pascal16 CreateSystemTimer(word segptr) CreateSystemTimer
3 pascal16 KillSystemTimer(word) SYSTEM_KillSystemTimer
4 pascal16 EnableSystemTimers() EnableSystemTimers
5 pascal16 DisableSystemTimers() DisableSystemTimers
6 pascal GetSystemMSecCount() GetTickCount

View File

@ -1,7 +1,7 @@
/*
* Emulator and Win95 thunks
*
* Copyright 1996 Alexandre Julliard
* Copyright 1996, 1997 Alexandre Julliard
* Copyright 1997 Marcus Meissner
*/
@ -13,7 +13,6 @@
#include "heap.h"
#include "hook.h"
#include "module.h"
#include "winproc.h"
#include "stackframe.h"
#include "selectors.h"
#include "task.h"
@ -22,6 +21,46 @@
#include "stddebug.h"
#include "debug.h"
/* List of the 16-bit callback functions. This list is used */
/* by the build program to generate the file if1632/callto16.S */
/* ### start build ### */
extern LONG CALLBACK CallTo16_regs_short(const CONTEXT *context, INT32 offset);
extern LONG CALLBACK CallTo16_regs_long (const CONTEXT *context, INT32 offset);
extern WORD CALLBACK CallTo16_word_ (FARPROC16);
extern WORD CALLBACK CallTo16_word_w (FARPROC16,WORD);
extern LONG CALLBACK CallTo16_long_l (FARPROC16,LONG);
extern WORD CALLBACK CallTo16_word_ww (FARPROC16,WORD,WORD);
extern WORD CALLBACK CallTo16_word_wl (FARPROC16,WORD,LONG);
extern WORD CALLBACK CallTo16_word_ll (FARPROC16,LONG,LONG);
extern WORD CALLBACK CallTo16_word_www (FARPROC16,WORD,WORD,WORD);
extern WORD CALLBACK CallTo16_word_wwl (FARPROC16,WORD,WORD,LONG);
extern WORD CALLBACK CallTo16_word_wlw (FARPROC16,WORD,LONG,WORD);
extern LONG CALLBACK CallTo16_long_wwl (FARPROC16,WORD,WORD,LONG);
extern WORD CALLBACK CallTo16_word_llwl (FARPROC16,LONG,LONG,WORD,LONG);
extern WORD CALLBACK CallTo16_word_lwll (FARPROC16,LONG,WORD,LONG,LONG);
extern WORD CALLBACK CallTo16_word_lwww (FARPROC16,LONG,WORD,WORD,WORD);
extern WORD CALLBACK CallTo16_word_wwll (FARPROC16,WORD,WORD,LONG,LONG);
extern WORD CALLBACK CallTo16_word_wllwl(FARPROC16,WORD,LONG,LONG,WORD,LONG);
extern LONG CALLBACK CallTo16_long_lwwll(FARPROC16,LONG,WORD,WORD,LONG,LONG);
extern WORD CALLBACK CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LONG);
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);
/* ### stop build ### */
typedef void (*RELAY)();
#pragma pack(1)
@ -46,8 +85,39 @@ typedef struct tagTHUNK
static THUNK *firstThunk = NULL;
static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
WPARAM16 wParam, LPARAM lParam );
static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
UINT16 msg, WPARAM16 wParam,
LPARAM lParam );
static void WINAPI THUNK_CallTaskReschedule(void);
/* TASK_Reschedule() 16-bit entry point */
static FARPROC16 TASK_RescheduleProc;
/* Callbacks function table for the emulator */
static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
{
(void *)CallTo16_regs_short, /* CallRegisterProc */
THUNK_CallTaskReschedule, /* CallTaskRescheduleProc */
THUNK_CallWndProc16, /* CallWndProc */
(void *)CallTo16_long_lwwll, /* CallDriverProc */
(void *)CallTo16_word_wwlll, /* CallDriverCallback */
(void *)CallTo16_word_wwlll, /* CallTimeFuncProc */
(void *)CallTo16_word_w, /* CallWindowsExitProc */
(void *)CallTo16_word_lwww, /* CallWordBreakProc */
(void *)CallTo16_word_ww, /* CallBootAppProc */
(void *)CallTo16_word_www, /* CallLoadAppSegProc */
(void *)CallTo16_word_, /* CallSystemTimerProc */
(void *)CallTo16_long_l, /* CallASPIPostProc */
(void *)CallTo16_word_lwll, /* CallDrvControlProc */
(void *)CallTo16_word_lwlll, /* CallDrvEnableProc */
(void *)CallTo16_word_llll, /* CallDrvEnumDFontsProc */
(void *)CallTo16_word_lwll, /* CallDrvEnumObjProc */
(void *)CallTo16_word_lwwlllll, /* CallDrvOutputProc */
(void *)CallTo16_long_lwlll, /* CallDrvRealizeProc */
(void *)CallTo16_word_lwwwwlwwwwllll, /* CallDrvStretchBltProc */
(void *)CallTo16_long_lwwllwlllllw /* CallDrvExtTextOutProc */
};
/***********************************************************************
* THUNK_Init
@ -55,7 +125,9 @@ static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
BOOL32 THUNK_Init(void)
{
/* Set the window proc calling functions */
WINPROC_SetCallWndProc16( THUNK_CallWndProc16 );
Callbacks = &CALLBACK_EmulatorTable;
/* Get the 16-bit reschedule function pointer */
TASK_RescheduleProc = MODULE_GetWndProcEntry16( "TASK_Reschedule" );
return TRUE;
}
@ -117,8 +189,9 @@ static void THUNK_Free( THUNK *thunk )
*
* Call a 16-bit window procedure
*/
static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
WPARAM16 wParam, LPARAM lParam )
static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
UINT16 msg, WPARAM16 wParam,
LPARAM lParam )
{
CONTEXT context;
LRESULT ret;
@ -154,12 +227,21 @@ static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
args[4] = hwnd;
/* args[5] and args[6] are used by relay code to store the stack pointer */
ret = CallTo16_regs_( &context, -(5 * sizeof(WORD)) );
ret = CallTo16_regs_short( &context, -(5 * sizeof(WORD)) );
if (offset) STACK16_POP(offset);
return ret;
}
/***********************************************************************
* THUNK_CallTaskReschedule
*/
static void WINAPI THUNK_CallTaskReschedule(void)
{
CallTo16_word_(TASK_RescheduleProc);
}
/***********************************************************************
* THUNK_EnumObjects16 (GDI.71)
*/
@ -337,31 +419,6 @@ BOOL16 WINAPI THUNK_UnhookWindowsHookEx16( HHOOK hhook )
}
/***********************************************************************
* THUNK_CreateSystemTimer (SYSTEM.2)
*/
WORD WINAPI THUNK_CreateSystemTimer( WORD rate, FARPROC16 callback )
{
THUNK *thunk = THUNK_Alloc( callback, (RELAY)CallTo16_word_ );
if (!thunk) return 0;
return CreateSystemTimer( rate, (FARPROC16)thunk );
}
/***********************************************************************
* THUNK_KillSystemTimer (SYSTEM.3)
*/
WORD WINAPI THUNK_KillSystemTimer( WORD timer )
{
extern WORD SYSTEM_KillSystemTimer( WORD timer ); /* misc/system.c */
extern FARPROC16 SYSTEM_GetTimerProc( WORD timer ); /* misc/system.c */
THUNK *thunk = (THUNK *)SYSTEM_GetTimerProc( timer );
WORD ret = SYSTEM_KillSystemTimer( timer );
if (thunk) THUNK_Free( thunk );
return ret;
}
static FARPROC16 defDCHookProc = NULL;
@ -512,10 +569,10 @@ FARPROC16 WINAPI THUNK_SetResourceHandler( HMODULE16 hModule, SEGPTR typeId, FAR
* 68xxxxxxxx push FT_Prolog
* C3 lret
*/
static void _write_ftprolog(LPBYTE start,DWORD thunkstart) {
static void _write_ftprolog(LPBYTE thunk,DWORD thunkstart) {
LPBYTE x;
x = start;
x = thunk;
*x++ = 0x0f;*x++=0xb6;*x++=0xd1; /* movzbl edx,cl */
*x++ = 0x8B;*x++=0x14;*x++=0x95;*(DWORD*)x= thunkstart;
x+=4; /* mov edx, [4*edx + thunkstart] */
@ -525,6 +582,13 @@ static void _write_ftprolog(LPBYTE start,DWORD thunkstart) {
/* fill rest with 0xCC / int 3 */
}
/***********************************************************************
* FT_PrologPrime (KERNEL32.89)
*/
void WINAPI FT_PrologPrime(DWORD startind,LPBYTE thunk) {
_write_ftprolog(thunk,*(DWORD*)(startind+thunk));
}
/***********************************************************************
* Generates a QT_Thunk style call.
*
@ -623,39 +687,31 @@ UINT32 WINAPI ThunkConnect32( struct thunkstruct *ths, LPSTR thunkfun16,
/**********************************************************************
* The infamous and undocumented QT_Thunk procedure.
* QT_Thunk (KERNEL32)
*
* We get arguments in [EBP+8] up to [EBP+38].
* We have to set up a frame in the 16 bit stackframe.
* saved_ss_sp: bp+0x40
* bp+0x3c
* ...
* bp: bp+0x00
* sp:
*
* The target address is in EDX.
* The 16 bit arguments start at ESP+4.
* The number of 16bit argumentbytes is EBP-ESP-0x44 (68 Byte thunksetup).
* [ok]
*/
VOID WINAPI QT_Thunk(CONTEXT *context)
{
CONTEXT context16;
LPBYTE curstack;
DWORD ret;
DWORD argsize;
fprintf(stderr,"QT_Thunk(%08lx) ..",EDX_reg(context));
fprintf(stderr," argsize probably ebp-esp=%ld\n",
EBP_reg(context)-ESP_reg(context)
);
memcpy(&context16,context,sizeof(context16));
curstack = (LPBYTE)CURRENT_STACK16;
memcpy(curstack-0x44,(LPBYTE)EBP_reg(context),0x40);
EBP_reg(&context16) = LOWORD(IF1632_Saved16_ss_sp)-0x40;
CS_reg(&context16) = HIWORD(EDX_reg(context));
IP_reg(&context16) = LOWORD(EDX_reg(context));
#ifndef WINELIB
ret = CallTo16_regs_(&context16,-0x40);
#endif
fprintf(stderr,". returned %08lx\n",ret);
EAX_reg(context) = ret;
argsize = EBP_reg(context)-ESP_reg(context)-0x44;
/* additional 4 bytes used by the relaycode for storing the stackptr */
memcpy( ((LPBYTE)CURRENT_STACK16)-argsize-4,
(LPBYTE)ESP_reg(context)+4,
argsize
);
EAX_reg(context) = CallTo16_regs_short(&context16,-argsize);
}
@ -674,22 +730,15 @@ DWORD WINAPI WOWCallback16(FARPROC16 fproc,DWORD arg)
/***********************************************************************
* _KERNEL32_52 (KERNEL32.52)
* Returns a pointer to ThkBuf in the 16bit library SYSTHUNK.DLL.
* [ok probably]
*/
LPVOID WINAPI _KERNEL32_52()
{
HMODULE32 hmod = LoadLibrary16("systhunk.dll");
DWORD ret;
fprintf(stderr,"_KERNE32_52()\n");
if (hmod<=32)
return 0;
ret = (DWORD)WIN32_GetProcAddress16(hmod,"ThkBuf");
fprintf(stderr," GetProcAddress16(0x%04x,\"ThkBuf\") returns %08lx\n",
hmod,ret
);
return PTR_SEG_TO_LIN(ret);
return PTR_SEG_TO_LIN(WIN32_GetProcAddress16(hmod,"ThkBuf"));
}
/***********************************************************************
@ -701,6 +750,7 @@ LPVOID WINAPI _KERNEL32_52()
* 04: SEGPTR ptr ? where does it point to?
* The pointer ptr is written into the first DWORD of 'thunk'.
* (probably correct implemented)
* [ok probably]
*/
DWORD WINAPI _KERNEL32_43(LPDWORD thunk,LPCSTR thkbuf,DWORD len,
LPCSTR dll16,LPCSTR dll32)
@ -709,36 +759,34 @@ DWORD WINAPI _KERNEL32_43(LPDWORD thunk,LPCSTR thkbuf,DWORD len,
LPDWORD addr;
SEGPTR segaddr;
fprintf(stderr,"_KERNEL32_43(%p,%s,0x%08lx,%s,%s)\n",thunk,thkbuf,len,dll16,dll32);
hmod = LoadLibrary16(dll16);
if (hmod<32) {
fprintf(stderr,"->failed to load 16bit DLL %s, error %d\n",dll16,hmod);
fprintf(stderr,"KERNEL32_43->failed to load 16bit DLL %s, error %d\n",dll16,hmod);
return 0;
}
segaddr = (DWORD)WIN32_GetProcAddress16(hmod,(LPSTR)thkbuf);
if (!segaddr) {
fprintf(stderr,"->no %s exported from %s!\n",thkbuf,dll16);
fprintf(stderr,"KERNEL32_43->no %s exported from %s!\n",thkbuf,dll16);
return 0;
}
addr = (LPDWORD)PTR_SEG_TO_LIN(segaddr);
if (addr[0] != len) {
fprintf(stderr,"->thkbuf length mismatch? %ld vs %ld\n",len,addr[0]);
fprintf(stderr,"KERNEL32_43->thkbuf length mismatch? %ld vs %ld\n",len,addr[0]);
return 0;
}
if (!addr[1])
return 0;
fprintf(stderr," addr[1] is %08lx\n",addr[1]);
*(DWORD*)thunk = addr[1];
return addr[1];
}
/***********************************************************************
* _KERNEL32_45 (KERNEL32.44)
* Looks like another 32->16 thunk. Dunno why they need two of them.
* calls the win16 address in EAX with the current stack.
* Another 32->16 thunk, the difference to QT_Thunk is, that the called routine
* uses 0x66 lret, and that we have to pass CX in DI.
* (there seems to be some kind of BL/BX return magic too...)
*
* FIXME: doesn't seem to work correctly yet...
* [doesn't crash anymore]
*/
VOID WINAPI _KERNEL32_45(CONTEXT *context)
{
@ -754,25 +802,55 @@ VOID WINAPI _KERNEL32_45(CONTEXT *context)
memcpy(&context16,context,sizeof(context16));
curstack = (LPBYTE)CURRENT_STACK16;
memcpy(curstack-stacksize-4,(LPBYTE)EBP_reg(context),stacksize);
fprintf(stderr,"IF1632_Saved16_ss_sp is 0x%08lx\n",IF1632_Saved16_ss_sp);
EBP_reg(&context16) = LOWORD(IF1632_Saved16_ss_sp)-stacksize;
DI_reg(&context16) = CX_reg(context);
CS_reg(&context16) = HIWORD(EAX_reg(context));
IP_reg(&context16) = LOWORD(EAX_reg(context));
/* some more registers spronged locally, but I don't think they are
* needed
*/
#ifndef WINELIB
ret = CallTo16_regs_(&context16,-stacksize);
#endif
curstack = PTR_SEG_TO_LIN(STACK16_PUSH(stacksize));
memcpy(curstack-stacksize,(LPBYTE)ESP_reg(context),stacksize);
ret = CallTo16_regs_long(&context16,0);
STACK16_POP(stacksize);
fprintf(stderr,". returned %08lx\n",ret);
EAX_reg(context) = ret;
}
/***********************************************************************
* (KERNEL32.40)
* _KERNEL32_40 (KERNEL32.40)
* YET Another 32->16 thunk, the difference to the others is still mysterious
* target address is EDX
*
* [crashes]
*/
VOID WINAPI _KERNEL32_40(CONTEXT *context)
{
CONTEXT context16;
LPBYTE curstack;
DWORD ret,stacksize;
fprintf(stderr,"_KERNEL32_40(EDX=0x%08lx)\n",
EDX_reg(context)
);
stacksize = EBP_reg(context)-ESP_reg(context);
fprintf(stderr," stacksize = %ld\n",stacksize);
fprintf(stderr,"on top of stack: 0x%04x\n",*(WORD*)ESP_reg(context));
memcpy(&context16,context,sizeof(context16));
CS_reg(&context16) = HIWORD(EDX_reg(context));
IP_reg(&context16) = LOWORD(EDX_reg(context));
curstack = PTR_SEG_TO_LIN(STACK16_PUSH(stacksize));
memcpy(curstack-stacksize,(LPBYTE)ESP_reg(context),stacksize);
ret = CallTo16_regs_short(&context16,0);
STACK16_POP(stacksize);
fprintf(stderr,". returned %08lx\n",ret);
EAX_reg(context) = ret;
}
/***********************************************************************
* (KERNEL32.41)
* A thunk setup routine.
* Expects a pointer to a preinitialized thunkbuffer in the first argument
* looking like:
@ -805,7 +883,7 @@ VOID WINAPI _KERNEL32_45(CONTEXT *context)
* 00: DWORD length ? don't know exactly
* 04: SEGPTR ptr ? where does it point to?
* The segpointer ptr is written into the first DWORD of 'thunk'.
* (probably correct implemented)
* [ok probably]
*/
LPVOID WINAPI _KERNEL32_41(LPBYTE thunk,LPCSTR thkbuf,DWORD len,LPCSTR dll16,
@ -816,10 +894,6 @@ LPVOID WINAPI _KERNEL32_41(LPBYTE thunk,LPCSTR thkbuf,DWORD len,LPCSTR dll16,
LPDWORD addr,addr2;
DWORD segaddr;
fprintf(stderr,"KERNEL32_41(%p,%s,%ld,%s,%s)\n",
thunk,thkbuf,len,dll16,dll32
);
/* FIXME: add checks for valid code ... */
/* write pointers to kernel32.89 and kernel32.90 (+ordinal base of 1) */
*(DWORD*)(thunk+0x35) = (DWORD)GetProcAddress32(hkrnl32,(LPSTR)90);
@ -828,39 +902,34 @@ LPVOID WINAPI _KERNEL32_41(LPBYTE thunk,LPCSTR thkbuf,DWORD len,LPCSTR dll16,
hmod = LoadLibrary16(dll16);
if (hmod<32) {
fprintf(stderr,"->failed to load 16bit DLL %s, error %d\n",dll16,hmod);
fprintf(stderr,"KERNEL32_41->failed to load 16bit DLL %s, error %d\n",dll16,hmod);
return NULL;
}
segaddr = (DWORD)WIN32_GetProcAddress16(hmod,(LPSTR)thkbuf);
if (!segaddr) {
fprintf(stderr,"->no %s exported from %s!\n",thkbuf,dll16);
fprintf(stderr,"KERNEL32_41->no %s exported from %s!\n",thkbuf,dll16);
return NULL;
}
addr = (LPDWORD)PTR_SEG_TO_LIN(segaddr);
if (addr[0] != len) {
fprintf(stderr,"->thkbuf length mismatch? %ld vs %ld\n",len,addr[0]);
fprintf(stderr,"KERNEL32_41->thkbuf length mismatch? %ld vs %ld\n",len,addr[0]);
return NULL;
}
addr2 = PTR_SEG_TO_LIN(addr[1]);
fprintf(stderr," addr2 is %08lx:%p\n",addr[1],addr2);
if (HIWORD(addr2))
*(DWORD*)thunk = (DWORD)addr2;
return addr2;
}
/***********************************************************************
* (KERNEL32.91)
* Thunk priming? function
* (KERNEL32.90)
* QT Thunk priming function
* Rewrites the first part of the thunk to use the QT_Thunk interface
* and jumps to the start of that code.
* [ok]
*/
VOID WINAPI _KERNEL32_90(CONTEXT *context)
{
fprintf(stderr,"_KERNEL32_90(eax=0x%08lx,edx=0x%08lx,ebp[-4]=0x%02x,target = %08lx, *target =%08lx)\n",
EAX_reg(context),EDX_reg(context),((BYTE*)EBP_reg(context))[-4],
(*(DWORD*)(EAX_reg(context)+EDX_reg(context)))+4*(((BYTE*)EBP_reg(context))[-4]),
*(DWORD*)((*(DWORD*)(EAX_reg(context)+EDX_reg(context)))+4*(((BYTE*)EBP_reg(context))[-4]))
);
_write_qtthunk((LPBYTE)EAX_reg(context),*(DWORD*)(EAX_reg(context)+EDX_reg(context)));
/* we just call the real QT_Thunk right now
* we can bypass the relaycode, for we already have the registercontext
@ -875,6 +944,7 @@ VOID WINAPI _KERNEL32_90(CONTEXT *context)
* The start of the thunkbuf looks like this:
* 00: DWORD length
* 04: SEGPTR address for thunkbuffer pointer
* [ok probably]
*/
VOID WINAPI _KERNEL32_46(LPBYTE thunk,LPSTR thkbuf,DWORD len,LPSTR dll16,
LPSTR dll32)
@ -883,22 +953,19 @@ VOID WINAPI _KERNEL32_46(LPBYTE thunk,LPSTR thkbuf,DWORD len,LPSTR dll16,
HMODULE16 hmod;
SEGPTR segaddr;
fprintf(stderr,"KERNEL32_46(%p,%s,%lx,%s,%s)\n",
thunk,thkbuf,len,dll16,dll32
);
hmod = LoadLibrary16(dll16);
if (hmod < 32) {
fprintf(stderr,"->couldn't load %s, error %d\n",dll16,hmod);
fprintf(stderr,"KERNEL32_46->couldn't load %s, error %d\n",dll16,hmod);
return;
}
segaddr = (SEGPTR)WIN32_GetProcAddress16(hmod,thkbuf);
if (!segaddr) {
fprintf(stderr,"-> haven't found %s in %s!\n",thkbuf,dll16);
fprintf(stderr,"KERNEL32_46-> haven't found %s in %s!\n",thkbuf,dll16);
return;
}
addr = (LPDWORD)PTR_SEG_TO_LIN(segaddr);
if (addr[0] != len) {
fprintf(stderr,"-> length of thkbuf differs from expected length! (%ld vs %ld)\n",addr[0],len);
fprintf(stderr,"KERNEL32_46-> length of thkbuf differs from expected length! (%ld vs %ld)\n",addr[0],len);
return;
}
*(DWORD*)PTR_SEG_TO_LIN(addr[1]) = (DWORD)thunk;
@ -907,10 +974,11 @@ VOID WINAPI _KERNEL32_46(LPBYTE thunk,LPSTR thkbuf,DWORD len,LPSTR dll16,
/**********************************************************************
* _KERNEL32_87
* Check if thunking is initialized (ss selector set up etc.)
* We do that differently, so just return TRUE.
* [ok]
*/
BOOL32 WINAPI _KERNEL32_87()
{
fprintf(stderr,"KERNEL32_87 stub, returning TRUE\n");
return TRUE;
}
@ -920,6 +988,7 @@ BOOL32 WINAPI _KERNEL32_87()
* thunks. It should probably be capable of crossing processboundaries.
*
* And YES, I've seen nr=48 (somewhere in the Win95 32<->16 OLE coupling)
* [ok]
*/
DWORD WINAPIV _KERNEL32_88( DWORD nr, DWORD flags, FARPROC32 fun, ... )
{

View File

@ -149,7 +149,7 @@ file user.exe
146 pascal16 GetClipboardFormatName(word ptr s_word) GetClipboardFormatName16
147 pascal16 SetClipboardViewer(word) SetClipboardViewer16
148 pascal16 GetClipboardViewer() GetClipboardViewer16
149 pascal16 ChangeClipboardChain(word ptr) ChangeClipboardChain16
149 pascal16 ChangeClipboardChain(word word) ChangeClipboardChain16
150 pascal16 LoadMenu(word segstr) LoadMenu16
151 pascal16 CreateMenu() CreateMenu16
152 pascal16 DestroyMenu(word) DestroyMenu16

View File

@ -25,26 +25,26 @@ type win32
22 stdcall ChangeClipboardChain(long long) ChangeClipboardChain32
23 stdcall ChangeMenuA(long long ptr long long) ChangeMenu32A
24 stdcall ChangeMenuW(long long ptr long long) ChangeMenu32W
25 stdcall CharLowerA(ptr) CharLower32A
26 stdcall CharLowerBuffA(ptr long) CharLowerBuff32A
27 stdcall CharLowerBuffW(ptr long) CharLowerBuff32W
28 stdcall CharLowerW(ptr) CharLower32W
29 stdcall CharNextA(ptr) CharNext32A
30 stdcall CharNextExA(long ptr long) CharNextEx32A
31 stdcall CharNextExW(long ptr long) CharNextEx32W
32 stdcall CharNextW(ptr) CharNext32W
33 stdcall CharPrevA(ptr ptr) CharPrev32A
34 stdcall CharPrevExA(long ptr ptr long) CharPrevEx32A
35 stdcall CharPrevExW(long ptr ptr long) CharPrevEx32W
36 stdcall CharPrevW(ptr ptr) CharPrev32W
37 stdcall CharToOemA(ptr ptr) CharToOem32A
38 stdcall CharToOemBuffA(ptr ptr long) CharToOemBuff32A
39 stdcall CharToOemBuffW(ptr ptr long) CharToOemBuff32W
40 stdcall CharToOemW(ptr ptr) CharToOem32W
41 stdcall CharUpperA(ptr) CharUpper32A
42 stdcall CharUpperBuffA(ptr long) CharUpperBuff32A
43 stdcall CharUpperBuffW(ptr long) CharUpperBuff32W
44 stdcall CharUpperW(ptr) CharUpper32W
25 stdcall CharLowerA(str) CharLower32A
26 stdcall CharLowerBuffA(str long) CharLowerBuff32A
27 stdcall CharLowerBuffW(wstr long) CharLowerBuff32W
28 stdcall CharLowerW(wstr) CharLower32W
29 stdcall CharNextA(str) CharNext32A
30 stdcall CharNextExA(long str long) CharNextEx32A
31 stdcall CharNextExW(long wstr long) CharNextEx32W
32 stdcall CharNextW(wstr) CharNext32W
33 stdcall CharPrevA(str str) CharPrev32A
34 stdcall CharPrevExA(long str str long) CharPrevEx32A
35 stdcall CharPrevExW(long wstr wstr long) CharPrevEx32W
36 stdcall CharPrevW(wstr wstr) CharPrev32W
37 stdcall CharToOemA(str str) CharToOem32A
38 stdcall CharToOemBuffA(str str long) CharToOemBuff32A
39 stdcall CharToOemBuffW(wstr wstr long) CharToOemBuff32W
40 stdcall CharToOemW(wstr wstr) CharToOem32W
41 stdcall CharUpperA(str) CharUpper32A
42 stdcall CharUpperBuffA(str long) CharUpperBuff32A
43 stdcall CharUpperBuffW(wstr long) CharUpperBuff32W
44 stdcall CharUpperW(wstr) CharUpper32W
45 stdcall CheckDlgButton(long long long) CheckDlgButton32
46 stdcall CheckMenuItem(long long long) CheckMenuItem32
47 stub CheckMenuRadioItem
@ -78,14 +78,14 @@ type win32
75 stdcall CreateIcon(long long long long long ptr ptr) CreateIcon32
76 stub CreateIconFromResource
77 stdcall CreateIconFromResourceEx(ptr long long long long long long) CreateIconFromResourceEx32
78 stub CreateIconIndirect
78 stdcall CreateIconIndirect(ptr) CreateIconIndirect
79 stub CreateMDIWindowA
80 stub CreateMDIWindowW
81 stdcall CreateMenu() CreateMenu32
82 stdcall CreatePopupMenu() CreatePopupMenu32
83 stdcall CreateWindowExA(long ptr ptr long long long long long
83 stdcall CreateWindowExA(long str str long long long long long
long long long ptr) CreateWindowEx32A
84 stdcall CreateWindowExW(long ptr ptr long long long long long
84 stdcall CreateWindowExW(long wstr wstr long long long long long
long long long ptr) CreateWindowEx32W
85 stub CreateWindowStationA
86 stub CreateWindowStationW
@ -141,8 +141,8 @@ type win32
136 stdcall DialogBoxIndirectParamA(long ptr long ptr long) DialogBoxIndirectParam32A
137 stdcall DialogBoxIndirectParamAorW(long ptr long ptr long) DialogBoxIndirectParam32A
138 stdcall DialogBoxIndirectParamW(long ptr long ptr long) DialogBoxIndirectParam32W
139 stdcall DialogBoxParamA(long ptr long ptr long) DialogBoxParam32A
140 stdcall DialogBoxParamW(long ptr long ptr long) DialogBoxParam32W
139 stdcall DialogBoxParamA(long str long ptr long) DialogBoxParam32A
140 stdcall DialogBoxParamW(long wstr long ptr long) DialogBoxParam32W
141 stdcall DispatchMessageA(ptr) DispatchMessage32A
142 stdcall DispatchMessageW(ptr) DispatchMessage32W
143 stdcall DlgDirListA(long ptr long long long) DlgDirList32A
@ -166,10 +166,10 @@ type win32
161 stdcall DrawMenuBar(long) DrawMenuBar32
162 stdcall DrawStateA(long long ptr long long long long long long long) DrawState32A
163 stub DrawStateW
164 stdcall DrawTextA(long ptr long ptr long) DrawText32A
165 stdcall DrawTextExA(long ptr long ptr long ptr) DrawTextEx32A
166 stdcall DrawTextExW(long ptr long ptr long ptr) DrawTextEx32W
167 stdcall DrawTextW(long ptr long ptr long) DrawText32W
164 stdcall DrawTextA(long str long ptr long) DrawText32A
165 stdcall DrawTextExA(long str long ptr long ptr) DrawTextEx32A
166 stdcall DrawTextExW(long wstr long ptr long ptr) DrawTextEx32W
167 stdcall DrawTextW(long wstr long ptr long) DrawText32W
168 stub EditWndProc
169 stdcall EmptyClipboard() EmptyClipboard32
170 stdcall EnableMenuItem(long long long) EnableMenuItem32
@ -200,10 +200,10 @@ type win32
195 stdcall ExcludeUpdateRgn(long long) ExcludeUpdateRgn32
196 stdcall ExitWindowsEx(long long) ExitWindowsEx
197 stdcall FillRect(long ptr long) FillRect32
198 stdcall FindWindowA(ptr ptr) FindWindow32A
199 stdcall FindWindowExA(long long ptr ptr) FindWindowEx32A
200 stdcall FindWindowExW(long long ptr ptr) FindWindowEx32W
201 stdcall FindWindowW(ptr ptr) FindWindow32W
198 stdcall FindWindowA(str str) FindWindow32A
199 stdcall FindWindowExA(long long str str) FindWindowEx32A
200 stdcall FindWindowExW(long long wstr wstr) FindWindowEx32W
201 stdcall FindWindowW(wstr wstr) FindWindow32W
202 stdcall FlashWindow(long long) FlashWindow32
203 stdcall FrameRect(long ptr long) FrameRect32
204 stub FreeDDElParam
@ -213,10 +213,10 @@ type win32
208 stdcall GetCapture() GetCapture32
209 stdcall GetCaretBlinkTime() GetCaretBlinkTime32
210 stdcall GetCaretPos(ptr) GetCaretPos32
211 stdcall GetClassInfoA(long ptr ptr) GetClassInfo32A
212 stdcall GetClassInfoExA(long ptr ptr) GetClassInfoEx32A
213 stdcall GetClassInfoExW(long ptr ptr) GetClassInfoEx32W
214 stdcall GetClassInfoW(long ptr ptr) GetClassInfo32W
211 stdcall GetClassInfoA(long str ptr) GetClassInfo32A
212 stdcall GetClassInfoExA(long str ptr) GetClassInfoEx32A
213 stdcall GetClassInfoExW(long wstr ptr) GetClassInfoEx32W
214 stdcall GetClassInfoW(long wstr ptr) GetClassInfo32W
215 stdcall GetClassLongA(long long) GetClassLong32A
216 stdcall GetClassLongW(long long) GetClassLong32W
217 stdcall GetClassNameA(long ptr long) GetClassName32A
@ -244,7 +244,7 @@ type win32
239 stdcall GetDoubleClickTime() GetDoubleClickTime32
240 stdcall GetFocus() GetFocus32
241 stdcall GetForegroundWindow() GetForegroundWindow32
242 stub GetIconInfo
242 stdcall GetIconInfo(long ptr) GetIconInfo
243 stub GetInputDesktop
244 stdcall GetInputState() GetInputState32
245 stdcall GetInternalWindowPos(long ptr ptr) GetInternalWindowPos32
@ -295,8 +295,8 @@ type win32
290 stdcall GetSysColorBrush(long) GetSysColorBrush32
291 stdcall GetSystemMenu(long long) GetSystemMenu32
292 stdcall GetSystemMetrics(long) GetSystemMetrics32
293 stdcall GetTabbedTextExtentA(long ptr long long ptr) GetTabbedTextExtent32A
294 stdcall GetTabbedTextExtentW(long ptr long long ptr) GetTabbedTextExtent32W
293 stdcall GetTabbedTextExtentA(long str long long ptr) GetTabbedTextExtent32A
294 stdcall GetTabbedTextExtentW(long wstr long long ptr) GetTabbedTextExtent32W
295 stub GetThreadDesktop
296 stdcall GetTopWindow(long) GetTopWindow32
297 stdcall GetUpdateRect(long ptr long) GetUpdateRect32
@ -357,32 +357,32 @@ type win32
352 stdcall IsZoomed(long) IsZoomed32
353 stdcall KillSystemTimer(long long) KillSystemTimer32
354 stdcall KillTimer(long long) KillTimer32
355 stdcall LoadAcceleratorsA(long ptr) LoadAccelerators32A
356 stdcall LoadAcceleratorsW(long ptr) LoadAccelerators32W
357 stdcall LoadBitmapA(long ptr) LoadBitmap32A
358 stdcall LoadBitmapW(long ptr) LoadBitmap32W
359 stdcall LoadCursorA(long ptr) LoadCursor32A
355 stdcall LoadAcceleratorsA(long str) LoadAccelerators32A
356 stdcall LoadAcceleratorsW(long wstr) LoadAccelerators32W
357 stdcall LoadBitmapA(long str) LoadBitmap32A
358 stdcall LoadBitmapW(long wstr) LoadBitmap32W
359 stdcall LoadCursorA(long str) LoadCursor32A
360 stub LoadCursorFromFileA
361 stub LoadCursorFromFileW
362 stdcall LoadCursorW(long ptr) LoadCursor32W
363 stdcall LoadIconA(long ptr) LoadIcon32A
364 stdcall LoadIconW(long ptr) LoadIcon32W
365 stdcall LoadImageA(long ptr long long long long) LoadImage32A
366 stdcall LoadImageW(long ptr long long long long) LoadImage32W
362 stdcall LoadCursorW(long wstr) LoadCursor32W
363 stdcall LoadIconA(long str) LoadIcon32A
364 stdcall LoadIconW(long wstr) LoadIcon32W
365 stdcall LoadImageA(long str long long long long) LoadImage32A
366 stdcall LoadImageW(long wstr long long long long) LoadImage32W
367 stub LoadKeyboardLayoutA
368 stub LoadKeyboardLayoutW
369 stub LoadLocalFonts
370 stdcall LoadMenuA(long ptr) LoadMenu32A
370 stdcall LoadMenuA(long str) LoadMenu32A
371 stdcall LoadMenuIndirectA(ptr) LoadMenuIndirect32A
372 stdcall LoadMenuIndirectW(ptr) LoadMenuIndirect32W
373 stdcall LoadMenuW(long ptr) LoadMenu32W
373 stdcall LoadMenuW(long wstr) LoadMenu32W
374 stub LoadRemoteFonts
375 stdcall LoadStringA(long long ptr long) LoadString32A
376 stdcall LoadStringW(long long ptr long) LoadString32W
377 stub LockWindowStation
378 stdcall LockWindowUpdate(long) LockWindowUpdate32
378 stdcall LookupIconIdFromDirectory(ptr long) LookupIconIdFromDirectory
379 stdcall LookupIconIdFromDirectoryEx(ptr long long long long) LookupIconIdFromDirectoryEx32
379 stdcall LookupIconIdFromDirectory(ptr long) LookupIconIdFromDirectory
380 stdcall LookupIconIdFromDirectoryEx(ptr long long long long) LookupIconIdFromDirectoryEx32
381 stub MBToWCSEx
382 stdcall MapDialogRect(long ptr) MapDialogRect32
383 stdcall MapVirtualKeyA(long long) MapVirtualKey32A
@ -393,12 +393,12 @@ type win32
388 stub MenuWindowProcA
389 stub MenuWindowProcW
390 stdcall MessageBeep(long) MessageBeep32
391 stdcall MessageBoxA(long ptr ptr long) MessageBox32A
392 stdcall MessageBoxExA(long ptr ptr long long) MessageBoxEx32A
393 stdcall MessageBoxExW(long ptr ptr long long) MessageBoxEx32W
391 stdcall MessageBoxA(long str str long) MessageBox32A
392 stdcall MessageBoxExA(long str str long long) MessageBoxEx32A
393 stdcall MessageBoxExW(long wstr wstr long long) MessageBoxEx32W
394 stub MessageBoxIndirectA
395 stub MessageBoxIndirectW
396 stdcall MessageBoxW(long ptr ptr long) MessageBox32W
396 stdcall MessageBoxW(long wstr wstr long) MessageBox32W
397 stdcall ModifyMenuA(long long long long ptr) ModifyMenu32A
398 stdcall ModifyMenuW(long long long long ptr) ModifyMenu32W
399 stdcall MoveWindow(long long long long long long) MoveWindow32
@ -433,8 +433,8 @@ type win32
428 stdcall RegisterClassExA(ptr) RegisterClassEx32A
429 stdcall RegisterClassExW(ptr) RegisterClassEx32W
430 stdcall RegisterClassW(ptr) RegisterClass32W
431 stdcall RegisterClipboardFormatA(ptr) RegisterClipboardFormat32A
432 stdcall RegisterClipboardFormatW(ptr) RegisterClipboardFormat32W
431 stdcall RegisterClipboardFormatA(str) RegisterClipboardFormat32A
432 stdcall RegisterClipboardFormatW(wstr) RegisterClipboardFormat32W
433 stub RegisterHotKey
434 stub RegisterLogonProcess
435 stub RegisterSystemThread
@ -444,8 +444,8 @@ type win32
439 stdcall ReleaseCapture() ReleaseCapture
440 stdcall ReleaseDC(long long) ReleaseDC32
441 stdcall RemoveMenu(long long long) RemoveMenu32
442 stdcall RemovePropA(long ptr) RemoveProp32A
443 stdcall RemovePropW(long ptr) RemoveProp32W
442 stdcall RemovePropA(long str) RemoveProp32A
443 stdcall RemovePropW(long wstr) RemoveProp32W
444 stub ReplyMessage
445 stub ResetDisplay
446 stub ReuseDDElParam
@ -478,10 +478,10 @@ type win32
473 stub SetCursorContents
474 stdcall SetCursorPos(long long) SetCursorPos32
475 stub SetDebugErrorLevel
476 stdcall SetDeskWallPaper(ptr) SetDeskWallPaper32
476 stdcall SetDeskWallPaper(str) SetDeskWallPaper32
477 stdcall SetDlgItemInt(long long long long) SetDlgItemInt32
478 stdcall SetDlgItemTextA(long long ptr) SetDlgItemText32A
479 stdcall SetDlgItemTextW(long long ptr) SetDlgItemText32W
478 stdcall SetDlgItemTextA(long long str) SetDlgItemText32A
479 stdcall SetDlgItemTextW(long long wstr) SetDlgItemText32W
480 stdcall SetDoubleClickTime(long) SetDoubleClickTime32
481 stdcall SetFocus(long) SetFocus32
482 stdcall SetForegroundWindow(long) SetForegroundWindow32
@ -499,8 +499,8 @@ type win32
494 stdcall SetMessageQueue(long) SetMessageQueue32
495 stdcall SetParent(long long) SetParent32
496 stub SetProcessWindowStation
497 stdcall SetPropA(long ptr long) SetProp32A
498 stdcall SetPropW(long ptr long) SetProp32W
497 stdcall SetPropA(long str long) SetProp32A
498 stdcall SetPropW(long wstr long) SetProp32W
499 stdcall SetRect(ptr long long long long) SetRect32
500 stdcall SetRectEmpty(ptr) SetRectEmpty32
501 stdcall SetScrollInfo(long long ptr long) SetScrollInfo32
@ -524,8 +524,8 @@ type win32
519 stdcall SetWindowPlacement(long ptr) SetWindowPlacement32
520 stdcall SetWindowPos(long long long long long long long) SetWindowPos32
521 stub SetWindowStationUser
522 stdcall SetWindowTextA(long ptr) SetWindowText32A
523 stdcall SetWindowTextW(long ptr) SetWindowText32W
522 stdcall SetWindowTextA(long str) SetWindowText32A
523 stdcall SetWindowTextW(long wstr) SetWindowText32W
524 stdcall SetWindowWord(long long long) SetWindowWord32
525 stdcall SetWindowsHookA(long ptr) SetWindowsHook32A
526 stdcall SetWindowsHookExA(long long long long) SetWindowsHookEx32A
@ -544,8 +544,8 @@ type win32
539 stdcall SwitchToThisWindow(long long) SwitchToThisWindow32
540 stdcall SystemParametersInfoA(long long ptr long) SystemParametersInfo32A
541 stdcall SystemParametersInfoW(long long ptr long) SystemParametersInfo32W
542 stdcall TabbedTextOutA(long long long ptr long long ptr long) TabbedTextOut32A
543 stdcall TabbedTextOutW(long long long ptr long long ptr long) TabbedTextOut32W
542 stdcall TabbedTextOutA(long long long str long long ptr long) TabbedTextOut32A
543 stdcall TabbedTextOutW(long long long wstr long long ptr long) TabbedTextOut32W
544 stub TileChildWindows
545 stub TileWindows
546 stdcall ToAscii(long long ptr ptr long) ToAscii32
@ -565,8 +565,8 @@ type win32
560 stub UnloadKeyboardLayout
561 stub UnlockWindowStation
562 stub UnpackDDElParam
563 stdcall UnregisterClassA(ptr long) UnregisterClass32A
564 stdcall UnregisterClassW(ptr long) UnregisterClass32W
563 stdcall UnregisterClassA(str long) UnregisterClass32A
564 stdcall UnregisterClassW(wstr long) UnregisterClass32W
565 stub UnregisterHotKey
566 stub UpdatePerUserSystemParameters
567 stdcall UpdateWindow(long) UpdateWindow32
@ -581,16 +581,16 @@ type win32
576 stdcall VkKeyScanW(long) VkKeyScan32W
577 stub WaitForInputIdle
578 stdcall WaitMessage() WaitMessage
579 stdcall WinHelpA(long ptr long long) WinHelp32A
580 stdcall WinHelpW(long ptr long long) WinHelp32W
579 stdcall WinHelpA(long str long long) WinHelp32A
580 stdcall WinHelpW(long wstr long long) WinHelp32W
581 stdcall WindowFromDC(long) WindowFromDC32
582 stdcall WindowFromPoint(long long) WindowFromPoint32
583 stub keybd_event
584 stub mouse_event
585 varargs wsprintfA() wsprintf32A
586 varargs wsprintfW() wsprintf32W
587 stdcall wvsprintfA(ptr ptr ptr) wvsprintf32A
588 stdcall wvsprintfW(ptr ptr ptr) wvsprintf32W
587 stdcall wvsprintfA(str str ptr) wvsprintf32A
588 stdcall wvsprintfW(wstr wstr ptr) wvsprintf32W
#late additions
589 stub ChangeDisplaySettingsA
590 stub ChangeDisplaySettingsW

View File

@ -1,17 +1,17 @@
name version
type win32
0 stdcall GetFileVersionInfoA(ptr long long ptr) GetFileVersionInfo32A
1 stdcall GetFileVersionInfoSizeA(ptr ptr) GetFileVersionInfoSize32A
2 stdcall GetFileVersionInfoSizeW(ptr ptr) GetFileVersionInfoSize32W
3 stdcall GetFileVersionInfoW(ptr long long ptr) GetFileVersionInfo32W
0 stdcall GetFileVersionInfoA(str long long ptr) GetFileVersionInfo32A
1 stdcall GetFileVersionInfoSizeA(str ptr) GetFileVersionInfoSize32A
2 stdcall GetFileVersionInfoSizeW(wstr ptr) GetFileVersionInfoSize32W
3 stdcall GetFileVersionInfoW(wstr long long ptr) GetFileVersionInfo32W
#4 stub VerFThk_ThunkData32
5 stdcall VerFindFileA(long ptr ptr ptr ptr ptr ptr ptr) VerFindFile32A
6 stdcall VerFindFileW(long ptr ptr ptr ptr ptr ptr ptr) VerFindFile32W
7 stdcall VerInstallFileA(long ptr ptr ptr ptr ptr ptr ptr) VerInstallFile32A
8 stdcall VerInstallFileW(long ptr ptr ptr ptr ptr ptr ptr) VerInstallFile32W
5 stdcall VerFindFileA(long str str str ptr ptr ptr ptr) VerFindFile32A
6 stdcall VerFindFileW(long wstr wstr wstr ptr ptr ptr ptr) VerFindFile32W
7 stdcall VerInstallFileA(long str str str str str ptr ptr) VerInstallFile32A
8 stdcall VerInstallFileW(long wstr wstr wstr wstr wstr ptr ptr) VerInstallFile32W
9 stdcall VerLanguageNameA(long ptr long) VerLanguageName32A
10 stdcall VerLanguageNameW(long ptr long) VerLanguageName32W
11 stdcall VerQueryValueA(ptr ptr ptr ptr) VerQueryValue32A
12 stdcall VerQueryValueW(ptr ptr ptr ptr) VerQueryValue32W
11 stdcall VerQueryValueA(ptr str ptr ptr) VerQueryValue32A
12 stdcall VerQueryValueW(ptr wstr ptr ptr) VerQueryValue32W
#13 stub VerThkSL_ThunkData32

7
if1632/winaspi.spec Normal file
View File

@ -0,0 +1,7 @@
name winaspi
type win16
1 pascal16 GetASPISupportInfo() GetASPISupportInfo16
2 pascal16 SendASPICommand(segptr) SendASPICommand16
#3 stub GETASPIDLLVERSION
#3 stub INSERTINASPICHAIN

View File

@ -1,185 +1,185 @@
name winmm
type win32
0001 stdcall PlaySoundA(ptr long long) PlaySound32A
0004 stub CloseDriver
0005 stub DefDriverProc
0006 stub DriverCallback
0007 stub DrvClose
0008 stub DrvDefDriverProc
0009 stub DrvGetModuleHandle
0010 stub DrvOpen
0011 stub DrvOpenA
0012 stub DrvSendMessage
0013 stub GetDriverFlags
0014 stub GetDriverModuleHandle
0015 stub OpenDriver
0016 stub OpenDriverA
0017 stub PlaySound
0018 stdcall PlaySoundW(ptr long long) PlaySound32W
0019 stub SendDriverMessage
0020 stub auxGetDevCapsA
0021 stub auxGetDevCapsW
0022 stub auxGetNumDevs
0023 stub auxGetVolume
0024 stub auxOutMessage
0025 stub auxSetVolume
0026 stub joyConfigChanged
0027 stub joyGetDevCapsA
0028 stub joyGetDevCapsW
0029 stub joyGetNumDevs
0030 stub joyGetPos
0031 stub joyGetPosEx
0032 stub joyGetThreshold
0033 stub joyReleaseCapture
0034 stub joySetCapture
0035 stub joySetThreshold
0036 stub mciDriverNotify
0037 stub mciDriverYield
0038 stub mciExecute
0039 stub mciFreeCommandResource
0040 stub mciGetCreatorTask
0041 stub mciGetDeviceIDA
0042 stub mciGetDeviceIDFromElementIDW
0043 stub mciGetDeviceIDW
0044 stub mciGetDriverData
0045 stub mciGetErrorStringA
0046 stub mciGetErrorStringW
0047 stub mciGetYieldProc
0048 stub mciLoadCommandResource
0049 stub mciSendCommandA
0050 stub mciSendCommandW
0051 stdcall mciSendStringA(ptr ptr long long) mciSendString
0052 stub mciSendStringW
0053 stub mciSetDriverData
0054 stub mciSetYieldProc
0055 stub midiConnect
0056 stub midiDisconnect
0057 stub midiInAddBuffer
0058 stub midiInClose
0059 stub midiInGetDevCapsA
0060 stub midiInGetDevCapsW
0061 stub midiInGetErrorTextA
0062 stub midiInGetErrorTextW
0063 stub midiInGetID
0064 stub midiInGetNumDevs
0065 stub midiInMessage
0066 stub midiInOpen
0067 stub midiInPrepareHeader
0068 stub midiInReset
0069 stub midiInStart
0070 stub midiInStop
0071 stub midiInUnprepareHeader
0072 stub midiOutCacheDrumPatches
0073 stub midiOutCachePatches
0074 stub midiOutClose
0075 stub midiOutGetDevCapsA
0076 stub midiOutGetDevCapsW
0077 stub midiOutGetErrorTextA
0078 stub midiOutGetErrorTextW
0079 stub midiOutGetID
0080 stub midiOutGetNumDevs
0081 stub midiOutGetVolume
0082 stub midiOutLongMsg
0083 stub midiOutMessage
0084 stub midiOutOpen
0085 stub midiOutPrepareHeader
0086 stub midiOutReset
0087 stub midiOutSetVolume
0088 stub midiOutShortMsg
0089 stub midiOutUnprepareHeader
0090 stub midiStreamClose
0091 stub midiStreamOpen
0092 stub midiStreamOut
0093 stub midiStreamPause
0094 stub midiStreamPosition
0095 stub midiStreamProperty
0096 stub midiStreamRestart
0097 stub midiStreamStop
0098 stub mixerClose
0099 stub mixerGetControlDetailsA
0100 stub mixerGetControlDetailsW
0101 stub mixerGetDevCapsA
0102 stub mixerGetDevCapsW
0103 stub mixerGetID
0104 stub mixerGetLineControlsA
0105 stub mixerGetLineControlsW
0106 stub mixerGetLineInfoA
0107 stub mixerGetLineInfoW
0108 stub mixerGetNumDevs
0109 stub mixerMessage
0110 stub mixerOpen
0111 stub mixerSetControlDetails
0112 stub mmioAdvance
0113 stub mmioAscend
0114 stub mmioClose
0115 stub mmioCreateChunk
0116 stub mmioDescend
0117 stub mmioFlush
0118 stub mmioGetInfo
0119 stub mmioInstallIOProc16
0120 stdcall mmioInstallIOProcA(long ptr long) mmioInstallIOProc32A
0121 stub mmioInstallIOProcW
0122 stub mmioOpenA
0123 stub mmioOpenW
0124 stub mmioRead
0125 stub mmioRenameA
0126 stub mmioRenameW
0127 stub mmioSeek
0128 stub mmioSendMessage
0129 stub mmioSetBuffer
0130 stub mmioSetInfo
0131 stub mmioStringToFOURCCA
0132 stub mmioStringToFOURCCW
0133 stub mmioWrite
0134 stub mmsystemGetVersion
0135 stdcall sndPlaySoundA(ptr long) sndPlaySound
0136 stub sndPlaySoundW
0137 stub timeBeginPeriod
0138 stub timeEndPeriod
0139 stub timeGetDevCaps
0140 stub timeGetSystemTime
0141 stdcall timeGetTime() timeGetTime
0142 stub timeKillEvent
0143 stub timeSetEvent
0144 stub waveInAddBuffer
0145 stub waveInClose
0146 stub waveInGetDevCapsA
0147 stub waveInGetDevCapsW
0148 stub waveInGetErrorTextA
0149 stub waveInGetErrorTextW
0150 stub waveInGetID
0151 stub waveInGetNumDevs
0152 stub waveInGetPosition
0153 stub waveInMessage
0154 stub waveInOpen
0155 stub waveInPrepareHeader
0156 stub waveInReset
0157 stub waveInStart
0158 stub waveInStop
0159 stub waveInUnprepareHeader
0160 stub waveOutBreakLoop
0161 stub waveOutClose
0162 stub waveOutGetDevCapsA
0163 stub waveOutGetDevCapsW
0164 stub waveOutGetErrorTextA
0165 stub waveOutGetErrorTextW
0166 stub waveOutGetID
0167 stdcall waveOutGetNumDevs() waveOutGetNumDevs
0168 stub waveOutGetPitch
0169 stub waveOutGetPlaybackRate
0170 stub waveOutGetPosition
0171 stub waveOutGetVolume
0172 stub waveOutMessage
0173 stub waveOutOpen
0174 stub waveOutPause
0175 stub waveOutPrepareHeader
0176 stub waveOutReset
0177 stub waveOutRestart
0178 stub waveOutSetPitch
0179 stub waveOutSetPlaybackRate
0180 stub waveOutSetVolume
0181 stub waveOutUnprepareHeader
0182 stub waveOutWrite
0183 stub winmmf_ThunkData32
0184 stub winmmsl_ThunkData32
1 stdcall PlaySoundA(ptr long long) PlaySound32A
4 stub CloseDriver
5 stub DefDriverProc
6 stub DriverCallback
7 stub DrvClose
8 stub DrvDefDriverProc
9 stub DrvGetModuleHandle
10 stub DrvOpen
11 stub DrvOpenA
12 stub DrvSendMessage
13 stub GetDriverFlags
14 stub GetDriverModuleHandle
15 stdcall OpenDriver(ptr ptr long) OpenDriver
16 stub OpenDriverA
17 stub PlaySound
18 stdcall PlaySoundW(ptr long long) PlaySound32W
19 stub SendDriverMessage
20 stdcall auxGetDevCapsA(long ptr long) auxGetDevCaps32A
21 stdcall auxGetDevCapsW(long ptr long) auxGetDevCaps32W
22 stdcall auxGetNumDevs() auxGetNumDevs32
23 stdcall auxGetVolume(long ptr) auxGetVolume32
24 stdcall auxOutMessage(long long long long) auxOutMessage32
25 stdcall auxSetVolume(long long) auxSetVolume32
26 stub joyConfigChanged
27 stub joyGetDevCapsA
28 stub joyGetDevCapsW
29 stub joyGetNumDevs
30 stub joyGetPos
31 stub joyGetPosEx
32 stub joyGetThreshold
33 stub joyReleaseCapture
34 stub joySetCapture
35 stub joySetThreshold
36 stub mciDriverNotify
37 stub mciDriverYield
38 stub mciExecute
39 stub mciFreeCommandResource
40 stub mciGetCreatorTask
41 stub mciGetDeviceIDA
42 stub mciGetDeviceIDFromElementIDW
43 stub mciGetDeviceIDW
44 stub mciGetDriverData
45 stdcall mciGetErrorStringA(long ptr long) mciGetErrorString32A
46 stdcall mciGetErrorStringW(long ptr long) mciGetErrorString32W
47 stub mciGetYieldProc
48 stub mciLoadCommandResource
49 stub mciSendCommandA
50 stub mciSendCommandW
51 stdcall mciSendStringA(ptr ptr long long) mciSendString
52 stub mciSendStringW
53 stub mciSetDriverData
54 stub mciSetYieldProc
55 stub midiConnect
56 stub midiDisconnect
57 stdcall midiInAddBuffer(long ptr long) midiInAddBuffer32
58 stdcall midiInClose(long) midiInClose32
59 stdcall midiInGetDevCapsA(long ptr long) midiInGetDevCaps32A
60 stdcall midiInGetDevCapsW(long ptr long) midiInGetDevCaps32W
61 stdcall midiInGetErrorTextA(long ptr long) midiInGetErrorText32A
62 stdcall midiInGetErrorTextW(long ptr long) midiInGetErrorText32W
63 stdcall midiInGetID(long) midiInGetID32
64 stdcall midiInGetNumDevs() midiInGetNumDevs32
65 stdcall midiInMessage(long long long long) midiInMessage32
66 stdcall midiInOpen(ptr long long long long) midiInOpen32
67 stdcall midiInPrepareHeader(long ptr long) midiInPrepareHeader32
68 stdcall midiInReset(long) midiInReset32
69 stdcall midiInStart(long) midiInStart32
70 stdcall midiInStop(long) midiInStop32
71 stdcall midiInUnprepareHeader(long ptr long) midiInUnprepareHeader32
72 stdcall midiOutCacheDrumPatches(long long ptr long) midiOutCacheDrumPatches32
73 stdcall midiOutCachePatches(long long ptr long) midiOutCachePatches32
74 stdcall midiOutClose(long) midiOutClose32
75 stdcall midiOutGetDevCapsA(long ptr long) midiOutGetDevCaps32A
76 stdcall midiOutGetDevCapsW(long ptr long) midiOutGetDevCaps32W
77 stdcall midiOutGetErrorTextA(long ptr long) midiOutGetErrorText32A
78 stdcall midiOutGetErrorTextW(long ptr long) midiOutGetErrorText32W
79 stdcall midiOutGetID(long) midiOutGetID32
80 stdcall midiOutGetNumDevs() midiOutGetNumDevs32
81 stdcall midiOutGetVolume(long ptr) midiOutGetVolume32
82 stdcall midiOutLongMsg(long ptr long) midiOutLongMsg32
83 stdcall midiOutMessage(long long long long) midiOutMessage32
84 stdcall midiOutOpen(ptr long long long long) midiOutOpen32
85 stdcall midiOutPrepareHeader(long ptr long) midiOutPrepareHeader32
86 stdcall midiOutReset(long) midiOutReset32
87 stdcall midiOutSetVolume(long ptr) midiOutSetVolume32
88 stdcall midiOutShortMsg(long long) midiOutShortMsg32
89 stdcall midiOutUnprepareHeader(long ptr long) midiOutUnprepareHeader32
90 stub midiStreamClose
91 stub midiStreamOpen
92 stub midiStreamOut
93 stub midiStreamPause
94 stub midiStreamPosition
95 stub midiStreamProperty
96 stub midiStreamRestart
97 stub midiStreamStop
98 stdcall mixerClose(long) mixerClose32
99 stdcall mixerGetControlDetailsA(long ptr long) mixerGetControlDetails32A
100 stdcall mixerGetControlDetailsW(long ptr long) mixerGetControlDetails32W
101 stdcall mixerGetDevCapsA(long ptr long) mixerGetDevCaps32A
102 stdcall mixerGetDevCapsW(long ptr long) mixerGetDevCaps32W
103 stdcall mixerGetID(long ptr long) mixerGetID32
104 stdcall mixerGetLineControlsA(long ptr long) mixerGetLineControls32A
105 stdcall mixerGetLineControlsW(long ptr long) mixerGetLineControls32W
106 stdcall mixerGetLineInfoA(long ptr long) mixerGetLineInfo32A
107 stdcall mixerGetLineInfoW(long ptr long) mixerGetLineInfo32W
108 stdcall mixerGetNumDevs() mixerGetNumDevs32
109 stdcall mixerMessage(long long long long) mixerMessage32
110 stdcall mixerOpen(ptr long long long long) mixerOpen32
111 stdcall mixerSetControlDetails(long ptr long) mixerSetControlDetails32
112 stub mmioAdvance
113 stub mmioAscend
114 stub mmioClose
115 stub mmioCreateChunk
116 stub mmioDescend
117 stub mmioFlush
118 stub mmioGetInfo
119 stub mmioInstallIOProc16
120 stdcall mmioInstallIOProcA(long ptr long) mmioInstallIOProc32A
121 stub mmioInstallIOProcW
122 stdcall mmioOpenA(str ptr long) mmioOpen32A
123 stdcall mmioOpenW(wstr ptr long) mmioOpen32W
124 stub mmioRead
125 stub mmioRenameA
126 stub mmioRenameW
127 stub mmioSeek
128 stub mmioSendMessage
129 stub mmioSetBuffer
130 stub mmioSetInfo
131 stdcall mmioStringToFOURCCA(str long) mmioStringToFOURCC32A
132 stdcall mmioStringToFOURCCW(wstr long) mmioStringToFOURCC32W
133 stub mmioWrite
134 stdcall mmsystemGetVersion() mmsystemGetVersion32
135 stdcall sndPlaySoundA(ptr long) sndPlaySound
136 stub sndPlaySoundW
137 stub timeBeginPeriod
138 stub timeEndPeriod
139 stub timeGetDevCaps
140 stub timeGetSystemTime
141 stdcall timeGetTime() timeGetTime
142 stub timeKillEvent
143 stub timeSetEvent
144 stdcall waveInAddBuffer(long ptr long) waveInAddBuffer32
145 stdcall waveInClose(long) waveInClose32
146 stdcall waveInGetDevCapsA(long ptr long) waveInGetDevCaps32A
147 stdcall waveInGetDevCapsW(long ptr long) waveInGetDevCaps32W
148 stdcall waveInGetErrorTextA(long ptr long) waveInGetErrorText32A
149 stdcall waveInGetErrorTextW(long ptr long) waveInGetErrorText32W
150 stdcall waveInGetID(long ptr) waveInGetID32
151 stdcall waveInGetNumDevs() waveInGetNumDevs32
152 stdcall waveInGetPosition(long ptr long) waveInGetPosition32
153 stdcall waveInMessage(long long long long) waveInMessage32
154 stdcall waveInOpen(ptr long ptr long long long) waveInOpen32
155 stdcall waveInPrepareHeader(long ptr long) waveInPrepareHeader32
156 stdcall waveInReset(long) waveInReset32
157 stdcall waveInStart(long) waveInStart32
158 stdcall waveInStop(long) waveInStop32
159 stdcall waveInUnprepareHeader(long ptr long) waveInUnprepareHeader32
160 stdcall waveOutBreakLoop(long) waveOutBreakLoop32
161 stdcall waveOutClose(long) waveOutClose32
162 stdcall waveOutGetDevCapsA(long ptr long) waveOutGetDevCaps32A
163 stdcall waveOutGetDevCapsW(long ptr long) waveOutGetDevCaps32W
164 stdcall waveOutGetErrorTextA(long ptr long) waveOutGetErrorText32A
165 stdcall waveOutGetErrorTextW(long ptr long) waveOutGetErrorText32W
166 stdcall waveOutGetID(long ptr) waveOutGetID32
167 stdcall waveOutGetNumDevs() waveOutGetNumDevs32
168 stdcall waveOutGetPitch(long ptr) waveOutGetPitch32
169 stdcall waveOutGetPlaybackRate(long ptr) waveOutGetPlaybackRate32
170 stdcall waveOutGetPosition(long ptr long) waveOutGetPosition32
171 stdcall waveOutGetVolume(long ptr) waveOutGetVolume32
172 stdcall waveOutMessage(long long long long) waveOutMessage32
173 stdcall waveOutOpen(ptr long ptr long long long) waveOutOpen32
174 stdcall waveOutPause(long) waveOutPause32
175 stdcall waveOutPrepareHeader(long ptr long) waveOutPrepareHeader32
176 stdcall waveOutReset(long) waveOutReset32
177 stdcall waveOutRestart(long) waveOutRestart32
178 stdcall waveOutSetPitch(long long) waveOutSetPitch32
179 stdcall waveOutSetPlaybackRate(long long) waveOutSetPlaybackRate32
180 stdcall waveOutSetVolume(long long) waveOutSetVolume32
181 stdcall waveOutUnprepareHeader(long ptr long) waveOutPrepareHeader32
182 stdcall waveOutWrite(long ptr long) waveOutWrite32
183 stub winmmf_ThunkData32
184 stub winmmsl_ThunkData32

View File

@ -51,7 +51,7 @@ type win32
148 stub DeletePrinterIC
149 stub DevQueryPrint
150 stub DeviceCapabilities
151 stdcall DeviceCapabilitiesA(ptr ptr long ptr ptr) DeviceCapabilities32A
151 stdcall DeviceCapabilitiesA(str str long ptr ptr) DeviceCapabilities32A
152 stub DeviceCapabilitiesW
153 stub DeviceMode
154 stub DocumentEvent

View File

@ -25,15 +25,15 @@ type win32
022 stdcall shutdown(long long) WINSOCK_shutdown32
023 stdcall socket(long long long) WINSOCK_socket32
051 stdcall gethostbyaddr(ptr long long) WINSOCK_gethostbyaddr32
052 stdcall gethostbyname(ptr) WINSOCK_gethostbyname32
053 stdcall getprotobyname(ptr) WINSOCK_getprotobyname32
052 stdcall gethostbyname(str) WINSOCK_gethostbyname32
053 stdcall getprotobyname(str) WINSOCK_getprotobyname32
054 stdcall getprotobynumber(long) WINSOCK_getprotobynumber32
055 stdcall getservbyname(ptr ptr) WINSOCK_getservbyname32
056 stdcall getservbyport(long ptr) WINSOCK_getservbyport32
055 stdcall getservbyname(str str) WINSOCK_getservbyname32
056 stdcall getservbyport(long str) WINSOCK_getservbyport32
057 stdcall gethostname(ptr long) WINSOCK_gethostname32
101 stub WSAAsyncSelect
101 stdcall WSAAsyncSelect(long long long long) WSAAsyncSelect
102 stub WSAAsyncGetHostByAddr
103 stub WSAAsyncGetHostByName
103 stdcall WSAAsyncGetHostByName(long long ptr ptr long) WSAAsyncGetHostByName32
104 stub WSAAsyncGetProtoByNumber
105 stub WSAAsyncGetProtoByName
106 stub WSAAsyncGetServByPort

173
include/aspi.h Normal file
View File

@ -0,0 +1,173 @@
#if !defined(ASPI_H)
#define ASPI_H
#pragma pack(1)
#define SS_PENDING 0x00
#define SS_COMP 0x01
#define SS_ABORTED 0x02
#define SS_ERR 0x04
#define SS_OLD_MANAGE 0xe1
#define SS_ILLEGAL_MODE 0xe2
#define SS_NO_ASPI 0xe3
#define SS_FAILED_INIT 0xe4
#define SS_INVALID_HA 0x81
#define SS_INVALID_SRB 0xe0
#define SS_ASPI_IS_BUSY 0xe5
#define SS_BUFFER_TO_BIG 0xe6
#define SC_HA_INQUIRY 0x00
#define SC_GET_DEV_TYPE 0x01
#define SC_EXEC_SCSI_CMD 0x02
#define SC_ABORT_SRB 0x03
#define SC_RESET_DEV 0x04
/* Host adapter status codes */
#define HASTAT_OK 0x00
#define HASTAT_SEL_TO 0x11
#define HASTAT_DO_DU 0x12
#define HASTAT_BUS_FREE 0x13
#define HASTAT_PHASE_ERR 0x14
/* Target status codes */
#define STATUS_GOOD 0x00
#define STATUS_CHKCOND 0x02
#define STATUS_BUSY 0x08
#define STATUS_RESCONF 0x18
typedef union SRB16 * LPSRB16;
struct SRB_HaInquiry16 {
BYTE SRB_cmd;
BYTE SRB_Status;
BYTE SRB_HaId;
BYTE SRB_Flags;
WORD SRB_55AASignature;
WORD SRB_ExtBufferSize;
BYTE HA_Count;
BYTE HA_SCSI_ID;
BYTE HA_ManagerId[16];
BYTE HA_Identifier[16];
BYTE HA_Unique[16];
BYTE HA_ExtBuffer[4];
} WINE_PACKED;
typedef struct SRB_HaInquiry16 SRB_HaInquiry16;
struct SRB_ExecSCSICmd16 {
BYTE SRB_Cmd; // ASPI command code (W)
BYTE SRB_Status; // ASPI command status byte (R)
BYTE SRB_HaId; // ASPI host adapter number (W)
BYTE SRB_Flags; // ASPI request flags (W)
DWORD SRB_Hdr_Rsvd; // Reserved, MUST = 0 (-)
BYTE SRB_Target; // Target's SCSI ID (W)
BYTE SRB_Lun; // Target's LUN number (W)
DWORD SRB_BufLen; // Data Allocation LengthPG (W/R)
BYTE SRB_SenseLen; // Sense Allocation Length (W)
SEGPTR SRB_BufPointer; // Data Buffer Pointer (W)
DWORD SRB_Rsvd1; // Reserved, MUST = 0 (-/W)
BYTE SRB_CDBLen; // CDB Length = 6 (W)
BYTE SRB_HaStat; // Host Adapter Status (R)
BYTE SRB_TargStat; // Target Status (R)
FARPROC16 SRB_PostProc; // Post routine (W)
BYTE SRB_Rsvd2[34]; // Reserved, MUST = 0
BYTE CDBByte[0]; // SCSI CBD - variable length (W)
/* variable example for 6 byte cbd
* BYTE CDBByte[6]; // SCSI CDB (W)
* BYTE SenseArea6[SENSE_LEN]; // Request Sense buffer (R)
*/
} WINE_PACKED ;
typedef struct SRB_ExecSCSICmd16 SRB_ExecSCSICmd16;
struct SRB_ExecSCSICmd32 {
BYTE SRB_Cmd; // ASPI command code = SC_EXEC_SCSI_CMD
BYTE SRB_Status; // ASPI command status byte
BYTE SRB_HaId; // ASPI host adapter number
BYTE SRB_Flags; // ASPI request flags
DWORD SRB_Hdr_Rsvd; // Reserved
BYTE SRB_Target; // Target's SCSI ID
BYTE SRB_Lun; // Target's LUN number
WORD SRB_Rsvd1; // Reserved for Alignment
DWORD SRB_BufLen; // Data Allocation Length
BYTE *SRB_BufPointer; // Data Buffer Point
BYTE SRB_SenseLen; // Sense Allocation Length
BYTE SRB_CDBLen; // CDB Length
BYTE SRB_HaStat; // Host Adapter Status
BYTE SRB_TargStat; // Target Status
void (*SRB_PostProc)(); // Post routine
void *SRB_Rsvd2; // Reserved
BYTE SRB_Rsvd3[16]; // Reserved for expansion
BYTE CDBByte[16]; // SCSI CDB
BYTE SenseArea[0]; // Request sense buffer - var length
};
typedef struct SRB_ExecSCSICmd32 SRB_ExecSCSICmd32;
struct SRB_Abort16 {
BYTE SRB_Cmd; // ASPI command code = SC_ABORT_SRB
BYTE SRB_Status; // ASPI command status byte
BYTE SRB_HaId; // ASPI host adapter number
BYTE SRB_Flags; // ASPI request flags
DWORD SRB_Hdr_Rsvd; // Reserved, MUST = 0
LPSRB16 SRB_ToAbort; // Pointer to SRB to abort
} WINE_PACKED;
typedef struct SRB_Abort16 SRB_Abort16;
struct SRB_BusDeviceReset16 {
BYTE SRB_Cmd; // ASPI command code = SC_RESET_DEV
BYTE SRB_Status; // ASPI command status byte
BYTE SRB_HaId; // ASPI host adapter number
BYTE SRB_Flags; // ASPI request flags
DWORD SRB_Hdr_Rsvd; // Reserved, MUST = 0
BYTE SRB_Target; // Target's SCSI ID
BYTE SRB_Lun; // Target's LUN number
BYTE SRB_ResetRsvd1[14]; // Reserved, MUST = 0
BYTE SRB_HaStat; // Host Adapter Status
BYTE SRB_TargStat; // Target Status
SEGPTR SRB_PostProc; // Post routine
BYTE SRB_ResetRsvd2[34]; // Reserved, MUST = 0
} WINE_PACKED;
typedef struct SRB_BusDeviceReset16 SRB_BusDeviceReset16;
struct SRB_GDEVBlock16 {
BYTE SRB_Cmd; // ASPI command code = SC_GET_DEV_TYPE
BYTE SRB_Status; // ASPI command status byte
BYTE SRB_HaId; // ASPI host adapter number
BYTE SRB_Flags; // ASPI request flags
DWORD SRB_Hdr_Rsvd; // Reserved, MUST = 0
BYTE SRB_Target; // Target's SCSI ID
BYTE SRB_Lun; // Target's LUN number
BYTE SRB_DeviceType; // Target's peripheral device type
} WINE_PACKED;
typedef struct SRB_GDEVBlock16 SRB_GDEVBlock16;
struct SRB_Common16 {
BYTE SRB_cmd;
};
typedef struct SRB_Common16 SRB_Common16;
union SRB16 {
SRB_Common16 common;
SRB_HaInquiry16 inquiry;
SRB_ExecSCSICmd16 cmd;
SRB_Abort16 abort;
SRB_BusDeviceReset16 reset;
SRB_GDEVBlock16 devtype;
};
typedef union SRB16 SRB16;
#endif

View File

@ -17,69 +17,48 @@ extern int (*IF1632_CallLargeStack)( int (*func)(), void *arg );
IF1632_CallLargeStack( (int(*)())(func), (void *)(arg) ) : \
((int(*)())(func))((void *)arg))
/* List of the 16-bit callback functions. This list is used */
/* by the build program to generate the file if1632/callto16.S */
#ifndef WINELIB
extern LONG CALLBACK CallTo16_regs_ (const CONTEXT *context, INT32 offset);
extern WORD CALLBACK CallTo16_word_ (FARPROC16);
extern WORD CALLBACK CallTo16_word_w (FARPROC16,WORD);
extern LONG CALLBACK CallTo16_long_l (FARPROC16,LONG);
extern WORD CALLBACK CallTo16_word_ww (FARPROC16,WORD,WORD);
extern WORD CALLBACK CallTo16_word_wl (FARPROC16,WORD,LONG);
extern WORD CALLBACK CallTo16_word_ll (FARPROC16,LONG,LONG);
extern WORD CALLBACK CallTo16_word_www (FARPROC16,WORD,WORD,WORD);
extern WORD CALLBACK CallTo16_word_wwl (FARPROC16,WORD,WORD,LONG);
extern WORD CALLBACK CallTo16_word_wlw (FARPROC16,WORD,LONG,WORD);
extern LONG CALLBACK CallTo16_long_wwl (FARPROC16,WORD,WORD,LONG);
extern WORD CALLBACK CallTo16_word_llwl (FARPROC16,LONG,LONG,WORD,LONG);
extern WORD CALLBACK CallTo16_word_lwll (FARPROC16,LONG,WORD,LONG,LONG);
extern LONG CALLBACK CallTo16_long_wwwl (FARPROC16,WORD,WORD,WORD,LONG);
extern WORD CALLBACK CallTo16_word_lwww (FARPROC16,LONG,WORD,WORD,WORD);
extern WORD CALLBACK CallTo16_word_wwll (FARPROC16,WORD,WORD,LONG,LONG);
extern WORD CALLBACK CallTo16_word_wllwl(FARPROC16,WORD,LONG,LONG,WORD,LONG);
extern LONG CALLBACK CallTo16_long_lwwll(FARPROC16,LONG,WORD,WORD,LONG,LONG);
extern WORD CALLBACK CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LONG);
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 )
#define CallDriverCallback( func, hdev, msg, user, lparam1, lparam2 ) \
CallTo16_word_wwlll( func, hdev, msg, user, lparam1, lparam2 )
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
CallTo16_word_wwlll( func, id, msg, dwUser, dw1, dw2 )
#define CallWindowsExitProc( func, nExitType ) \
CallTo16_word_w( func, nExitType )
#define CallWordBreakProc16( func, lpch, ichCurrent, cch, code ) \
CallTo16_word_lwww( func, lpch, ichCurrent, cch, code )
#else /* WINELIB */
#define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
(*func)( dwId, msg, hdrvr, lparam1, lparam2 )
#define CallDriverCallback( func, hdev, msg, user, lparam1, lparam2 ) \
(*func)( hdev, msg, user, lparam1, lparam2 )
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
(*func)( id, msg, dwUser, dw1, dw2 )
#define CallWindowsExitProc( func, nExitType ) \
(*func)( nExitType )
#define CallWordBreakProc16( func, lpch, ichCurrent, cch, code ) \
(*func)( lpch, ichCurrent, cch, code )
#endif /* WINELIB */
typedef struct
{
VOID (CALLBACK *CallRegisterProc)( CONTEXT *, INT32 );
VOID (CALLBACK *CallTaskRescheduleProc)(void);
LRESULT (CALLBACK *CallWndProc)( WNDPROC16, HWND16, UINT16,
WPARAM16, LPARAM );
LRESULT (CALLBACK *CallDriverProc)( DRIVERPROC16, DWORD, HDRVR16,
UINT16, LPARAM, LPARAM );
LRESULT (CALLBACK *CallDriverCallback)( FARPROC16, HANDLE16, UINT16,
DWORD, LPARAM, LPARAM );
LRESULT (CALLBACK *CallTimeFuncProc)( FARPROC16, WORD, UINT16,
DWORD, LPARAM, LPARAM );
INT16 (CALLBACK *CallWindowsExitProc)( FARPROC16, INT16 );
INT16 (CALLBACK *CallWordBreakProc)( EDITWORDBREAKPROC16, SEGPTR, INT16,
INT16, INT16 );
VOID (CALLBACK *CallBootAppProc)( FARPROC16, HANDLE16, HFILE16 );
WORD (CALLBACK *CallLoadAppSegProc)( FARPROC16, HANDLE16, HFILE16, WORD );
VOID (CALLBACK *CallSystemTimerProc)( FARPROC16 );
LRESULT (CALLBACK *CallASPIPostProc)( FARPROC16, SEGPTR );
/* Following are the graphics driver callbacks */
WORD (CALLBACK *CallDrvControlProc)( FARPROC16, SEGPTR, WORD,
SEGPTR, SEGPTR );
WORD (CALLBACK *CallDrvEnableProc)( FARPROC16, SEGPTR, WORD, SEGPTR,
SEGPTR, SEGPTR );
WORD (CALLBACK *CallDrvEnumDFontsProc)( FARPROC16, SEGPTR, SEGPTR,
FARPROC16, SEGPTR );
WORD (CALLBACK *CallDrvEnumObjProc)( FARPROC16, SEGPTR, WORD, FARPROC16,
SEGPTR );
WORD (CALLBACK *CallDrvOutputProc)( FARPROC16, SEGPTR, WORD, WORD, SEGPTR,
SEGPTR, SEGPTR, SEGPTR, SEGPTR );
DWORD (CALLBACK *CallDrvRealizeProc)( FARPROC16, SEGPTR, WORD, SEGPTR,
SEGPTR, SEGPTR );
WORD (CALLBACK *CallDrvStretchBltProc)( FARPROC16, SEGPTR, WORD, WORD,
WORD, WORD, SEGPTR, WORD, WORD,
WORD, WORD, DWORD, SEGPTR, SEGPTR,
SEGPTR );
DWORD (CALLBACK *CallDrvExtTextOutProc)( FARPROC16, SEGPTR, WORD, WORD,
SEGPTR, SEGPTR, INT16, SEGPTR,
SEGPTR, SEGPTR, SEGPTR, SEGPTR,
WORD );
} CALLBACKS_TABLE;
extern const CALLBACKS_TABLE *Callbacks;
#endif /* __WINE_CALLBACK_H */

View File

@ -24,4 +24,7 @@ extern BOOL32 DC_SetupGCForText( DC * dc );
extern const int DC_XROPfunction[];
INT32 CLIPPING_IntersectClipRect( DC * dc, INT32 left, INT32 top,
INT32 right, INT32 bottom, UINT32 flags );
#endif /* __WINE_DC_H */

View File

@ -20,6 +20,7 @@
#define DCX_NORECOMPUTE 0x00100000
#define DCX_VALIDATE 0x00200000
#define DCX_DCEEMPTY 0x00000800
#define DCX_DCEBUSY 0x00001000
#define DCX_WINDOWPAINT 0x00020000
#define DCX_KEEPCLIPRGN 0x00040000
@ -47,7 +48,8 @@ typedef struct tagDCE
extern void DCE_Init(void);
extern DCE* DCE_AllocDCE( HWND32 hWnd, DCE_TYPE type );
extern void DCE_FreeDCE( DCE *dce );
extern DCE* DCE_FreeDCE( DCE *dce );
extern void DCE_FreeWindowDCE( WND* );
extern INT16 DCE_ExcludeRgn( HDC32, WND*, HRGN32 );
extern HRGN32 DCE_GetVisRgn( HWND32, WORD );
extern BOOL32 DCE_InvalidateDCE( WND*, RECT32* );

View File

@ -7,6 +7,7 @@
#ifdef DEBUG_NONE_EXT
#undef DEBUG_ACCEL
#undef DEBUG_ASPI
#undef DEBUG_ATOM
#undef DEBUG_BITBLT
#undef DEBUG_BITMAP
@ -27,7 +28,6 @@
#undef DEBUG_DOSFS
#undef DEBUG_DRIVER
#undef DEBUG_EDIT
#undef DEBUG_ENV
#undef DEBUG_EVENT
#undef DEBUG_EXEC
#undef DEBUG_FILE
@ -93,6 +93,7 @@
#ifdef DEBUG_ALL_EXT
#define DEBUG_ACCEL
#define DEBUG_ASPI
#define DEBUG_ATOM
#define DEBUG_BITBLT
#define DEBUG_BITMAP
@ -113,7 +114,6 @@
#define DEBUG_DOSFS
#define DEBUG_DRIVER
#define DEBUG_EDIT
#define DEBUG_ENV
#define DEBUG_EVENT
#define DEBUG_EXEC
#define DEBUG_FILE
@ -185,6 +185,11 @@ short debug_msg_enabled[]={
#else
0,
#endif
#ifdef DEBUG_ASPI
1,
#else
0,
#endif
#ifdef DEBUG_ATOM
1,
#else
@ -285,11 +290,6 @@ short debug_msg_enabled[]={
#else
0,
#endif
#ifdef DEBUG_ENV
1,
#else
0,
#endif
#ifdef DEBUG_EVENT
1,
#else
@ -616,8 +616,21 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_atom if(!debug_msg_enabled[1]) ; else fprintf
#define debugging_atom debug_msg_enabled[1]
#define dprintf_aspi if(!debug_msg_enabled[1]) ; else fprintf
#define debugging_aspi debug_msg_enabled[1]
#else
#ifdef DEBUG_ASPI
#define dprintf_aspi fprintf
#define debugging_aspi 1
#else
#define dprintf_aspi while(0) fprintf
#define debugging_aspi 0
#endif
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_atom if(!debug_msg_enabled[2]) ; else fprintf
#define debugging_atom debug_msg_enabled[2]
#else
#ifdef DEBUG_ATOM
#define dprintf_atom fprintf
@ -629,8 +642,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_bitblt if(!debug_msg_enabled[2]) ; else fprintf
#define debugging_bitblt debug_msg_enabled[2]
#define dprintf_bitblt if(!debug_msg_enabled[3]) ; else fprintf
#define debugging_bitblt debug_msg_enabled[3]
#else
#ifdef DEBUG_BITBLT
#define dprintf_bitblt fprintf
@ -642,8 +655,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_bitmap if(!debug_msg_enabled[3]) ; else fprintf
#define debugging_bitmap debug_msg_enabled[3]
#define dprintf_bitmap if(!debug_msg_enabled[4]) ; else fprintf
#define debugging_bitmap debug_msg_enabled[4]
#else
#ifdef DEBUG_BITMAP
#define dprintf_bitmap fprintf
@ -655,8 +668,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_caret if(!debug_msg_enabled[4]) ; else fprintf
#define debugging_caret debug_msg_enabled[4]
#define dprintf_caret if(!debug_msg_enabled[5]) ; else fprintf
#define debugging_caret debug_msg_enabled[5]
#else
#ifdef DEBUG_CARET
#define dprintf_caret fprintf
@ -668,8 +681,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_cdaudio if(!debug_msg_enabled[5]) ; else fprintf
#define debugging_cdaudio debug_msg_enabled[5]
#define dprintf_cdaudio if(!debug_msg_enabled[6]) ; else fprintf
#define debugging_cdaudio debug_msg_enabled[6]
#else
#ifdef DEBUG_CDAUDIO
#define dprintf_cdaudio fprintf
@ -681,8 +694,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_class if(!debug_msg_enabled[6]) ; else fprintf
#define debugging_class debug_msg_enabled[6]
#define dprintf_class if(!debug_msg_enabled[7]) ; else fprintf
#define debugging_class debug_msg_enabled[7]
#else
#ifdef DEBUG_CLASS
#define dprintf_class fprintf
@ -694,8 +707,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_clipboard if(!debug_msg_enabled[7]) ; else fprintf
#define debugging_clipboard debug_msg_enabled[7]
#define dprintf_clipboard if(!debug_msg_enabled[8]) ; else fprintf
#define debugging_clipboard debug_msg_enabled[8]
#else
#ifdef DEBUG_CLIPBOARD
#define dprintf_clipboard fprintf
@ -707,8 +720,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_clipping if(!debug_msg_enabled[8]) ; else fprintf
#define debugging_clipping debug_msg_enabled[8]
#define dprintf_clipping if(!debug_msg_enabled[9]) ; else fprintf
#define debugging_clipping debug_msg_enabled[9]
#else
#ifdef DEBUG_CLIPPING
#define dprintf_clipping fprintf
@ -720,8 +733,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_combo if(!debug_msg_enabled[9]) ; else fprintf
#define debugging_combo debug_msg_enabled[9]
#define dprintf_combo if(!debug_msg_enabled[10]) ; else fprintf
#define debugging_combo debug_msg_enabled[10]
#else
#ifdef DEBUG_COMBO
#define dprintf_combo fprintf
@ -733,8 +746,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_comm if(!debug_msg_enabled[10]) ; else fprintf
#define debugging_comm debug_msg_enabled[10]
#define dprintf_comm if(!debug_msg_enabled[11]) ; else fprintf
#define debugging_comm debug_msg_enabled[11]
#else
#ifdef DEBUG_COMM
#define dprintf_comm fprintf
@ -746,8 +759,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_commdlg if(!debug_msg_enabled[11]) ; else fprintf
#define debugging_commdlg debug_msg_enabled[11]
#define dprintf_commdlg if(!debug_msg_enabled[12]) ; else fprintf
#define debugging_commdlg debug_msg_enabled[12]
#else
#ifdef DEBUG_COMMDLG
#define dprintf_commdlg fprintf
@ -759,8 +772,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_crtdll if(!debug_msg_enabled[12]) ; else fprintf
#define debugging_crtdll debug_msg_enabled[12]
#define dprintf_crtdll if(!debug_msg_enabled[13]) ; else fprintf
#define debugging_crtdll debug_msg_enabled[13]
#else
#ifdef DEBUG_CRTDLL
#define dprintf_crtdll fprintf
@ -772,8 +785,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_cursor if(!debug_msg_enabled[13]) ; else fprintf
#define debugging_cursor debug_msg_enabled[13]
#define dprintf_cursor if(!debug_msg_enabled[14]) ; else fprintf
#define debugging_cursor debug_msg_enabled[14]
#else
#ifdef DEBUG_CURSOR
#define dprintf_cursor fprintf
@ -785,8 +798,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_dc if(!debug_msg_enabled[14]) ; else fprintf
#define debugging_dc debug_msg_enabled[14]
#define dprintf_dc if(!debug_msg_enabled[15]) ; else fprintf
#define debugging_dc debug_msg_enabled[15]
#else
#ifdef DEBUG_DC
#define dprintf_dc fprintf
@ -798,8 +811,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_dde if(!debug_msg_enabled[15]) ; else fprintf
#define debugging_dde debug_msg_enabled[15]
#define dprintf_dde if(!debug_msg_enabled[16]) ; else fprintf
#define debugging_dde debug_msg_enabled[16]
#else
#ifdef DEBUG_DDE
#define dprintf_dde fprintf
@ -811,8 +824,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_dialog if(!debug_msg_enabled[16]) ; else fprintf
#define debugging_dialog debug_msg_enabled[16]
#define dprintf_dialog if(!debug_msg_enabled[17]) ; else fprintf
#define debugging_dialog debug_msg_enabled[17]
#else
#ifdef DEBUG_DIALOG
#define dprintf_dialog fprintf
@ -824,8 +837,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_dll if(!debug_msg_enabled[17]) ; else fprintf
#define debugging_dll debug_msg_enabled[17]
#define dprintf_dll if(!debug_msg_enabled[18]) ; else fprintf
#define debugging_dll debug_msg_enabled[18]
#else
#ifdef DEBUG_DLL
#define dprintf_dll fprintf
@ -837,8 +850,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_dosfs if(!debug_msg_enabled[18]) ; else fprintf
#define debugging_dosfs debug_msg_enabled[18]
#define dprintf_dosfs if(!debug_msg_enabled[19]) ; else fprintf
#define debugging_dosfs debug_msg_enabled[19]
#else
#ifdef DEBUG_DOSFS
#define dprintf_dosfs fprintf
@ -850,8 +863,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_driver if(!debug_msg_enabled[19]) ; else fprintf
#define debugging_driver debug_msg_enabled[19]
#define dprintf_driver if(!debug_msg_enabled[20]) ; else fprintf
#define debugging_driver debug_msg_enabled[20]
#else
#ifdef DEBUG_DRIVER
#define dprintf_driver fprintf
@ -863,8 +876,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_edit if(!debug_msg_enabled[20]) ; else fprintf
#define debugging_edit debug_msg_enabled[20]
#define dprintf_edit if(!debug_msg_enabled[21]) ; else fprintf
#define debugging_edit debug_msg_enabled[21]
#else
#ifdef DEBUG_EDIT
#define dprintf_edit fprintf
@ -875,19 +888,6 @@ extern short debug_msg_enabled[];
#endif
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_env if(!debug_msg_enabled[21]) ; else fprintf
#define debugging_env debug_msg_enabled[21]
#else
#ifdef DEBUG_ENV
#define dprintf_env fprintf
#define debugging_env 1
#else
#define dprintf_env while(0) fprintf
#define debugging_env 0
#endif
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_event if(!debug_msg_enabled[22]) ; else fprintf
#define debugging_event debug_msg_enabled[22]
@ -1686,6 +1686,7 @@ extern short debug_msg_enabled[];
#ifdef DEBUG_DEFINE_VARIABLES
static char *debug_msg_name[] = {
"accel",
"aspi",
"atom",
"bitblt",
"bitmap",
@ -1706,7 +1707,6 @@ static char *debug_msg_name[] = {
"dosfs",
"driver",
"edit",
"env",
"event",
"exec",
"file",

View File

@ -145,6 +145,7 @@ extern void DEBUG_AddBreakpoint( const DBG_ADDR *addr );
extern void DEBUG_DelBreakpoint( int num );
extern void DEBUG_EnableBreakpoint( int num, BOOL32 enable );
extern void DEBUG_InfoBreakpoints(void);
extern void DEBUG_AddModuleBreakpoints(void);
extern BOOL32 DEBUG_HandleTrap(void);
extern BOOL32 DEBUG_ShouldContinue( enum exec_mode mode, int * count );
extern enum exec_mode DEBUG_RestartExecution( enum exec_mode mode, int count );

View File

@ -43,5 +43,6 @@ extern UINT32 DRIVE_GetFlags( int drive );
extern int DRIVE_Chdir( int drive, const char *path );
extern int DRIVE_Disable( int drive );
extern int DRIVE_Enable( int drive );
extern int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive );
#endif /* __WINE_DRIVE_H */

View File

@ -43,10 +43,15 @@ extern HFILE32 FILE_Dup( HFILE32 hFile );
extern HFILE32 FILE_Dup2( HFILE32 hFile1, HFILE32 hFile2 );
extern HFILE32 FILE_Open( LPCSTR path, INT32 mode );
extern BOOL32 FILE_SetFileType( HFILE32 hFile, DWORD type );
extern LPVOID FILE_mmap( FILE_OBJECT *file, LPVOID start,
extern LPVOID FILE_mmap( HFILE32 hFile, LPVOID start,
DWORD size_high, DWORD size_low,
DWORD offset_high, DWORD offset_low,
int prot, int flags );
extern LPVOID FILE_dommap( FILE_OBJECT *file, LPVOID start,
DWORD size_high, DWORD size_low,
DWORD offset_high, DWORD offset_low,
int prot, int flags );
extern int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low );
extern HFILE32 _lcreat_uniq( LPCSTR path, INT32 attr );
/* files/directory.c */

View File

@ -34,6 +34,21 @@ typedef struct tagGDIOBJHDR
} GDIOBJHDR;
#define OBJ_PEN 1
#define OBJ_BRUSH 2
#define OBJ_DC 3
#define OBJ_METADC 4
#define OBJ_PAL 5
#define OBJ_FONT 6
#define OBJ_BITMAP 7
#define OBJ_REGION 8
#define OBJ_METAFILE 9
#define OBJ_MEMDC 10
#define OBJ_EXTPEN 11
#define OBJ_ENHMETADC 12
#define OBJ_ENHMETAFILE 13
typedef struct tagDeviceCaps
{
WORD version; /* 0: driver version */

File diff suppressed because it is too large Load Diff

View File

@ -135,7 +135,8 @@ extern FARPROC16 WIN32_GetProcAddress16( HMODULE32 hmodule, LPSTR name );
extern BOOL32 BUILTIN_Init(void);
extern HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL32 force );
extern LPCSTR BUILTIN_GetEntryPoint16( WORD cs, WORD ip, WORD *pOrd );
extern FARPROC32 BUILTIN_GetEntryPoint32( char *buffer, void *relay );
extern FARPROC32 BUILTIN_GetEntryPoint32( char *buffer, void *relay,
DWORD *typemask );
extern FARPROC32 BUILTIN_GetProcAddress32(NE_MODULE *pModule, LPCSTR function);
extern BOOL32 BUILTIN_ParseDLLOptions( const char *str );
extern void BUILTIN_PrintDLLs(void);

View File

@ -20,5 +20,6 @@ typedef struct
extern BOOL32 REGION_DeleteObject( HRGN32 hrgn, RGNOBJ * obj );
extern BOOL32 REGION_UnionRectWithRgn( HRGN32 hrgn, const RECT32 *lpRect );
extern BOOL32 REGION_FrameRgn( HRGN32 dest, HRGN32 src, INT32 x, INT32 y );
extern BOOL32 REGION_IsEmpty( HRGN32 rgn );
#endif /* __WINE_REGION_H */

View File

@ -77,6 +77,7 @@
#ifdef DEBUG_NONE
#undef DEBUG_ACCEL
#undef DEBUG_ASPI
#undef DEBUG_ATOM
#undef DEBUG_BITBLT
#undef DEBUG_BITMAP
@ -97,7 +98,6 @@
#undef DEBUG_DOSFS
#undef DEBUG_DRIVER
#undef DEBUG_EDIT
#undef DEBUG_ENV
#undef DEBUG_EVENT
#undef DEBUG_EXEC
#undef DEBUG_FILE
@ -163,6 +163,7 @@
#ifdef DEBUG_ALL
#define DEBUG_ACCEL
#define DEBUG_ASPI
#define DEBUG_ATOM
#define DEBUG_BITBLT
#define DEBUG_BITMAP
@ -183,7 +184,6 @@
#define DEBUG_DOSFS
#define DEBUG_DRIVER
#define DEBUG_EDIT
#define DEBUG_ENV
#define DEBUG_EVENT
#define DEBUG_EXEC
#define DEBUG_FILE

View File

@ -768,12 +768,21 @@ DECL_WINELIB_TYPE(LPDEBUGHOOKINFO);
#define DLGWINDOWEXTRA 30
/* Dialog styles */
#define DS_ABSALIGN 0x001
#define DS_SYSMODAL 0x002
#define DS_LOCALEDIT 0x020
#define DS_SETFONT 0x040
#define DS_MODALFRAME 0x080
#define DS_NOIDLEMSG 0x100
#define DS_ABSALIGN 0x0001
#define DS_SYSMODAL 0x0002
#define DS_3DLOOK 0x0004 /* win95 */
#define DS_FIXEDSYS 0x0008 /* win95 */
#define DS_NOFAILCREATE 0x0010 /* win95 */
#define DS_LOCALEDIT 0x0020
#define DS_SETFONT 0x0040
#define DS_MODALFRAME 0x0080
#define DS_NOIDLEMSG 0x0100
#define DS_SETFOREGROUND 0x0200 /* win95 */
#define DS_CONTROL 0x0400 /* win95 */
#define DS_CENTER 0x0800 /* win95 */
#define DS_CENTERMOUSE 0x1000 /* win95 */
#define DS_CONTEXTHELP 0x2000 /* win95 */
/* Dialog messages */
#define DM_GETDEFID (WM_USER+0)
@ -1917,7 +1926,7 @@ typedef struct
} DIBSECTION,*LPDIBSECTION;
/* Cursors / Icons */
/* Cursors / Icons */
typedef struct
{
@ -1929,7 +1938,14 @@ typedef struct
BYTE bBitsPerPixel;
} CURSORICONINFO;
/* only used by Win32 functions */
typedef struct {
BOOL32 fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP32 hbmMask;
HBITMAP32 hbmColor;
} ICONINFO,*LPICONINFO;
typedef struct {
BYTE i; /* much more .... */
@ -3227,13 +3243,34 @@ typedef BOOL32 (CALLBACK *DRAWSTATEPROC)(HDC32,LPARAM,WPARAM32,INT32,INT32);
#define SS_BLACKFRAME 0x00000007L
#define SS_GRAYFRAME 0x00000008L
#define SS_WHITEFRAME 0x00000009L
#define SS_SIMPLE 0x0000000BL
#define SS_LEFTNOWORDWRAP 0x0000000CL
#define SS_OWNERDRAW 0x0000000DL
#define SS_BITMAP 0x0000000EL
#define SS_ENHMETAFILE 0x0000000FL
#define SS_ETCHEDHORZ 0x00000010L
#define SS_ETCHEDVERT 0x00000011L
#define SS_ETCHEDFRAME 0x00000012L
#define SS_TYPEMASK 0x0000001FL
#define SS_NOPREFIX 0x00000080L
#define SS_CENTERIMAGE 0x00000200L
#define SS_RIGHTJUST 0x00000400L
#define SS_REALSIZEIMAGE 0x00000800L
#define SS_SUNKEN 0x00001000L
/* Static Control Messages */
#define STM_SETICON (WM_USER+0)
#define STM_GETICON (WM_USER+1)
#define STM_SETICON16 (WM_USER+0)
#define STM_SETICON32 0x0170
#define STM_SETICON WINELIB_NAME(STM_SETICON)
#define STM_GETICON16 (WM_USER+1)
#define STM_GETICON32 0x0171
#define STM_GETICON WINELIB_NAME(STM_GETICON)
#define STM_SETIMAGE 0x0172
#define STM_GETIMAGE 0x0173
/* WM_H/VSCROLL commands */
#define SB_LINEUP 0
@ -5430,6 +5467,7 @@ HANDLE32 WINAPI CreateFileMapping32A(HANDLE32,LPSECURITY_ATTRIBUTES,DWORD,
HANDLE32 WINAPI CreateFileMapping32W(HANDLE32,LPSECURITY_ATTRIBUTES,DWORD,
DWORD,DWORD,LPCWSTR);
#define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
HICON32 WINAPI CreateIconIndirect(LPICONINFO);
HANDLE32 WINAPI CreateMutex32A(LPSECURITY_ATTRIBUTES,BOOL32,LPCSTR);
HANDLE32 WINAPI CreateMutex32W(LPSECURITY_ATTRIBUTES,BOOL32,LPCWSTR);
#define CreateMutex WINELIB_NAME_AW(CreateMutex)
@ -5508,6 +5546,7 @@ DWORD WINAPI GetLogicalDrives(void);
BOOL32 WINAPI GetMenuItemInfo32A(HMENU32,UINT32,BOOL32,MENUITEMINFO32A*);
BOOL32 WINAPI GetMenuItemInfo32W(HMENU32,UINT32,BOOL32,MENUITEMINFO32W*);
#define GetMenuItemInfo WINELIB_NAME_AW(GetMenuItemInfo)
DWORD WINAPI GetObjectType(HANDLE32);
UINT32 WINAPI GetOEMCP(void);
DWORD WINAPI GetPriorityClass(HANDLE32);
INT32 WINAPI GetPrivateProfileSection32A(LPCSTR,LPSTR,INT32,LPCSTR);
@ -5562,6 +5601,9 @@ INT32 WINAPI MessageBoxEx32W(HWND32,LPCWSTR,LPCWSTR,UINT32,WORD);
BOOL32 WINAPI MoveFile32A(LPCSTR,LPCSTR);
BOOL32 WINAPI MoveFile32W(LPCWSTR,LPCWSTR);
#define MoveFile WINELIB_NAME_AW(MoveFile)
BOOL32 WINAPI MoveFileEx32A(LPCSTR,LPCSTR,DWORD);
BOOL32 WINAPI MoveFileEx32W(LPCWSTR,LPCWSTR,DWORD);
#define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
HANDLE32 WINAPI OpenEvent32A(DWORD,BOOL32,LPCSTR);
HANDLE32 WINAPI OpenEvent32W(DWORD,BOOL32,LPCWSTR);
#define OpenEvent WINELIB_NAME_AW(OpenEvent)

View File

@ -57,26 +57,22 @@ extern INT32 WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16,
extern INT32 WINPROC_MapMsg16To32W( UINT16 msg16, WPARAM16 wParam16,
UINT32 *pmsg32, WPARAM32 *pwparam32,
LPARAM *plparam );
extern INT32 WINPROC_MapMsg32ATo16( UINT32 msg32, WPARAM32 wParam32,
UINT16 *pmsg16, WPARAM16 *pwparam16,
LPARAM *plparam );
extern INT32 WINPROC_MapMsg32WTo16( UINT32 msg32, WPARAM32 wParam32,
UINT16 *pmsg16, WPARAM16 *pwparam16,
LPARAM *plparam );
extern INT32 WINPROC_MapMsg32ATo16( HWND32 hwnd, UINT32 msg32,
WPARAM32 wParam32, UINT16 *pmsg16,
WPARAM16 *pwparam16, LPARAM *plparam );
extern INT32 WINPROC_MapMsg32WTo16( HWND32 hwnd, UINT32 msg32,
WPARAM32 wParam32, UINT16 *pmsg16,
WPARAM16 *pwparam16, LPARAM *plparam );
extern void WINPROC_UnmapMsg32ATo32W( UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern void WINPROC_UnmapMsg32WTo32A( UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern void WINPROC_UnmapMsg16To32A( UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern void WINPROC_UnmapMsg16To32W( UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT WINPROC_UnmapMsg16To32A( UINT32 msg, WPARAM32 wParam,
LPARAM lParam, LRESULT result );
extern LRESULT WINPROC_UnmapMsg16To32W( UINT32 msg, WPARAM32 wParam,
LPARAM lParam, LRESULT result );
extern void WINPROC_UnmapMsg32ATo16( UINT32 msg, WPARAM32 wParam,
LPARAM lParam, MSGPARAM16* pm16 );
extern void WINPROC_UnmapMsg32WTo16( UINT32 msg, WPARAM32 wParam,
LPARAM lParam, MSGPARAM16* pm16 );
typedef LRESULT (*WINPROC_CALLWNDPROC16)(WNDPROC16,HWND16,UINT16,WPARAM16,LPARAM);
extern void WINPROC_SetCallWndProc16( WINPROC_CALLWNDPROC16 proc );
#endif /* __WINE_WINPROC_H */

View File

@ -435,6 +435,7 @@ typedef struct timeval TIMEVAL, *PTIMEVAL, *LPTIMEVAL;
/* ws_... struct conversion flags */
#define WS_DUP_LINEAR 0x0000
#define WS_DUP_NATIVE 0x0001 /* native structure format (not ws_..) */
#define WS_DUP_OFFSET 0x0002 /* internal pointers are offsets */
#define WS_DUP_SEGPTR 0x0004 /* internal pointers are SEGPTRs */

View File

@ -122,7 +122,6 @@ typedef DWORD ACCESS_MASK;
typedef ACCESS_MASK REGSAM;
typedef HANDLE32 HHOOK;
typedef HANDLE32 HKEY;
typedef HANDLE32 HMIXEROBJ;
typedef DWORD LCID;
typedef WORD LANGID;
typedef DWORD LCTYPE;
@ -145,7 +144,6 @@ typedef UINT16 *LPUINT16;
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. */
@ -179,6 +177,8 @@ DECLARE_HANDLE(HMETAFILE);
DECLARE_HANDLE(HMIDI);
DECLARE_HANDLE(HMIDIIN);
DECLARE_HANDLE(HMIDIOUT);
DECLARE_HANDLE(HMIXER);
DECLARE_HANDLE(HMIXEROBJ);
DECLARE_HANDLE(HMMIO);
DECLARE_HANDLE(HMODULE);
DECLARE_HANDLE(HPALETTE);

View File

@ -3,7 +3,7 @@
* libwine.a.
*/
#include <stdarg.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -21,7 +21,6 @@ extern LRESULT MDIClientWndProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT PrintDlgProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT PrintSetupDlgProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT ReplaceTextDlgProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT TASK_Reschedule(void);
/***********************************************************************
* MODULE_GetWndProcEntry16 (not a Windows API function)
@ -39,8 +38,7 @@ FARPROC16 MODULE_GetWndProcEntry16( char *name )
MAP_STR_TO_PROC("PrintDlgProc",PrintDlgProc);
MAP_STR_TO_PROC("PrintSetupDlgProc",PrintSetupDlgProc);
MAP_STR_TO_PROC("ReplaceTextDlgProc",ReplaceTextDlgProc);
MAP_STR_TO_PROC("TASK_Reschedule",TASK_Reschedule);
fprintf(stderr,"warning: No mapping for %s(), add one in library/miscstubs.c\n",name);
assert( FALSE );
return NULL;
}

View File

@ -92,9 +92,6 @@ int MAIN_Init(void)
/* Initialize relay code */
if (!RELAY_Init()) return 0;
/* Create built-in modules */
if (!BUILTIN_Init()) return 0;
/* Initialize signal handling */
if (!SIGNAL_InitEmulator()) return 0;
@ -232,7 +229,7 @@ int main(int argc, char *argv[] )
return 0;
}
if (Options.debug) DEBUG_SetBreakpoints( TRUE ); /* Setup breakpoints */
if (Options.debug) DEBUG_AddModuleBreakpoints();
Yield(); /* Start the first task */
fprintf( stderr, "WinMain: Should never happen: returned from Yield()\n" );

View File

@ -636,9 +636,7 @@ static HMODULE32 MODULE_LoadExeHeader( HFILE32 hFile, OFSTRUCT *ofs )
ne_header.rname_tab_offset - ne_header.resource_tab_offset,
pData )) return (HMODULE32)11; /* invalid exe */
pData += ne_header.rname_tab_offset - ne_header.resource_tab_offset;
#ifndef WINELIB
NE_InitResourceHandler( hModule );
#endif
}
else pModule->res_table = 0; /* No resource table */
@ -1017,7 +1015,7 @@ static BOOL16 MODULE_CallWEP( HMODULE16 hModule )
dprintf_module( stddeb, "module %04x doesn't have a WEP\n", hModule );
return FALSE;
}
return CallWindowsExitProc( WEP, WEP_FREE_DLL );
return Callbacks->CallWindowsExitProc( WEP, WEP_FREE_DLL );
}
@ -1258,7 +1256,8 @@ HINSTANCE16 MODULE_Load( LPCSTR name, LPVOID paramBlock, UINT16 uFlags)
stack16Top->cs = 0;
hf = FILE_DupUnixHandle( MODULE_OpenFile( hModule ) );
CallTo16_word_ww( selfloadheader->BootApp, hModule, hf );
Callbacks->CallBootAppProc( selfloadheader->BootApp,
hModule, hf );
_lclose32(hf);
/* some BootApp procs overwrite the selector of dgroup */
pSegTable[pModule->dgroup - 1].selector = saved_dgroup;
@ -1341,6 +1340,15 @@ HINSTANCE16 LoadModule16( LPCSTR name, LPVOID paramBlock )
return MODULE_Load( name, paramBlock, 0 );
}
/**********************************************************************
* LoadModule32 (KERNEL32)
* FIXME: check this function
*/
DWORD LoadModule32( LPCSTR name, LPVOID paramBlock )
{
return MODULE_Load( name, paramBlock, 0 );
}
/**********************************************************************
* FreeModule16 (KERNEL.46)
@ -1865,7 +1873,6 @@ LPIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE32 hModule)
* but we could get HMODULE16 or the like (think builtin modules)
*/
#ifndef WINELIB
NE_MODULE *pModule;
if (!(pModule = MODULE_GetPtr( hModule )))
@ -1875,9 +1882,6 @@ LPIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE32 hModule)
if (pModule->flags & NE_FFLAGS_BUILTIN)
return (LPIMAGE_NT_HEADERS)0;
return pModule->pe_module->pe_header;
#else
return NULL;
#endif
}
@ -1919,12 +1923,13 @@ BOOL16 WINAPI ModuleFirst( MODULEENTRY *lpme )
BOOL16 WINAPI ModuleNext( MODULEENTRY *lpme )
{
NE_MODULE *pModule;
char *name;
if (!lpme->wNext) return FALSE;
if (!(pModule = MODULE_GetPtr( lpme->wNext ))) return FALSE;
strncpy( lpme->szModule, (char *)pModule + pModule->name_table,
MAX_MODULE_NAME );
lpme->szModule[MAX_MODULE_NAME] = '\0';
name = (char *)pModule + pModule->name_table;
memcpy( lpme->szModule, name + 1, *name );
lpme->szModule[(BYTE)*name] = '\0';
lpme->hModule = lpme->wNext;
lpme->wcUsage = pModule->count;
strncpy( lpme->szExePath, NE_MODULE_NAME(pModule), MAX_PATH );

View File

@ -1,4 +1,3 @@
#ifndef WINELIB
/*
* NE modules
*
@ -88,8 +87,8 @@ BOOL32 NE_LoadSegment( HMODULE16 hModule, WORD segnum )
stack16Top->bp = 0;
stack16Top->ip = 0;
stack16Top->cs = 0;
newselector = CallTo16_word_www( selfloadheader->LoadAppSeg,
hModule, hf, segnum );
newselector = Callbacks->CallLoadAppSegProc(selfloadheader->LoadAppSeg,
hModule, hf, segnum );
_lclose32( hf );
if (newselector != oldselector) {
/* Self loaders like creating their own selectors;
@ -519,7 +518,7 @@ static BOOL32 NE_InitDLL( TDB* pTask, HMODULE16 hModule )
dprintf_dll( stddeb, "Calling LibMain, cs:ip=%04lx:%04x ds=%04lx di=%04x cx=%04x\n",
CS_reg(&context), IP_reg(&context), DS_reg(&context),
DI_reg(&context), CX_reg(&context) );
CallTo16_regs_( &context, 0 );
Callbacks->CallRegisterProc( &context, 0 );
return TRUE;
}
@ -537,11 +536,7 @@ void NE_InitializeDLLs( HMODULE16 hModule )
HMODULE16 *pDLL;
if (!(pModule = MODULE_GetPtr( hModule ))) return;
if (pModule->flags & NE_FFLAGS_WIN32)
{
/* PE_InitializeDLLs(hModule); */
return;
}
if (pModule->flags & NE_FFLAGS_WIN32) return;
if (pModule->dlls_to_init)
{
@ -558,7 +553,7 @@ void NE_InitializeDLLs( HMODULE16 hModule )
/***********************************************************************
* NE_PatchCodeHandle
* PatchCodeHandle
*
* Needed for self-loading modules.
*/
@ -567,4 +562,3 @@ void NE_InitializeDLLs( HMODULE16 hModule )
void WINAPI PatchCodeHandle(HANDLE16 hSel)
{
}
#endif /* WINELIB */

View File

@ -1,4 +1,3 @@
#ifndef WINELIB
/*
*
* Copyright 1993 Robert J. Amstadt
@ -305,9 +304,7 @@ HGLOBAL16 NE_AllocResource( HMODULE16 hModule, HRSRC16 hRsrc, DWORD size )
NE_MODULE *pModule = MODULE_GetPtr( hModule );
if (!pModule || !pModule->res_table) return 0;
sizeShift = *(WORD *)((char *)pModule + pModule->res_table);
#ifndef WINELIB
pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
#endif
if (size < (DWORD)pNameInfo->length << sizeShift)
size = (DWORD)pNameInfo->length << sizeShift;
return GLOBAL_Alloc( GMEM_FIXED, size, hModule, FALSE, FALSE, FALSE );
@ -324,9 +321,7 @@ int NE_AccessResource( HMODULE16 hModule, HRSRC16 hRsrc )
NE_MODULE *pModule = MODULE_GetPtr( hModule );
if (!pModule || !pModule->res_table) return -1;
#ifndef WINELIB
pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
#endif
if ((fd = _lopen32( NE_MODULE_NAME(pModule), OF_READ )) != -1)
{
@ -348,9 +343,7 @@ DWORD NE_SizeofResource( HMODULE16 hModule, HRSRC16 hRsrc )
NE_MODULE *pModule = MODULE_GetPtr( hModule );
if (!pModule || !pModule->res_table) return 0;
sizeShift = *(WORD *)((char *)pModule + pModule->res_table);
#ifndef WINELIB
pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
#endif
return (DWORD)pNameInfo->length << sizeShift;
}
@ -371,7 +364,6 @@ HGLOBAL16 NE_LoadResource( HMODULE16 hModule, HRSRC16 hRsrc )
d = pModule->res_table + 2;
pTypeInfo = (NE_TYPEINFO *)((char *)pModule + d);
#ifndef WINELIB
while( hRsrc > d )
{
if (pTypeInfo->type_id == 0)
@ -389,7 +381,7 @@ HGLOBAL16 NE_LoadResource( HMODULE16 hModule, HRSRC16 hRsrc )
}
pTypeInfo = (NE_TYPEINFO *)(((char *)pModule) + d);
}
#endif
if (pNameInfo)
{
RESOURCEHANDLER16 __r16loader;
@ -459,6 +451,7 @@ BOOL32 NE_FreeResource( HMODULE16 hModule, HGLOBAL16 handle )
{
GlobalFree16( pNameInfo->handle );
pNameInfo->handle = 0;
pNameInfo->flags &= ~NE_SEGFLAGS_LOADED;
}
return 0;
}
@ -472,4 +465,3 @@ BOOL32 NE_FreeResource( HMODULE16 hModule, HGLOBAL16 handle )
GlobalFree16( handle ); /* it could have been DirectResAlloc()'ed */
return handle;
}
#endif /* WINELIB */

View File

@ -22,6 +22,7 @@
#include "windows.h"
#include "winbase.h"
#include "callback.h"
#include "file.h"
#include "neexe.h"
#include "peexe.h"
#include "process.h"
@ -30,7 +31,6 @@
#include "global.h"
#include "task.h"
#include "ldt.h"
#include "options.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
@ -45,17 +45,12 @@ static void PE_InitDLL(PE_MODREF* modref, DWORD type, LPVOID lpReserved);
void dump_exports(IMAGE_EXPORT_DIRECTORY * pe_exports, unsigned int load_addr)
{
#ifndef WINELIB
char *Module;
int i;
int i, j;
u_short *ordinal;
u_long *function,*functions;
u_char **name,*ename;
char buffer[1000];
DBG_ADDR daddr;
daddr.seg = 0;
daddr.type = NULL;
Module = (char*)RVA(pe_exports->Name);
dprintf_win32(stddeb,"\n*******EXPORT DATA*******\nModule name is %s, %ld functions, %ld names\n",
Module,
@ -66,25 +61,17 @@ void dump_exports(IMAGE_EXPORT_DIRECTORY * pe_exports, unsigned int load_addr)
functions=function=(u_long*) RVA(pe_exports->AddressOfFunctions);
name=(u_char**) RVA(pe_exports->AddressOfNames);
dprintf_win32(stddeb,"%-32s Ordinal Virt Addr\n", "Function Name");
for (i=0;i<pe_exports->NumberOfFunctions;i++) {
if (i<pe_exports->NumberOfNames) {
ename=(char*)RVA(*name++);
dprintf_win32(stddeb,"%-32s %4d %8.8lx (%8.8lx)\n",ename,*ordinal,functions[*ordinal],*function);
sprintf(buffer,"%s_%s",Module,ename);
daddr.off=RVA(functions[*ordinal]);
ordinal++;
function++;
} else {
/* ordinals/names no longer valid, but we still got functions */
dprintf_win32(stddeb,"%-32s %4s %8s %8.8lx\n","","","",*function);
sprintf(buffer,"%s_%d",Module,i);
daddr.off=RVA(*functions);
function++;
}
DEBUG_AddSymbol(buffer,&daddr, NULL, SYM_WIN32 | SYM_FUNC);
dprintf_win32(stddeb," Ord Virt Addr Name\n" );
for (i=0;i<pe_exports->NumberOfFunctions;i++, function++)
{
if (!*function) continue; /* No such function */
dprintf_win32( stddeb,"%4d %08lx", i + pe_exports->Base, *function );
/* Check if we have a name for it */
for (j = 0; j < pe_exports->NumberOfNames; j++)
if (ordinal[j] == i)
dprintf_win32( stddeb, " %s", (char*)RVA(name[j]) );
dprintf_win32( stddeb,"\n" );
}
#endif
}
/* Look up the specified function or ordinal in the exportlist:
@ -241,9 +228,7 @@ fixup_imports (PDB32 *process,PE_MODREF *pem)
char *Module;
IMAGE_IMPORT_BY_NAME *pe_name;
LPIMAGE_THUNK_DATA import_list,thunk_list;
int ordimportwarned;
ordimportwarned = 0;
Module = (char *) RVA(pe_imp->Name);
dprintf_win32 (stddeb, "%s\n", Module);
@ -258,10 +243,6 @@ fixup_imports (PDB32 *process,PE_MODREF *pem)
if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) {
int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
if(!lstrncmpi32A(Module,"kernel32",8) && !ordimportwarned){
fprintf(stderr,"%s imports kernel32.dll by ordinal. May crash.\n",modname);
ordimportwarned = 1;
}
dprintf_win32 (stddeb, "--- Ordinal %s,%d\n", Module, ordinal);
thunk_list->u1.Function=(LPDWORD)GetProcAddress32(MODULE_FindModule(Module),(LPCSTR)ordinal);
if (!thunk_list->u1.Function) {
@ -292,13 +273,6 @@ fixup_imports (PDB32 *process,PE_MODREF *pem)
/* not sure about this branch, but it seems to work */
int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal);
if (!lstrncmpi32A(Module,"kernel32",8) &&
!ordimportwarned
) {
fprintf(stderr,"%s imports kernel32.dll by ordinal. May crash.\n",modname);
ordimportwarned = 1;
}
dprintf_win32(stddeb,"--- Ordinal %s.%d\n",Module,ordinal);
thunk_list->u1.Function=(LPDWORD)GetProcAddress32(MODULE_FindModule(Module),
(LPCSTR) ordinal);
@ -422,65 +396,46 @@ static void do_relocations(PE_MODREF *pem)
* Load one PE format DLL/EXE into memory
*
* Unluckily we can't just mmap the sections where we want them, for
* (at least) Linux does only support offset with are multiples of the
* underlying filesystemblocksize, but PE DLLs usually have alignments of 512
* byte. This fails for instance when you try to map from CDROM (bsize 2048).
* (at least) Linux does only support offsets which are page-aligned.
*
* BUT we have to map the whole image anyway, for Win32 programs sometimes
* want to access them. (HMODULE32 point to the start of it)
*/
static PE_MODULE *PE_LoadImage( int fd )
static PE_MODULE *PE_LoadImage( HFILE32 hFile )
{
struct pe_data *pe;
struct stat stbuf;
struct pe_data *pe;
HMODULE32 hModule;
HANDLE32 mapping;
if (-1==fstat(fd,&stbuf)) {
perror("PE_LoadImage:fstat");
return NULL;
}
pe = xmalloc(sizeof(struct pe_data));
memset(pe,0,sizeof(struct pe_data));
/* map the PE file somewhere */
mapping = CreateFileMapping32A( hFile, NULL, PAGE_READONLY | SEC_COMMIT,
0, 0, NULL );
if (!mapping)
{
fprintf( stderr, "PE_LoadImage: CreateFileMapping error %ld\n",
GetLastError() );
return NULL;
}
hModule = (HMODULE32)MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 );
CloseHandle( mapping );
if (!hModule)
{
fprintf( stderr, "PE_LoadImage: MapViewOfFile error %ld\n",
GetLastError() );
return NULL;
}
/* map the PE image somewhere */
pe->mappeddll = (HMODULE32)mmap(NULL,stbuf.st_size,PROT_READ,MAP_SHARED,fd,0);
if (!pe->mappeddll || pe->mappeddll==-1) {
if (errno==ENOEXEC) {
int res=0,curread = 0;
lseek(fd,0,SEEK_SET);
/* linux: some filesystems don't support mmap (samba,
* ntfs apparently) so we have to read the image the
* hard way
*/
pe->mappeddll = xmalloc(stbuf.st_size);
while (curread < stbuf.st_size) {
res = read(fd,pe->mappeddll+curread,stbuf.st_size-curread);
if (res<=0)
break;
curread+=res;
}
if (res == -1) {
perror("PE_LoadImage:mmap compat read");
free(pe->mappeddll);
free(pe);
return NULL;
}
} else {
perror("PE_LoadImage:mmap");
free(pe);
return NULL;
}
}
/* link PE header */
pe->pe_header = (IMAGE_NT_HEADERS*)(pe->mappeddll+(((IMAGE_DOS_HEADER*)pe->mappeddll)->e_lfanew));
if (pe->pe_header->Signature!=IMAGE_NT_SIGNATURE) {
fprintf(stderr,"image doesn't have PE signature, but 0x%08lx\n",
pe->pe_header->Signature
);
free(pe);
return NULL;
}
/* build PE header */
pe = xmalloc(sizeof(struct pe_data));
pe->mappeddll = hModule;
pe->pe_header = (IMAGE_NT_HEADERS*)(pe->mappeddll+(((IMAGE_DOS_HEADER*)pe->mappeddll)->e_lfanew));
if (pe->pe_header->Signature!=IMAGE_NT_SIGNATURE)
{
fprintf(stderr,"image doesn't have PE signature, but 0x%08lx\n",
pe->pe_header->Signature );
free(pe);
return NULL;
}
if (pe->pe_header->FileHeader.Machine != IMAGE_FILE_MACHINE_I386) {
fprintf(stderr,"trying to load PE image for unsupported architecture (");
@ -523,7 +478,6 @@ PE_MapImage(PE_MODULE *pe,PDB32 *process, OFSTRUCT *ofs, DWORD flags) {
int i, result;
int load_addr;
IMAGE_DATA_DIRECTORY dir;
char buffer[200];
char *modname;
int vma_size;
@ -553,8 +507,8 @@ PE_MapImage(PE_MODULE *pe,PDB32 *process, OFSTRUCT *ofs, DWORD flags) {
{
/* memcpy only non-BSS segments */
/* FIXME: this should be done by mmap(..MAP_PRIVATE|MAP_FIXED..)
* but it is not possible for (at least) Linux needs an offset
* aligned to a block on the filesystem.
* but it is not possible for (at least) Linux needs
* a page-aligned offset.
*/
if(!(pe->pe_seg[i].Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA))
memcpy((char*)RVA(pe->pe_seg[i].VirtualAddress),
@ -599,8 +553,10 @@ PE_MapImage(PE_MODULE *pe,PDB32 *process, OFSTRUCT *ofs, DWORD flags) {
dir=pe->pe_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
if(dir.Size)
{
/*
if(pem->pe_import && (int)pem->pe_import!=RVA(dir.VirtualAddress))
fprintf(stderr,"wrong import directory??\n");
*/
pem->pe_import = (LPIMAGE_IMPORT_DESCRIPTOR) RVA(dir.VirtualAddress);
}
@ -682,25 +638,6 @@ PE_MapImage(PE_MODULE *pe,PDB32 *process, OFSTRUCT *ofs, DWORD flags) {
if ((s=strchr(modname,'.')))
*s='\0';
}
#ifndef WINELIB
{
DBG_ADDR daddr = { NULL, 0, 0 };
/* add start of sections as debugsymbols */
for(i=0;i<pe->pe_header->FileHeader.NumberOfSections;i++) {
sprintf(buffer,"%s_%s",modname,pe->pe_seg[i].Name);
daddr.off= RVA(pe->pe_seg[i].VirtualAddress);
DEBUG_AddSymbol(buffer,&daddr, NULL, SYM_WIN32 | SYM_FUNC);
}
/* add entry point */
sprintf(buffer,"%s_EntryPoint",modname);
daddr.off=RVA(pe->pe_header->OptionalHeader.AddressOfEntryPoint);
DEBUG_AddSymbol(buffer,&daddr, NULL, SYM_WIN32 | SYM_FUNC);
/* add start of DLL */
daddr.off=load_addr;
DEBUG_AddSymbol(modname,&daddr, NULL, SYM_WIN32 | SYM_FUNC);
}
#endif
}
HINSTANCE16 MODULE_CreateInstance(HMODULE16 hModule,LOADPARAMS *params);
@ -730,17 +667,20 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
pModule = MODULE_GetPtr(hModule);
} else {
#ifndef WINELIB
/* try to load builtin, enabled modules first */
if ((hModule = BUILTIN_LoadModule( name, FALSE )))
return hModule;
#endif
/* try to open the specified file */
if (HFILE_ERROR32==(hFile=OpenFile32(name,&ofs,OF_READ))) {
#ifndef WINELIB
/* Now try the built-in even if disabled */
if ((hModule = BUILTIN_LoadModule( name, TRUE ))) {
fprintf( stderr, "Warning: could not load Windows DLL '%s', using built-in module.\n", name );
return hModule;
}
#endif
return 1;
}
if ((hModule = MODULE_CreateDummyModule( &ofs )) < 32) {
@ -749,8 +689,8 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
}
pModule = (NE_MODULE *)GlobalLock16( hModule );
pModule->flags = NE_FFLAGS_WIN32;
pModule->pe_module = PE_LoadImage( FILE_GetUnixHandle(hFile) );
_lclose32(hFile);
pModule->pe_module = PE_LoadImage( hFile );
CloseHandle( hFile );
if (!pModule->pe_module)
return 21;
}
@ -774,8 +714,8 @@ HINSTANCE16 PE_LoadModule( HFILE32 hFile, OFSTRUCT *ofs, LOADPARAMS* params )
pModule = (NE_MODULE *)GlobalLock16( hModule );
pModule->flags = NE_FFLAGS_WIN32;
pModule->pe_module = PE_LoadImage( FILE_GetUnixHandle(hFile) );
_lclose32(hFile);
pModule->pe_module = PE_LoadImage( hFile );
CloseHandle( hFile );
if (!pModule->pe_module)
return 21;
@ -810,13 +750,6 @@ static void PE_InitDLL(PE_MODREF *pem, DWORD type,LPVOID lpReserved)
if (type==DLL_PROCESS_ATTACH)
pem->flags |= PE_MODREF_PROCESS_ATTACHED;
#ifndef WINELIB
if (Options.debug) {
DBG_ADDR addr = { NULL, 0, RVA(pe->pe_header->OptionalHeader.AddressOfEntryPoint) };
DEBUG_AddBreakpoint( &addr );
DEBUG_SetBreakpoints(TRUE);
}
#endif
/* DLL_ATTACH_PROCESS:
* lpreserved is NULL for dynamic loads, not-NULL for static loads

View File

@ -698,7 +698,7 @@ INT32 LoadMessage32W( HINSTANCE32 instance, UINT32 id, WORD lang,
return retval;
}
#ifndef WINELIB
/**********************************************************************
* SetResourceHandler (KERNEL.43)
*/
@ -723,6 +723,7 @@ FARPROC16 WINAPI SetResourceHandler( HMODULE16 hModule, SEGPTR s,
return NULL;
}
/**********************************************************************
* EnumResourceTypesA (KERNEL32.90)
*/
@ -776,4 +777,3 @@ BOOL32 WINAPI EnumResourceLanguages32W( HMODULE32 hmodule, LPCWSTR type,
{
return PE_EnumResourceLanguages32W(hmodule,type,name,lpfun,lParam);
}
#endif /* WINELIB */

View File

@ -11,6 +11,7 @@
#include "windows.h"
#include "user.h"
#include "callback.h"
#include "drive.h"
#include "file.h"
#include "global.h"
#include "instance.h"
@ -18,7 +19,6 @@
#include "miscemu.h"
#include "module.h"
#include "neexe.h"
#include "options.h"
#include "peexe.h"
#include "pe_image.h"
#include "process.h"
@ -33,10 +33,6 @@
#include "debug.h"
#include "dde_proc.h"
#ifndef WINELIB
#include "debugger.h"
#endif
/* Min. number of thunks allocated when creating a new segment */
#define MIN_THUNKS 32
@ -57,15 +53,6 @@ static HTASK16 hLockedTask = 0;
static UINT16 nTaskCount = 0;
static HGLOBAL16 hDOSEnvironment = 0;
/* TASK_Reschedule() 16-bit entry point */
static FARPROC16 TASK_RescheduleProc;
#ifdef WINELIB
#define TASK_SCHEDULE() TASK_Reschedule()
#else
#define TASK_SCHEDULE() CallTo16_word_(TASK_RescheduleProc)
#endif
static HGLOBAL16 TASK_CreateDOSEnvironment(void);
static void TASK_YieldToSystem(TDB*);
@ -75,12 +62,10 @@ static THDB TASK_SystemTHDB;
*/
BOOL32 TASK_Init(void)
{
TASK_RescheduleProc = MODULE_GetWndProcEntry16( "TASK_Reschedule" );
if (!(hDOSEnvironment = TASK_CreateDOSEnvironment()))
fprintf( stderr, "Not enough memory for DOS Environment\n" );
TASK_SystemTHDB.teb_sel = SELECTOR_AllocBlock( &TASK_SystemTHDB, 0x1000, SEGMENT_DATA, TRUE, FALSE );
#ifndef WINELIB
#ifdef __i386__
__asm__ __volatile__("movw %w0,%%fs"::"r"(TASK_SystemTHDB.teb_sel));
#endif
return (hDOSEnvironment != 0);
@ -369,8 +354,9 @@ static void TASK_CallToStart(void)
InitTask( NULL );
InitApp( pTask->hModule );
#ifdef __i386__
__asm__ __volatile__("movw %w0,%%fs"::"r" (pCurrentThread->teb_sel));
#endif
PE_InitializeDLLs( pCurrentProcess, DLL_PROCESS_ATTACH, (LPVOID)-1 );
dprintf_relay( stddeb, "CallTo32(entryproc=%p)\n", entry );
exit_code = entry();
@ -406,7 +392,7 @@ static void TASK_CallToStart(void)
SELECTOROF(IF1632_Saved16_ss_sp),
OFFSETOF(IF1632_Saved16_ss_sp) );
CallTo16_regs_( &context, 0 );
Callbacks->CallRegisterProc( &context, 0 );
/* This should never return */
fprintf( stderr, "TASK_CallToStart: Main program returned!\n" );
TASK_KillCurrentTask( 1 );
@ -429,11 +415,10 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
NE_MODULE *pModule;
SEGTABLEENTRY *pSegTable;
LPSTR name;
char filename[256];
char *stack32Top;
STACK16FRAME *frame16;
STACK32FRAME *frame32;
#ifndef WINELIB32
#ifndef WINELIB
extern DWORD CALLTO16_RetAddr_regs;
extern void CALLTO16_Restore();
#endif
@ -465,13 +450,7 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
memcpy( GlobalLock16( hEnvironment ), GlobalLock16( hParentEnv ),
GlobalSize16( hParentEnv ) );
/* Get current directory */
GetModuleFileName16( hModule, filename, sizeof(filename) );
name = strrchr(filename, '\\');
if (name) *(name+1) = 0;
/* Fill the task structure */
/* Fill the task structure */
pTask->nEvents = 1; /* So the task can be started */
pTask->hSelf = hTask;
@ -485,10 +464,12 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
pTask->hPrevInstance = hPrevInstance;
pTask->hModule = hModule;
pTask->hParent = hCurrentTask;
pTask->curdrive = filename[0] - 'A' + 0x80;
strcpy( pTask->curdir, filename+2 );
pTask->magic = TDB_MAGIC;
pTask->nCmdShow = cmdShow;
pTask->curdrive = DRIVE_GetCurrentDrive() | 0x80;
strcpy( pTask->curdir, "\\" );
lstrcpyn32A( pTask->curdir + 1, DRIVE_GetDosCwd( DRIVE_GetCurrentDrive() ),
sizeof(pTask->curdir) - 1 );
/* Create the thunks block */
@ -546,6 +527,7 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
/* Create the Win32 part of the task */
pCurrentProcess = pdb32 = PROCESS_Create( pTask, cmdLine );
/* FIXME: check for pdb32 == NULL. */
pdb32->task = hTask;
if (pModule->flags & NE_FFLAGS_WIN32)
{
@ -565,6 +547,8 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
else
pTask->thdb = THREAD_Create( pdb32, 0, NULL );
/* FIXME: check for pTask->thdb == NULL. */
/* Create the 32-bit stack frame */
stack32Top = (char*)pTask->thdb->teb.stack_top;
@ -592,10 +576,10 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
frame16->ebp = 0;
frame16->ds = frame16->es = pTask->hInstance;
frame16->entry_point = 0;
frame16->entry_ip = OFFSETOF(TASK_RescheduleProc) + 14;
frame16->entry_cs = SELECTOROF(TASK_RescheduleProc);
frame16->entry_ip = 0;
frame16->entry_cs = 0;
frame16->bp = 0;
*(DWORD *)(frame16 + 1) = frame32; /* Store the 32-bit stack pointer */
*(STACK32FRAME **)(frame16 + 1) = frame32; /* Store the 32-bit %esp */
#ifndef WINELIB
frame16->ip = LOWORD( CALLTO16_RetAddr_regs );
frame16->cs = HIWORD( CALLTO16_RetAddr_regs );
@ -607,30 +591,6 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
if (!IF1632_Saved16_ss_sp) IF1632_Saved16_ss_sp = pTask->ss_sp;
/* Add a breakpoint at the start of the task */
#ifndef WINELIB
if (Options.debug)
{
if (pModule->flags & NE_FFLAGS_WIN32)
{
/*
DBG_ADDR addr = { NULL, 0, pCurrentProcess->exe_modref->load_addr +
pCurrentProcess->exe_modref->pe_module->pe_header->OptionalHeader.AddressOfEntryPoint };
fprintf( stderr, "Win32 task '%s': ", name );
DEBUG_AddBreakpoint( &addr );
*/
}
else
{
DBG_ADDR addr = { NULL, pSegTable[pModule->cs-1].selector,
pModule->ip };
fprintf( stderr, "Win16 task '%s': ", name );
DEBUG_AddBreakpoint( &addr );
}
}
#endif /* WINELIB */
/* Add the task to the linked list */
TASK_LinkTask( hTask );
@ -847,7 +807,7 @@ void TASK_YieldToSystem(TDB* pTask)
{
MESSAGEQUEUE* pQ;
TASK_SCHEDULE();
Callbacks->CallTaskRescheduleProc();
if( pTask )
{
@ -884,10 +844,8 @@ void WINAPI InitTask( CONTEXT *context )
pTask->userhandler = (USERSIGNALPROC)&USER_SignalProc;
#ifndef WINELIB
/* Initialize implicitly loaded DLLs */
NE_InitializeDLLs( pTask->hModule );
#endif
if (context)
{
@ -922,9 +880,7 @@ void WINAPI InitTask( CONTEXT *context )
pinstance = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN(CURRENT_DS, 0);
pinstance->stackbottom = stackhi; /* yup, that's right. Confused me too. */
pinstance->stacktop = stacklow;
#ifndef WINELIB
pinstance->stackmin = OFFSETOF(IF1632_Saved16_ss_sp);
#endif
}

View File

@ -1259,7 +1259,7 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpmem )
lpmem->dwTotalVirtual = lpmem->dwTotalPhys+lpmem->dwTotalPageFile;
lpmem->dwAvailVirtual = lpmem->dwAvailPhys+lpmem->dwAvailPageFile;
lpmem->dwMemoryLoad = (lpmem->dwTotalVirtual-lpmem->dwAvailVirtual)
* 100 / lpmem->dwTotalVirtual;
/ (lpmem->dwTotalVirtual / 100);
return;
}
}

View File

@ -161,7 +161,6 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
#ifdef __i386__
#ifdef linux
if (!__winelib)
{
struct modify_ldt_s ldt_info;
@ -205,7 +204,6 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
#endif /* linux */
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
if (!__winelib)
{
long d[2];
@ -222,7 +220,6 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
#endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
#if defined(__svr4__) || defined(_SCO_DS)
if (!__winelib)
{
struct ssd ldt_mod;
int i;

View File

@ -27,6 +27,10 @@
#include "stddebug.h"
#include "debug.h"
/* needed only for GDI_HeapSel and USER_HeapSel */
#include "gdi.h"
#include "user.h"
typedef struct
{
/* Arena header */
@ -327,7 +331,7 @@ BOOL16 WINAPI LocalInit( HANDLE16 selector, WORD start, WORD end )
if (LOCAL_GetHeap(selector))
{
fprintf( stderr, "LocalInit: Heap %04x initialized twice.\n", selector);
if (debugging_local) LOCAL_PrintHeap(selector);
LOCAL_PrintHeap(selector);
}
}
@ -781,7 +785,7 @@ static HLOCAL16 LOCAL_FindFreeBlock( HANDLE16 ds, WORD size )
if (pArena->size >= size) return arena;
}
dprintf_local( stddeb, "Local_FindFreeBlock: not enough space\n" );
if (debugging_local) LOCAL_PrintHeap(ds);
LOCAL_PrintHeap(ds);
return 0;
}
@ -822,8 +826,19 @@ static HLOCAL16 LOCAL_GetBlock( HANDLE16 ds, WORD size, WORD flags )
arena = LOCAL_FindFreeBlock( ds, size );
}
if (arena == 0) {
fprintf( stderr, "Local_GetBlock: not enough space in heap %04x for %d bytes\n",
ds, size );
if (ds == GDI_HeapSel) {
fprintf( stderr,
"Local_GetBlock: not enough space in GDI local heap (%04x) for %d bytes\n",
ds, size );
} else if (ds == USER_HeapSel) {
fprintf( stderr,
"Local_GetBlock: not enough space in USER local heap (%04x) for %d bytes\n",
ds, size );
} else {
dprintf_local( stddeb,
"Local_GetBlock: not enough space in local heap %04x for %d bytes\n",
ds, size );
}
return 0;
}

View File

@ -568,7 +568,6 @@ x_SMapLS_IP_EBP_x(CONTEXT *context,int argoff) {
ptr = MapLS((LPVOID)val);
*(DWORD*)(EBP_reg(context)+argoff) = ptr;
}
fprintf(stderr,"[EBP+%d] %08lx => %08lx\n",argoff,val,ptr);
EAX_reg(context) = ptr;
}
@ -655,4 +654,3 @@ void WINAPI WOWGetVDMPointerUnfix(DWORD vp)
fprintf(stdnimp,"WOWGetVDMPointerUnfix(%08lx), STUB\n",vp);
/* FIXME: unfix heapsegment */
}

View File

@ -230,7 +230,7 @@ static FILE_VIEW *VIRTUAL_CreateView( UINT32 base, UINT32 size, UINT32 offset,
*/
static void VIRTUAL_DeleteView( FILE_VIEW *view )
{
munmap( (void *)view->base, view->size );
FILE_munmap( (void *)view->base, 0, view->size );
if (view->next) view->next->prev = view->prev;
if (view->prev) view->prev->next = view->next;
else VIRTUAL_FirstView = view->next;
@ -468,8 +468,8 @@ LPVOID WINAPI VirtualAlloc( LPVOID addr, DWORD size, DWORD type, DWORD protect)
if ((type & MEM_RESERVE) || !base)
{
view_size = size + (base ? 0 : granularity_mask + 1);
ptr = (UINT32)FILE_mmap( NULL, (LPVOID)base, 0, view_size, 0, 0,
VIRTUAL_GetUnixProt( vprot ), MAP_PRIVATE );
ptr = (UINT32)FILE_dommap( NULL, (LPVOID)base, 0, view_size, 0, 0,
VIRTUAL_GetUnixProt( vprot ), MAP_PRIVATE );
if (ptr == (UINT32)-1)
{
SetLastError( ERROR_OUTOFMEMORY );
@ -483,16 +483,16 @@ LPVOID WINAPI VirtualAlloc( LPVOID addr, DWORD size, DWORD type, DWORD protect)
if (ptr & granularity_mask)
{
UINT32 extra = granularity_mask + 1 - (ptr & granularity_mask);
munmap( (void *)ptr, extra );
FILE_munmap( (void *)ptr, 0, extra );
ptr += extra;
view_size -= extra;
}
if (view_size > size)
munmap( (void *)(ptr + size), view_size - size );
FILE_munmap( (void *)(ptr + size), 0, view_size - size );
}
if (!(view = VIRTUAL_CreateView( ptr, size, 0, 0, vprot, NULL )))
{
munmap( (void *)ptr, size );
FILE_munmap( (void *)ptr, 0, size );
SetLastError( ERROR_OUTOFMEMORY );
return NULL;
}
@ -1056,9 +1056,9 @@ LPVOID WINAPI MapViewOfFileEx(HANDLE32 handle, DWORD access, DWORD offset_high,
dprintf_virtual( stddeb, "MapViewOfFile: handle=%x size=%x offset=%lx\n",
handle, size, offset_low );
ptr = (UINT32)FILE_mmap( mapping->file, addr, 0, size, 0, offset_low,
VIRTUAL_GetUnixProt( mapping->protect ),
flags );
ptr = (UINT32)FILE_dommap( mapping->file, addr, 0, size, 0, offset_low,
VIRTUAL_GetUnixProt( mapping->protect ),
flags );
if (ptr == (UINT32)-1)
{
SetLastError( ERROR_OUTOFMEMORY );
@ -1074,7 +1074,7 @@ LPVOID WINAPI MapViewOfFileEx(HANDLE32 handle, DWORD access, DWORD offset_high,
return (LPVOID)ptr;
error:
if (ptr != (UINT32)-1) munmap( (void *)ptr, size );
if (ptr != (UINT32)-1) FILE_munmap( (void *)ptr, 0, size );
K32OBJ_DecCount( &mapping->header );
return NULL;
}

View File

@ -6,6 +6,8 @@ VPATH = @srcdir@
MODULE = misc
C_SRCS = \
aspi.c \
callback.c \
comm.c \
commdlg.c \
compobj.c \

432
misc/aspi.c Normal file
View File

@ -0,0 +1,432 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <ldt.h>
#include <memory.h>
#include <unistd.h>
#include <callback.h>
#include "windows.h"
#include "aspi.h"
#include "options.h"
#include "heap.h"
#include "debug.h"
#include "stddebug.h"
/* FIXME!
* 1) Residual byte length reporting not handled
* 2) Make this code re-entrant for multithreading
* 3) Only linux supported so far
*/
#ifdef linux
/* This is a duplicate of the sg_header from /usr/src/linux/include/scsi/sg.h
* kernel 2.0.30
* This will probably break at some point, but for those who don't have
* kernels installed, I think this should still work.
*
*/
struct sg_header
{
int pack_len; /* length of incoming packet <4096 (including header) */
int reply_len; /* maximum length <4096 of expected reply */
int pack_id; /* id number of packet */
int result; /* 0==ok, otherwise refer to errno codes */
unsigned int twelve_byte:1; /* Force 12 byte command length for group 6 & 7 commands */
unsigned int other_flags:31; /* for future use */
unsigned char sense_buffer[16]; /* used only by reads */
/* command follows then data for command */
};
#define SCSI_OFF sizeof(struct sg_header)
#endif
#define ASPI_POSTING(prb) (prb->SRB_Flags & 0x1)
#define HOST_TO_TARGET(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x2)
#define TARGET_TO_HOST(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x1)
#define NO_DATA_TRANSFERED(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x3)
#define SRB_ENABLE_RESIDUAL_COUNT 0x4
#define INQUIRY_VENDOR 8
#define MUSTEK_SCSI_AREA_AND_WINDOWS 0x04
#define MUSTEK_SCSI_READ_SCANNED_DATA 0x08
#define MUSTEK_SCSI_GET_IMAGE_STATUS 0x0f
#define MUSTEK_SCSI_ADF_AND_BACKTRACE 0x10
#define MUSTEK_SCSI_CCD_DISTANCE 0x11
#define MUSTEK_SCSI_START_STOP 0x1b
#define CMD_TEST_UNIT_READY 0x00
#define CMD_REQUEST_SENSE 0x03
#define CMD_INQUIRY 0x12
/* scanner commands - just for debug */
#define CMD_SCAN_GET_DATA_BUFFER_STATUS 0x34
#define CMD_SCAN_GET_WINDOW 0x25
#define CMD_SCAN_OBJECT_POSITION 0x31
#define CMD_SCAN_READ 0x28
#define CMD_SCAN_RELEASE_UNIT 0x17
#define CMD_SCAN_RESERVE_UNIT 0x16
#define CMD_SCAN_SCAN 0x1b
#define CMD_SCAN_SEND 0x2a
#define CMD_SCAN_CHANGE_DEFINITION 0x40
#define INQURIY_CMDLEN 6
#define INQURIY_REPLY_LEN 96
#define INQUIRY_VENDOR 8
#define SENSE_BUFFER(prb) (&prb->CDBByte[prb->SRB_CDBLen])
/* Just a container for seeing what devices are open */
struct ASPI_DEVICE_INFO {
struct ASPI_DEVICE_INFO * next;
int fd;
int hostId;
int target;
int lun;
};
typedef struct ASPI_DEVICE_INFO ASPI_DEVICE_INFO;
static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
#ifdef linux
static int
ASPI_OpenDevice16(SRB_ExecSCSICmd16 *prb)
{
int fd;
char idstr[20];
char device_str[50];
ASPI_DEVICE_INFO *curr;
/* search list of devices to see if we've opened it already.
* There is not an explicit open/close in ASPI land, so hopefully
* keeping a device open won't be a problem.
*/
for (curr = ASPI_open_devices; curr; curr = curr->next) {
if (curr->hostId == prb->SRB_HaId &&
curr->target == prb->SRB_Target &&
curr->lun == prb->SRB_Lun) {
return curr->fd;
}
}
/* device wasn't cached, go ahead and open it */
sprintf(idstr, "scsi c%1dt%1dd%1d", prb->SRB_HaId, prb->SRB_Target, prb->SRB_Lun);
if (!PROFILE_GetWineIniString(idstr, "Device", "", device_str, sizeof(device_str))) {
dprintf_aspi(stddeb, "Trying to open unlisted scsi device %s\n", idstr);
return -1;
}
dprintf_aspi(stddeb, "Opening device %s=%s\n", idstr, device_str);
fd = open(device_str, O_RDWR);
if (fd == -1) {
int save_error = errno;
dprintf_aspi(stddeb, "Error opening device errno=%d\n", save_error);
return -1;
}
/* device is now open */
curr = HeapAlloc( SystemHeap, 0, sizeof(ASPI_DEVICE_INFO) );
curr->fd = fd;
curr->hostId = prb->SRB_HaId;
curr->target = prb->SRB_Target;
curr->lun = prb->SRB_Lun;
/* insert new record at beginning of open device list */
curr->next = ASPI_open_devices;
ASPI_open_devices = curr;
return fd;
}
static void
ASPI_DebugPrintCmd16(SRB_ExecSCSICmd16 *prb)
{
BYTE cmd;
int i;
BYTE *cdb;
BYTE *lpBuf;
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
switch (prb->CDBByte[0]) {
case CMD_INQUIRY:
dprintf_aspi(stddeb, "{\n");
dprintf_aspi(stddeb, "\tEVPD: %d\n", prb->CDBByte[1] & 1);
dprintf_aspi(stddeb, "\tLUN: %d\n", (prb->CDBByte[1] & 0xc) >> 1);
dprintf_aspi(stddeb, "\tPAGE CODE: %d\n", prb->CDBByte[2]);
dprintf_aspi(stddeb, "\tALLOCATION LENGTH: %d\n", prb->CDBByte[4]);
dprintf_aspi(stddeb, "\tCONTROL: %d\n", prb->CDBByte[5]);
dprintf_aspi(stddeb, "}\n");
break;
case CMD_SCAN_SCAN:
dprintf_aspi(stddeb, "Transfer Length: %d\n", prb->CDBByte[4]);
break;
}
dprintf_aspi(stddeb, "Host Adapter: %d\n", prb->SRB_HaId);
dprintf_aspi(stddeb, "Flags: %d\n", prb->SRB_Flags);
if (TARGET_TO_HOST(prb)) {
dprintf_aspi(stddeb, "\tData transfer: Target to host. Length checked.\n");
}
else if (HOST_TO_TARGET(prb)) {
dprintf_aspi(stddeb, "\tData transfer: Host to target. Length checked.\n");
}
else if (NO_DATA_TRANSFERED(prb)) {
dprintf_aspi(stddeb, "\tData transfer: none\n");
}
else {
dprintf_aspi(stddeb, "\tTransfer by scsi cmd. Length not checked\n");
}
dprintf_aspi(stddeb, "\tResidual byte length reporting %s\n", prb->SRB_Flags & 0x4 ? "enabled" : "disabled");
dprintf_aspi(stddeb, "\tLinking %s\n", prb->SRB_Flags & 0x2 ? "enabled" : "disabled");
dprintf_aspi(stddeb, "\tPosting %s\n", prb->SRB_Flags & 0x1 ? "enabled" : "disabled");
dprintf_aspi(stddeb, "Target: %d\n", prb->SRB_Target);
dprintf_aspi(stddeb, "Lun: %d\n", prb->SRB_Lun);
dprintf_aspi(stddeb, "BufLen: %ld\n", prb->SRB_BufLen);
dprintf_aspi(stddeb, "SenseLen: %d\n", prb->SRB_SenseLen);
dprintf_aspi(stddeb, "BufPtr: %lx (%p)\n", prb->SRB_BufPointer, lpBuf);
dprintf_aspi(stddeb, "LinkPointer %lx\n", prb->SRB_Rsvd1);
dprintf_aspi(stddeb, "CDB Length: %d\n", prb->SRB_CDBLen);
dprintf_aspi(stddeb, "POST Proc: %lx\n", (DWORD) prb->SRB_PostProc);
cdb = &prb->CDBByte[0];
dprintf_aspi(stddeb, "CDB buffer[");
cmd = prb->CDBByte[0];
for (i = 0; i < prb->SRB_CDBLen; i++) {
if (i != 0)
dprintf_aspi(stddeb, ",");
dprintf_aspi(stddeb, "%02x", *cdb++);
}
dprintf_aspi(stddeb, "]\n");
}
static void
PrintSenseArea16(SRB_ExecSCSICmd16 *prb)
{
int i;
BYTE *cdb;
cdb = &prb->CDBByte[0];
dprintf_aspi(stddeb, "SenseArea[");
for (i = 0; i < prb->SRB_SenseLen; i++) {
if (i)
dprintf_aspi(stddeb, ",");
dprintf_aspi(stddeb, "%02x", *cdb++);
}
dprintf_aspi(stddeb, "]\n");
}
static void
ASPI_DebugPrintResult16(SRB_ExecSCSICmd16 *prb)
{
BYTE *lpBuf;
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
switch (prb->CDBByte[0]) {
case CMD_INQUIRY:
dprintf_aspi(stddeb, "Vendor: %s\n", lpBuf + INQUIRY_VENDOR);
break;
case CMD_TEST_UNIT_READY:
PrintSenseArea16(prb);
break;
}
}
static WORD
ASPI_ExecScsiCmd16(SRB_ExecSCSICmd16 *prb, SEGPTR segptr_prb)
{
struct sg_header *sg_hd, *sg_reply_hdr;
int status;
BYTE *lpBuf;
int in_len, out_len;
int error_code = 0;
int fd;
ASPI_DebugPrintCmd16(prb);
fd = ASPI_OpenDevice16(prb);
if (fd == -1) {
prb->SRB_Status = SS_ERR;
return SS_ERR;
}
sg_hd = NULL;
sg_reply_hdr = NULL;
prb->SRB_Status = SS_PENDING;
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
if (!prb->SRB_CDBLen) {
prb->SRB_Status = SS_ERR;
return SS_ERR;
}
/* build up sg_header + scsi cmd */
if (HOST_TO_TARGET(prb)) {
/* send header, command, and then data */
in_len = SCSI_OFF + prb->SRB_CDBLen + prb->SRB_BufLen;
sg_hd = (struct sg_header *) malloc(in_len);
memset(sg_hd, 0, SCSI_OFF);
memcpy(sg_hd + 1, &prb->CDBByte[0], prb->SRB_CDBLen);
if (prb->SRB_BufLen) {
memcpy(((BYTE *) sg_hd) + SCSI_OFF + prb->SRB_CDBLen, lpBuf, prb->SRB_BufLen);
}
}
else {
/* send header and command - no data */
in_len = SCSI_OFF + prb->SRB_CDBLen;
sg_hd = (struct sg_header *) malloc(in_len);
memset(sg_hd, 0, SCSI_OFF);
memcpy(sg_hd + 1, &prb->CDBByte[0], prb->SRB_CDBLen);
}
if (TARGET_TO_HOST(prb)) {
out_len = SCSI_OFF + prb->SRB_BufLen;
sg_reply_hdr = (struct sg_header *) malloc(out_len);
memset(sg_reply_hdr, 0, SCSI_OFF);
sg_hd->reply_len = out_len;
}
else {
out_len = SCSI_OFF;
sg_reply_hdr = (struct sg_header *) malloc(out_len);
memset(sg_reply_hdr, 0, SCSI_OFF);
sg_hd->reply_len = out_len;
}
status = write(fd, sg_hd, in_len);
if (status < 0 || status != in_len) {
int myerror = errno;
fprintf(stderr, "not enough bytes written to scsi device bytes=%d .. %d\n", in_len, status);
if (status < 0) {
if (myerror == ENOMEM) {
fprintf(stderr, "ASPI: Linux generic scsi driver\n You probably need to re-compile your kernel with a larger SG_BIG_BUFF value (sg.h)\n Suggest 130560\n");
}
dprintf_aspi(stddeb, "errno: = %d\n", myerror);
}
goto error_exit;
}
status = read(fd, sg_reply_hdr, out_len);
if (status < 0 || status != out_len) {
dprintf_aspi(stddeb, "not enough bytes read from scsi device%d\n", status);
goto error_exit;
}
if (sg_reply_hdr->result != 0) {
error_code = sg_reply_hdr->result;
dprintf_aspi(stddeb, "reply header error (%d)\n", sg_reply_hdr->result);
goto error_exit;
}
if (TARGET_TO_HOST(prb) && prb->SRB_BufLen) {
memcpy(lpBuf, sg_reply_hdr + 1, prb->SRB_BufLen);
}
/* copy in sense buffer to amount that is available in client */
if (prb->SRB_SenseLen) {
int sense_len = prb->SRB_SenseLen;
if (prb->SRB_SenseLen > 16)
sense_len = 16;
memcpy(SENSE_BUFFER(prb), &sg_reply_hdr->sense_buffer[0], sense_len);
}
prb->SRB_Status = SS_COMP;
prb->SRB_HaStat = HASTAT_OK;
prb->SRB_TargStat = STATUS_GOOD;
/* now do posting */
if (ASPI_POSTING(prb) && prb->SRB_PostProc) {
dprintf_aspi(stddeb, "ASPI: Post Routine (%lx) called\n", (DWORD) prb->SRB_PostProc);
Callbacks->CallASPIPostProc(prb->SRB_PostProc, segptr_prb);
}
free(sg_reply_hdr);
free(sg_hd);
ASPI_DebugPrintResult16(prb);
return SS_COMP;
error_exit:
if (error_code == EBUSY) {
prb->SRB_Status = SS_ASPI_IS_BUSY;
dprintf_aspi(stddeb, "ASPI: Device busy\n");
}
else {
dprintf_aspi(stddeb, "ASPI_GenericHandleScsiCmd failed\n");
prb->SRB_Status = SS_ERR;
}
/* I'm not sure exactly error codes work here
* We probably should set prb->SRB_TargStat, SRB_HaStat ?
*/
dprintf_aspi(stddeb, "ASPI_GenericHandleScsiCmd: error_exit\n");
free(sg_reply_hdr);
free(sg_hd);
return prb->SRB_Status;
}
#endif
/***********************************************************************
* GetASPISupportInfo16 (WINASPI.1)
*/
WORD
GetASPISupportInfo16()
{
#ifdef linux
dprintf_aspi(stddeb, "GETASPISupportInfo\n");
/* high byte SS_COMP - low byte number of host adapters.
* FIXME!!! The number of host adapters is incorrect.
* I'm not sure how to determine this under linux etc.
*/
return ((SS_COMP << 8) | 0x1);
#else
return ((SS_COMP << 8) | 0x0);
#endif
}
/***********************************************************************
* SendASPICommand16 (WINASPI.2)
*/
WORD
SendASPICommand16(SEGPTR segptr_srb)
{
#ifdef linux
LPSRB16 lpSRB = PTR_SEG_TO_LIN(segptr_srb);
switch (lpSRB->common.SRB_cmd) {
case SC_HA_INQUIRY:
dprintf_aspi(stddeb, "ASPI: Not implemented SC_HA_INQUIRY\n");
break;
case SC_GET_DEV_TYPE:
dprintf_aspi(stddeb, "ASPI: Not implemented SC_GET_DEV_TYPE\n");
break;
case SC_EXEC_SCSI_CMD:
return ASPI_ExecScsiCmd16(&lpSRB->cmd, segptr_srb);
break;
case SC_RESET_DEV:
dprintf_aspi(stddeb, "ASPI: Not implemented SC_RESET_DEV\n");
break;
default:
dprintf_aspi(stddeb, "ASPI: Unknown command %d\n", lpSRB->common.SRB_cmd);
}
return SS_INVALID_SRB;
#else
return SS_INVALID_SRB;
#endif
}

156
misc/callback.c Normal file
View File

@ -0,0 +1,156 @@
/*
* Function callbacks for the library
*
* Copyright 1997 Alexandre Julliard
*/
#include <assert.h>
#include <stdio.h>
#include "callback.h"
extern void TASK_Reschedule(void); /* loader/task.c */
/**********************************************************************
* CALLBACK_CallWndProc
*/
static LRESULT WINAPI CALLBACK_CallWndProc( WNDPROC16 proc, HWND16 hwnd,
UINT16 msg, WPARAM16 wParam,
LPARAM lParam )
{
return proc( hwnd, msg, wParam, lParam );
}
/**********************************************************************
* CALLBACK_CallRegisterProc
*/
static VOID WINAPI CALLBACK_CallRegisterProc( CONTEXT *context, INT32 offset)
{
fprintf( stderr, "Cannot call a register proc in Winelib\n" );
assert( FALSE );
}
/**********************************************************************
* CALLBACK_CallDriverProc
*/
static LRESULT WINAPI CALLBACK_CallDriverProc( DRIVERPROC16 proc, DWORD dwId,
HDRVR16 hdrvr, UINT16 msg,
LPARAM lp1, LPARAM lp2 )
{
return proc( dwId, hdrvr, msg, lp1, lp2 );
}
/**********************************************************************
* CALLBACK_CallDriverCallback
*/
static LRESULT WINAPI CALLBACK_CallDriverCallback( FARPROC16 proc,
HANDLE16 hDev, UINT16 msg,
DWORD dwUser, LPARAM lp1,
LPARAM lp2 )
{
return proc( hDev, msg, dwUser, lp1, lp2 );
}
/**********************************************************************
* CALLBACK_CallTimeFuncProc
*/
static LRESULT WINAPI CALLBACK_CallTimeFuncProc( FARPROC16 proc, WORD id,
UINT16 msg, DWORD dwUser,
LPARAM lp1, LPARAM lp2 )
{
return proc( id, msg, dwUser, lp1, lp2 );
}
/**********************************************************************
* CALLBACK_CallWindowsExitProc
*/
static INT16 WINAPI CALLBACK_CallWindowsExitProc( FARPROC16 proc, INT16 type)
{
return proc( type );
}
/**********************************************************************
* CALLBACK_CallWordBreakProc
*/
static INT16 WINAPI CALLBACK_CallWordBreakProc( EDITWORDBREAKPROC16 proc,
SEGPTR text, INT16 word,
INT16 len, INT16 action )
{
return proc( (LPSTR)text, word, len, action );
}
/**********************************************************************
* CALLBACK_CallBootAppProc
*/
static void WINAPI CALLBACK_CallBootAppProc( FARPROC16 proc, HANDLE16 module,
HFILE16 file )
{
proc( module, file );
}
/**********************************************************************
* CALLBACK_CallLoadAppSegProc
*/
static WORD WINAPI CALLBACK_CallLoadAppSegProc( FARPROC16 proc,
HANDLE16 module, HFILE16 file,
WORD seg )
{
return proc( module, file, seg );
}
/**********************************************************************
* CALLBACK_CallSystemTimerProc
*/
static void WINAPI CALLBACK_CallSystemTimerProc( FARPROC16 proc )
{
proc();
}
/**********************************************************************
* CALLBACK_CallASPIPostProc
*/
static LRESULT WINAPI CALLBACK_CallASPIPostProc( FARPROC16 proc, SEGPTR ptr )
{
return proc( ptr );
}
/**********************************************************************
* CALLBACK_WinelibTable
*
* The callbacks function table for Winelib
*/
static const CALLBACKS_TABLE CALLBACK_WinelibTable =
{
CALLBACK_CallRegisterProc, /* CallRegisterProc */
TASK_Reschedule, /* CallTaskRescheduleProc */
CALLBACK_CallWndProc, /* CallWndProc */
CALLBACK_CallDriverProc, /* CallDriverProc */
CALLBACK_CallDriverCallback, /* CallDriverCallback */
CALLBACK_CallTimeFuncProc, /* CallTimeFuncProc */
CALLBACK_CallWindowsExitProc, /* CallWindowsExitProc */
CALLBACK_CallWordBreakProc, /* CallWordBreakProc */
CALLBACK_CallBootAppProc, /* CallBootAppProc */
CALLBACK_CallLoadAppSegProc, /* CallLoadAppSegProc */
CALLBACK_CallSystemTimerProc, /* CallSystemTimerProc */
CALLBACK_CallASPIPostProc, /* CallASPIPostProc */
/* The graphics driver callbacks are never used in Winelib */
NULL, /* CallDrvControlProc */
NULL, /* CallDrvEnableProc */
NULL, /* CallDrvEnumDFontsProc */
NULL, /* CallDrvEnumObjProc */
NULL, /* CallDrvOutputProc */
NULL, /* CallDrvRealizeProc */
NULL, /* CallDrvStretchBltProc */
NULL /* CallDrvExtTextOutProc */
};
const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable;

View File

@ -928,7 +928,7 @@ INT16 WINAPI SetCommState16(LPDCB16 lpdcb)
struct DosDeviceStruct *ptr;
dprintf_comm(stddeb,
"SetCommState: fd %d, ptr %p\n", lpdcb->Id, lpdcb);
"SetCommState16: fd %d, ptr %p\n", lpdcb->Id, lpdcb);
if (tcgetattr(lpdcb->Id, &port) == -1) {
commerror = WinError();
return -1;
@ -998,6 +998,12 @@ INT16 WINAPI SetCommState16(LPDCB16 lpdcb)
case CBR_38400:
port.c_cflag |= B38400;
break;
case 57600:
port.c_cflag |= B57600;
break;
case 57601:
port.c_cflag |= B115200;
break;
default:
commerror = IE_BAUDRATE;
return -1;
@ -1088,6 +1094,7 @@ INT16 WINAPI SetCommState16(LPDCB16 lpdcb)
dprintf_comm(stddeb,"SetCommState: stopbits %d\n",lpdcb->StopBits);
switch (lpdcb->StopBits) {
case ONESTOPBIT:
port.c_cflag &= ~CSTOPB;
@ -1118,7 +1125,7 @@ INT16 WINAPI SetCommState16(LPDCB16 lpdcb)
if (tcsetattr(lpdcb->Id, TCSADRAIN, &port) == -1) {
commerror = WinError();
return -1;
return FALSE;
} else {
commerror = 0;
return 0;
@ -1133,7 +1140,7 @@ BOOL32 WINAPI SetCommState32(INT32 fd,LPDCB32 lpdcb)
struct termios port;
struct DosDeviceStruct *ptr;
dprintf_comm(stddeb,"SetCommState: fd %d, ptr %p\n",fd,lpdcb);
dprintf_comm(stddeb,"SetCommState32: fd %d, ptr %p\n",fd,lpdcb);
if (tcgetattr(fd,&port) == -1) {
commerror = WinError();
return FALSE;
@ -1340,7 +1347,7 @@ INT16 WINAPI GetCommState16(INT16 fd, LPDCB16 lpdcb)
{
struct termios port;
dprintf_comm(stddeb,"GetCommState: fd %d, ptr %p\n", fd, lpdcb);
dprintf_comm(stddeb,"GetCommState16: fd %d, ptr %p\n", fd, lpdcb);
if (tcgetattr(fd, &port) == -1) {
commerror = WinError();
return -1;
@ -1379,6 +1386,12 @@ INT16 WINAPI GetCommState16(INT16 fd, LPDCB16 lpdcb)
case B38400:
lpdcb->BaudRate = 38400;
break;
case B57600:
lpdcb->BaudRate = 57600;
break;
case B115200:
lpdcb->BaudRate = 57601;
break;
}
#endif
switch (port.c_cflag & CSIZE) {
@ -1459,8 +1472,8 @@ BOOL32 WINAPI GetCommState32(INT32 fd, LPDCB32 lpdcb)
{
struct termios port;
dprintf_comm(stddeb,"GetCommState32: fd %d, ptr %p\n", fd, lpdcb);
if (GetDeviceStruct(fd) == NULL) return FALSE;
if (tcgetattr(fd, &port) == -1) {
commerror = WinError();
return FALSE;

View File

@ -28,7 +28,7 @@ VOID WINAPI GetSystemInfo(LPSYSTEM_INFO si)
/* FIXME: better values for the two entries below... */
cachedsi.lpMinimumApplicationAddress = (void *)0x40000000;
cachedsi.lpMaximumApplicationAddress = (void *)0x80000000;
cachedsi.lpMaximumApplicationAddress = (void *)0x7FFFFFFF;
cachedsi.dwActiveProcessorMask = 1;
cachedsi.dwNumberOfProcessors = 1;
cachedsi.dwProcessorType = PROCESSOR_INTEL_386;

View File

@ -24,6 +24,7 @@ Unresolved issues Uwe Bonnes 970904:
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include <ctype.h>
@ -34,7 +35,6 @@ Unresolved issues Uwe Bonnes 970904:
#include "stddebug.h"
#include "debug.h"
#include "module.h"
#include "xmalloc.h"
#include "heap.h"
#include "crtdll.h"
#include "drive.h"
@ -84,7 +84,8 @@ DWORD __cdecl CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
dprintf_crtdll(stddeb,"CRTDLL__GetMainArgs(%p,%p,%p,%ld).\n",
argc,argv,environ,flag
);
CRTDLL_acmdln_dll = cmdline = xstrdup( GetCommandLine32A() );
CRTDLL_acmdln_dll = cmdline = HEAP_strdupA( GetProcessHeap(), 0,
GetCommandLine32A() );
dprintf_crtdll(stddeb,"CRTDLL__GetMainArgs got \"%s\"\n",
cmdline);
@ -105,9 +106,11 @@ DWORD __cdecl CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
i=0;xargv=NULL;xargc=0;afterlastspace=0;
while (cmdline[i]) {
if (cmdline[i]==' ') {
xargv=(char**)xrealloc(xargv,sizeof(char*)*(++xargc));
xargv=(char**)HeapReAlloc( GetProcessHeap(), 0, xargv,
sizeof(char*)*(++xargc));
cmdline[i]='\0';
xargv[xargc-1] = xstrdup(cmdline+afterlastspace);
xargv[xargc-1] = HEAP_strdupA( GetProcessHeap(), 0,
cmdline+afterlastspace);
i++;
while (cmdline[i]==' ')
i++;
@ -116,9 +119,11 @@ DWORD __cdecl CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
} else
i++;
}
xargv=(char**)xrealloc(xargv,sizeof(char*)*(++xargc));
xargv=(char**)HeapReAlloc( GetProcessHeap(), 0, xargv,
sizeof(char*)*(++xargc));
cmdline[i]='\0';
xargv[xargc-1] = xstrdup(cmdline+afterlastspace);
xargv[xargc-1] = HEAP_strdupA( GetProcessHeap(), 0,
cmdline+afterlastspace);
CRTDLL_argc_dll = xargc;
*argc = xargc;
CRTDLL_argv_dll = xargv;
@ -126,10 +131,7 @@ DWORD __cdecl CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
dprintf_crtdll(stddeb,"CRTDLL__GetMainArgs found %d arguments\n",
CRTDLL_argc_dll);
/* FIXME ... use real environment */
*environ = xmalloc(sizeof(LPSTR));
CRTDLL_environ_dll = *environ;
(*environ)[0] = NULL;
CRTDLL_environ_dll = *environ = GetEnvironmentStrings32A();
return 0;
}
@ -919,6 +921,66 @@ INT32 __cdecl CRTDLL__unlink(LPCSTR pathname)
return ret;
}
/*********************************************************************
* rename (CRTDLL.449)
*/
INT32 __cdecl CRTDLL_rename(LPCSTR oldpath,LPCSTR newpath)
{
BOOL32 ok = MoveFileEx32A( oldpath, newpath, MOVEFILE_REPLACE_EXISTING );
return ok ? 0 : -1;
}
/*********************************************************************
* _stat (CRTDLL.280)
*/
struct win_stat
{
UINT16 win_st_dev;
UINT16 win_st_ino;
UINT16 win_st_mode;
INT16 win_st_nlink;
INT16 win_st_uid;
INT16 win_st_gid;
UINT32 win_st_rdev;
INT32 win_st_size;
INT32 win_st_atime;
INT32 win_st_mtime;
INT32 win_st_ctime;
};
int __cdecl CRTDLL__stat(const char * filename, struct win_stat * buf)
{
int ret=0;
DOS_FULL_NAME full_name;
struct stat mystat;
if (!DOSFS_GetFullName( filename, TRUE, &full_name ))
{
dprintf_crtdll(stddeb,"CRTDLL__stat filename %s bad name\n",filename);
return -1;
}
ret=stat(full_name.long_name,&mystat);
dprintf_crtdll(stddeb,"CRTDLL__stat %s%s\n",
filename, (ret)?" failed":"");
/* FIXME: should check what Windows returns */
buf->win_st_dev = mystat.st_dev;
buf->win_st_ino = mystat.st_ino;
buf->win_st_mode = mystat.st_mode;
buf->win_st_nlink = mystat.st_nlink;
buf->win_st_uid = mystat.st_uid;
buf->win_st_gid = mystat.st_gid;
buf->win_st_rdev = mystat.st_rdev;
buf->win_st_size = mystat.st_size;
buf->win_st_atime = mystat.st_atime;
buf->win_st_mtime = mystat.st_mtime;
buf->win_st_ctime = mystat.st_ctime;
return ret;
}
/*********************************************************************
* _open (CRTDLL.239)
*/
@ -1349,37 +1411,56 @@ INT32 __cdecl CRTDLL__chdir(LPCSTR newdir)
return 0;
}
/*********************************************************************
* _fullpath (CRTDLL.114)
*/
LPSTR __cdecl CRTDLL__fullpath(LPSTR buf, LPCSTR name, INT32 size)
{
DOS_FULL_NAME full_name;
if (!buf)
{
size = 256;
if(!(buf = CRTDLL_malloc(size))) return NULL;
}
if (!DOSFS_GetFullName( name, FALSE, &full_name )) return NULL;
lstrcpyn32A(buf,full_name.short_name,size);
dprintf_crtdll(stderr,"CRTDLL_fullpath got %s\n",buf);
return buf;
}
/*********************************************************************
* _getcwd (CRTDLL.120)
*/
CHAR* __cdecl CRTDLL__getcwd(LPSTR buf, INT32 size)
{
DOS_FULL_NAME full_name;
char *ret;
char test[1];
int len;
dprintf_crtdll(stddeb,"CRTDLL_getcwd for buf %p size %d\n",
buf,size);
if (buf == NULL)
len = size;
if (!buf) {
len = size;
if (size < 0) /* allocate as big as nescessary */
len =GetCurrentDirectory32A(1,test);
if(!(buf = CRTDLL_malloc(len)))
{
dprintf_crtdll(stderr,"CRTDLL_getcwd malloc unsupported\n");
printf("CRTDLL_getcwd malloc unsupported\n");
return 0;
/* set error to OutOfRange */
return( NULL );
}
ret = getcwd(buf,size);
if (!DOSFS_GetFullName( buf, FALSE, &full_name ))
}
size = len;
if(!(len =GetCurrentDirectory32A(len,buf)))
{
dprintf_crtdll(stddeb,"CRTDLL_getcwd failed\n");
return 0;
return NULL;
}
if (strlen(full_name.short_name)>size)
if (len > size)
{
dprintf_crtdll(stddeb,"CRTDLL_getcwd string too long\n");
return 0;
/* set error to ERANGE */
dprintf_crtdll(stddeb,"CRTDLL_getcwd buffer to small\n");
return NULL;
}
ret=strcpy(buf,full_name.short_name);
if (ret)
dprintf_crtdll(stddeb,"CRTDLL_getcwd returned:%s\n",ret);
return ret;
return buf;
}
/*********************************************************************
@ -1495,3 +1576,10 @@ VOID __cdecl CRTDLL_signal(int sig, sig_handler_type ptr)
{
dprintf_crtdll(stddeb,"CRTDLL_signal %d %p: STUB!\n",sig,ptr);
}
/*********************************************************************
* _ftol (CRTDLL.113)
*/
LONG __cdecl CRTDLL__ftol(double fl) {
return (LONG)fl;
}

View File

@ -21,7 +21,6 @@
#include "lzexpand.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
/* The readahead length of the decompressor. Reading single bytes
@ -169,7 +168,8 @@ HFILE32 WINAPI LZInit32( HFILE32 hfSrc )
_llseek32(hfSrc,0,SEEK_SET);
return ret?ret:hfSrc;
}
lzstates=xrealloc(lzstates,(++nroflzstates)*sizeof(struct lzstate));
lzstates = HeapReAlloc( GetProcessHeap(), 0, lzstates,
(++nroflzstates)*sizeof(struct lzstate) );
lzs = lzstates+(nroflzstates-1);
memset(lzs,'\0',sizeof(*lzs));
@ -178,7 +178,7 @@ HFILE32 WINAPI LZInit32( HFILE32 hfSrc )
lzs->lastchar = head.lastchar;
lzs->reallength = head.reallength;
lzs->get = xmalloc(GETLEN);
lzs->get = HEAP_xalloc( GetProcessHeap(), 0, GETLEN );
lzs->getlen = 0;
lzs->getcur = 0;
@ -513,7 +513,8 @@ LONG WINAPI LZCopy32( HFILE32 src, HFILE32 dest )
static LPSTR LZEXPAND_MangleName( LPCSTR fn )
{
char *p;
char *mfn = (char *)xmalloc( strlen(fn) + 3 ); /* "._" and \0 */
char *mfn = (char *)HEAP_xalloc( GetProcessHeap(), 0,
strlen(fn) + 3 ); /* "._" and \0 */
strcpy( mfn, fn );
if (!(p = strrchr( mfn, '\\' ))) p = mfn;
if ((p = strchr( p, '.' )))
@ -552,7 +553,7 @@ HFILE32 WINAPI LZOpenFile32A( LPCSTR fn, LPOFSTRUCT ofs, UINT32 mode )
{
LPSTR mfn = LZEXPAND_MangleName(fn);
fd = OpenFile32(mfn,ofs,mode);
free( mfn );
HeapFree( GetProcessHeap(), 0, mfn );
}
if ((mode&~0x70)!=OF_READ)
return fd;
@ -612,11 +613,13 @@ void WINAPI LZClose32( HFILE32 fd )
return;
}
if (lzstates[i].get)
free(lzstates[i].get);
HeapFree( GetProcessHeap(), 0, lzstates[i].get );
_lclose32(lzstates[i].realfd);
memcpy(lzstates+i,lzstates+i+1,sizeof(struct lzstate)*(nroflzstates-i-1));
memmove(lzstates+i,lzstates+i+1,
sizeof(struct lzstate)*(nroflzstates-i-1));
nroflzstates--;
lzstates=xrealloc(lzstates,sizeof(struct lzstate)*nroflzstates);
lzstates = HeapReAlloc( GetProcessHeap(), 0, lzstates,
sizeof(struct lzstate)*nroflzstates );
}
/***********************************************************************

View File

@ -178,16 +178,6 @@ WORD WINE_LanguageId = 0;
#define WINE_APP_DEFAULTS "/usr/lib/X11/app-defaults/Wine"
typedef struct tagENVENTRY {
LPSTR Name;
LPSTR Value;
WORD wSize;
struct tagENVENTRY *Prev;
struct tagENVENTRY *Next;
} ENVENTRY, *LPENVENTRY;
LPENVENTRY lpEnvList = NULL;
Display *display;
Screen *screen;
Window rootWindow;
@ -1221,6 +1211,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
case SPI_SETFASTTASKSWITCH:
case SPI_SETKEYBOARDDELAY:
case SPI_SETKEYBOARDSPEED:
case SPI_GETHIGHCONTRAST:
fprintf(stderr, "SystemParametersInfo: option %d ignored.\n", uAction);
break;

View File

@ -2039,11 +2039,10 @@ INT32 WINAPI LCMapString32A(
) {
int i,len;
fprintf(stderr,"LCMapStringA(0x%04lx,0x%08lx,%s,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen
);
dprintf_string(stderr,"LCMapStringA(0x%04lx,0x%08lx,%s,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen);
if (!dstlen || !dststr) {
dststr = srcstr;
dststr = (LPSTR)srcstr;
}
if (!srclen) srclen = strlen(srcstr);
if (!dstlen) dstlen = strlen(dststr);
@ -2055,8 +2054,18 @@ INT32 WINAPI LCMapString32A(
dststr[i]=tolower(srcstr[i]);
mapflags &= ~LCMAP_LOWERCASE;
}
if (mapflags & LCMAP_UPPERCASE) {
for (i=0;i<len;i++)
dststr[i]=toupper(srcstr[i]);
mapflags &= ~LCMAP_UPPERCASE;
}
if (mapflags)
{
fprintf(stderr,
"LCMapStringA(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen);
fprintf(stderr," unimplemented flags: 0x%08lx\n",mapflags);
}
return len;
}
@ -2068,11 +2077,11 @@ INT32 WINAPI LCMapString32W(
) {
int i,len;
fprintf(stderr,"LCMapStringW(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
dprintf_string(stderr,"LCMapStringW(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen
);
if (!dstlen || !dststr) {
dststr = srcstr;
dststr = (LPWSTR)srcstr;
}
if (!srclen) srclen = lstrlen32W(srcstr);
if (!dstlen) dstlen = lstrlen32W(dststr);
@ -2084,7 +2093,38 @@ INT32 WINAPI LCMapString32W(
dststr[i]=tolower(srcstr[i]);
mapflags &= ~LCMAP_LOWERCASE;
}
if (mapflags & LCMAP_UPPERCASE) {
for (i=0;i<len;i++)
dststr[i]=toupper(srcstr[i]);
mapflags &= ~LCMAP_UPPERCASE;
}
if (mapflags)
{
fprintf(stderr,
"LCMapStringW(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
lcid,mapflags,srcstr,srclen,dststr,dstlen);
fprintf(stderr," unimplemented flags: 0x%08lx\n",mapflags);
}
return len;
}
INT32 WINAPI GetDateFormat32A(LCID locale,DWORD flags,LPSYSTEMTIME xtime,
LPCSTR format, LPSTR date,INT32 datelen
) {
fprintf(stderr,"GetDateFormat(0x%04x,0x%08lx,%p,%s,%p,%d), stub\n",
locale,flags,xtime,format,date,datelen
);
lstrcpyn32A(date,"1.4.1997",datelen);
return strlen("1.4.1997");
}
INT32 WINAPI GetTimeFormat32A(LCID locale,DWORD flags,LPSYSTEMTIME xtime,
LPCSTR format, LPSTR timestr,INT32 timelen
) {
fprintf(stderr,"GetDateFormat(0x%04x,0x%08lx,%p,%s,%p,%d), stub\n",
locale,flags,xtime,format,timestr,timelen
);
lstrcpyn32A(timestr,"00:00:42",timelen);
return strlen("00:00:42");
}

View File

@ -2640,7 +2640,8 @@ DWORD WINAPI RegEnumValue32W(
*lpszValue = 0;
*lpcchValue = 2;
}
*lpdwType=val->type;
if (lpdwType)
*lpdwType=val->type;
if (lpbData) {
if (val->len>*lpcbData)
return ERROR_MORE_DATA;

View File

@ -333,7 +333,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
/*************************************************************************
* ShellExecute32A (SHELL32.84)
* ShellExecute32A (SHELL32.245)
*/
HINSTANCE32 WINAPI ShellExecute32A( HWND32 hWnd, LPCSTR lpOperation,
LPCSTR lpFile, LPCSTR lpParameters,
@ -411,7 +411,7 @@ LRESULT WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
ABOUT_INFO *info = (ABOUT_INFO *)lParam;
if (info)
{
SendDlgItemMessage32A(hWnd, stc1, STM_SETICON, info->hIcon, 0);
SendDlgItemMessage32A(hWnd, stc1, STM_SETICON32,info->hIcon, 0);
GetWindowText32A( hWnd, Template, sizeof(Template) );
sprintf( AppTitle, Template, info->szApp );
SetWindowText32A( hWnd, AppTitle );
@ -452,7 +452,7 @@ BOOL16 WINAPI ShellAbout16( HWND16 hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
}
/*************************************************************************
* ShellAbout32A (SHELL32.82)
* ShellAbout32A (SHELL32.243)
*/
BOOL32 WINAPI ShellAbout32A( HWND32 hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
HICON32 hIcon )
@ -469,7 +469,7 @@ BOOL32 WINAPI ShellAbout32A( HWND32 hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
/*************************************************************************
* ShellAbout32W (SHELL32.83)
* ShellAbout32W (SHELL32.244)
*/
BOOL32 WINAPI ShellAbout32W( HWND32 hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
HICON32 hIcon )
@ -754,7 +754,7 @@ HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName,
/*************************************************************************
* ExtractIcon32A (SHELL32.20)
* ExtractIcon32A (SHELL32.133)
*/
HICON32 WINAPI ExtractIcon32A( HINSTANCE32 hInstance, LPCSTR lpszExeFileName,
UINT32 nIconIndex )
@ -983,7 +983,7 @@ BOOL32 WINAPI RegisterShellHook(HWND16 hWnd, UINT16 uAction)
/*************************************************************************
* SHGetFileInfoA [SHELL32.54]
* SHGetFileInfoA [SHELL32.218]
*/
DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
SHFILEINFO32A *psfi, UINT32 sizeofpsfi,
@ -996,7 +996,7 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
}
/*************************************************************************
* CommandLineToArgvW [SHELL32.2]
* CommandLineToArgvW [SHELL32.7]
*/
LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
{
@ -1043,12 +1043,26 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
return argv;
}
void WINAPI Control_RunDLL(DWORD a1,DWORD a2,LPSTR a3,DWORD a4) {
fprintf(stderr,"Control_RunDLL(0x%08lx,0x%08lx,%s,0x%08lx)\n",
a1,a2,a3,a4
);
/*************************************************************************
* Control_RunDLL [SHELL32.12]
*
* Wild speculation in the following!
*
* http://premium.microsoft.com/msdn/library/techart/msdn193.htm
*/
void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
{
dprintf_exec (stddeb, "Control_RunDLL (%08x, %p, \"%s\", %08lx)\n",
hwnd,
code ? code : "(null)",
cmd ? cmd : "(null)",
arg4);
}
/*************************************************************************
*/
void WINAPI FreeIconList( DWORD dw )
{
fprintf( stdnimp, "FreeIconList: empty stub\n" );

View File

@ -299,7 +299,11 @@ static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] =
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 0x0170 - Win32 Static controls */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"STM_SETICON32", /* 0x0170 */
"STM_GETICON32", /* 0x0171 */
"STM_SETIMAGE32", /* 0x0172 */
"STM_GETIMAGE32", /* 0x0173 */
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 0x0180 - Win32 Listboxes */

View File

@ -13,6 +13,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include "callback.h"
#include "windows.h"
#include "miscemu.h"
@ -43,7 +44,7 @@ static void SYSTEM_TimerTick(void)
if ((SYS_Timers[i].ticks -= SYS_TIMER_RATE) <= 0)
{
SYS_Timers[i].ticks += SYS_Timers[i].rate;
SYS_Timers[i].callback();
Callbacks->CallSystemTimerProc( SYS_Timers[i].callback );
}
}
}
@ -177,15 +178,3 @@ void WINAPI DisableSystemTimers(void)
SYS_TimersDisabled = TRUE;
if (SYS_NbTimers) SYSTEM_StopTicks();
}
/***********************************************************************
* SYSTEM_GetTimerProc
*
* Return the timer proc of a system timer. Used by thunking code.
*/
FARPROC16 SYSTEM_GetTimerProc( WORD timer )
{
if (!timer || (timer > NB_SYS_TIMERS)) return NULL;
return SYS_Timers[timer-1].callback;
}

View File

@ -14,7 +14,6 @@
#include "toolhelp.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
/* FIXME: to make this working, we have to callback all these registered
* functions from all over the WINE code. Someone with more knowledge than
@ -41,9 +40,12 @@ BOOL16 WINAPI NotifyRegister( HTASK16 htask, FARPROC16 lpfnCallback,
break;
if (i==nrofnotifys) {
if (notifys==NULL)
notifys=(struct notify*)xmalloc(sizeof(struct notify));
notifys=(struct notify*)HeapAlloc( GetProcessHeap(), 0,
sizeof(struct notify) );
else
notifys=(struct notify*)xrealloc(notifys,sizeof(struct notify)*(nrofnotifys+1));
notifys=(struct notify*)HeapReAlloc( GetProcessHeap(), 0, notifys,
sizeof(struct notify)*(nrofnotifys+1));
if (!notifys) return FALSE;
nrofnotifys++;
}
notifys[i].htask=htask;
@ -63,7 +65,8 @@ BOOL16 WINAPI NotifyUnregister( HTASK16 htask )
if (i==-1)
return FALSE;
memcpy(notifys+i,notifys+(i+1),sizeof(struct notify)*(nrofnotifys-i-1));
notifys=(struct notify*)xrealloc(notifys,(nrofnotifys-1)*sizeof(struct notify));
notifys=(struct notify*)HeapReAlloc( GetProcessHeap(), 0, notifys,
(nrofnotifys-1)*sizeof(struct notify));
nrofnotifys--;
return TRUE;
}

View File

@ -1126,7 +1126,6 @@ DWORD WINAPI VerInstallFile32W(
}
/* FIXME: UNICODE? */
struct dbA {
WORD nextoff;
WORD datalen;
@ -1138,7 +1137,8 @@ struct dbA {
*/
};
/* FIXME: UNICODE? */
#define DATA_OFFSET_A(db) ((4+(strlen((db)->name)+4))&~3)
struct dbW {
WORD nextoff;
WORD datalen;
@ -1151,9 +1151,17 @@ struct dbW {
*/
};
/* WORD nextoffset;
* WORD datalength;
* WORD btype;
* WCHAR szKey[]; (zero terminated)
* PADDING (round up to nearest 32bit boundary)
*/
#define DATA_OFFSET_W(db) ((2+2+2+((lstrlen32W((db)->name)+1)*2+3))&~3)
/* this one used for Win16 resources, which are always in ASCII format */
static BYTE*
_find_dataA(BYTE *block,LPCSTR str, WORD buff_remain) {
_find_dataA(BYTE *block,LPCSTR str, int buff_remain) {
char *nextslash;
int substrlen, inc_size;
struct dbA *db;
@ -1174,37 +1182,36 @@ _find_dataA(BYTE *block,LPCSTR str, WORD buff_remain) {
while (1) {
db=(struct dbA*)block;
dprintf_ver(stddeb,"db=%p,db->nextoff=%d,db->datalen=%d,db->name=%s,db->data=%s\n",
db,db->nextoff,db->datalen,db->name,(char*)((char*)db+4+((strlen(db->name)+4)&~3))
dprintf_ver(stddeb,"db=%p,db->nextoff=%d,db->datalen=%d,db->name=%s\n",
db,db->nextoff,db->datalen,db->name
);
if ((!db->nextoff) || (!buff_remain)) /* no more entries ? */
if ((!db->nextoff) || (buff_remain<=0)) /* no more entries ? */
return NULL;
dprintf_ver(stddeb,"comparing with %s\n",db->name);
if (!strncmp(db->name,str,substrlen)) {
if (!lstrncmpi32A(db->name,str,substrlen)) {
if (nextslash) {
inc_size = 4+((strlen(db->name)+4)&~3)+((db->datalen+3)&~3);
return _find_dataA( block+inc_size ,nextslash,
buff_remain - inc_size);
}
else
inc_size=DATA_OFFSET_A(db)+((db->datalen+3)&~3);
return _find_dataA(block+inc_size,nextslash,
db->nextoff-inc_size);
} else
return block;
}
inc_size=((db->nextoff+3)&~3);
block=block+inc_size;
buff_remain=buff_remain-inc_size;
inc_size = ((db->nextoff+3)&~3);
block += inc_size;
buff_remain -= inc_size;
}
}
/* this one used for Win32 resources, which are always in UNICODE format */
extern LPWSTR CRTDLL_wcschr(LPCWSTR str,WCHAR xchar);
static BYTE*
_find_dataW(BYTE *block,LPCWSTR str, WORD buff_remain) {
_find_dataW(BYTE *block,LPCWSTR str, int buff_remain) {
LPWSTR nextslash;
int substrlen, inc_size;
struct dbW *db;
while (*str && *str=='\\')
str++;
if (NULL!=(nextslash=CRTDLL_wcschr(str,'\\')))
@ -1220,22 +1227,42 @@ _find_dataW(BYTE *block,LPCWSTR str, WORD buff_remain) {
while (1) {
char *xs,*vs;
db=(struct dbW*)block;
if ((!db->nextoff) || (!buff_remain)) /* no more entries ? */
xs= HEAP_strdupWtoA(GetProcessHeap(),0,db->name);
if (db->datalen) {
if (db->btext)
vs = HEAP_strdupWtoA(GetProcessHeap(),0,(WCHAR*)((block+DATA_OFFSET_W(db))));
else
vs = HEAP_strdupA(GetProcessHeap(),0,"not a string");
} else
vs = HEAP_strdupA(GetProcessHeap(),0,"no data");
dprintf_ver(stddeb,"db->nextoff=%d,db->name=%s,db->data=\"%s\"\n",
db->nextoff,xs,vs
);
HeapFree(GetProcessHeap(),0,vs);
HeapFree(GetProcessHeap(),0,xs);
if ((!db->nextoff) || (buff_remain<=0)) /* no more entries ? */
return NULL;
if (!lstrncmp32W(db->name,str,substrlen)) {
if (!lstrncmpi32W(db->name,str,substrlen)) {
if (nextslash) {
inc_size = 8+((lstrlen32W(db->name)*sizeof(WCHAR)+4)&~3)+((db->datalen+3)&~3);
/* DATA_OFFSET_W(db) (padded to 32bit already)
* DATA[datalength]
* PADDING (round up to nearest 32bit boundary)
* --> next level structs
*/
inc_size=DATA_OFFSET_W(db)+((db->datalen+3)&~3);
return _find_dataW( block+inc_size ,nextslash,
buff_remain - inc_size);
db->nextoff-inc_size);
} else
return block;
}
inc_size=((db->nextoff+3)&~3);
block=block+inc_size;
buff_remain=buff_remain-inc_size;
/* skip over this block, round up to nearest 32bit boundary */
inc_size = ((db->nextoff+3)&~3);
block += inc_size;
buff_remain -= inc_size;
}
}
@ -1244,46 +1271,59 @@ _find_dataW(BYTE *block,LPCWSTR str, WORD buff_remain) {
DWORD WINAPI VerQueryValue16(SEGPTR segblock,LPCSTR subblock,SEGPTR *buffer,
UINT16 *buflen)
{
LPSTR s;
BYTE *block=PTR_SEG_TO_LIN(segblock),*b;
char *s;
dprintf_ver(stddeb,"VerQueryValue16(%p,%s,%p,%d)\n",
block,subblock,buffer,*buflen
);
s=(char*)xmalloc(strlen("VS_VERSION_INFO\\")+strlen(subblock)+1);
strcpy(s,"VS_VERSION_INFO\\");strcat(s,subblock);
/* check for UNICODE version */
if ( (*(DWORD*)(block+0x14) != VS_FFI_SIGNATURE) &&
(*(DWORD*)(block+0x28) == VS_FFI_SIGNATURE)
) {
struct dbW *db;
LPWSTR wstr;
LPSTR xs;
wstr = HEAP_strdupAtoW(GetProcessHeap(),0,s);
b=_find_dataW(block, wstr, *(WORD *)block);
b=_find_dataW(block,wstr,*(WORD*)block);
HeapFree(GetProcessHeap(),0,wstr);
if (!b) {
fprintf(stderr,"key %s not found in versionresource.\n",subblock);
fprintf(stderr,"key %s not found in versionresource.\n",s);
*buflen=0;
return 0;
}
db=(struct dbW*)b;
b = b+8+((lstrlen32W(db->name)*sizeof(WCHAR)+4)&~3);
b = b+DATA_OFFSET_W(db);
*buflen = db->datalen;
if (db->btext) {
xs = HEAP_strdupWtoA(GetProcessHeap(),0,(WCHAR*)b);
dprintf_ver(stderr,"->%s\n",xs);
HeapFree(GetProcessHeap(),0,xs);
} else
dprintf_ver(stderr,"->%p\n",b);
} else {
struct dbA *db;
b=_find_dataA(block, s, *(WORD *)block);
b=_find_dataA(block,s,*(WORD*)block);
if (!b) {
fprintf(stderr,"key %s not found in versionresource.\n",subblock);
fprintf(stderr,"key %s not found in versionresource.\n",s);
*buflen=0;
return 0;
}
db=(struct dbA*)b;
b = b+4+((lstrlen32A(db->name)+4)&~3);
b = b+DATA_OFFSET_A(db);
*buflen = db->datalen;
/* the string is only printable, if it is below \\StringFileInfo*/
if (!lstrncmpi32A("VS_VERSION_INFO\\StringFileInfo\\",s,strlen("VS_VERSION_INFO\\StringFileInfo\\")))
dprintf_ver(stddeb," -> %s=%s\n",subblock,b);
else
dprintf_ver(stddeb," -> %s=%p\n",subblock,b);
}
*buffer = (b-block)+segblock;
dprintf_ver(stddeb," -> %s=%s\n",subblock,b);
free(s);
return 1;
}
@ -1296,28 +1336,38 @@ DWORD WINAPI VerQueryValue32A(LPVOID vblock,LPCSTR subblock,
dprintf_ver(stddeb,"VerQueryValue32A(%p,%s,%p,%d)\n",
block,subblock,buffer,*buflen
);
s=(char*)xmalloc(strlen("VS_VERSION_INFO\\")+strlen(subblock)+1);
strcpy(s,"VS_VERSION_INFO\\");strcat(s,subblock);
/* check for UNICODE version */
if ( (*(DWORD*)(block+0x14) != VS_FFI_SIGNATURE) &&
(*(DWORD*)(block+0x28) == VS_FFI_SIGNATURE)
) {
LPWSTR wstr;
LPSTR xs;
struct dbW *db;
wstr = HEAP_strdupAtoW(GetProcessHeap(),0,s);
b=_find_dataW(block, wstr, *(WORD *)block);
b=_find_dataW(block,wstr,*(WORD*)block);
HeapFree(GetProcessHeap(),0,wstr);
if (!b) {
fprintf(stderr,"key %s not found in versionresource.\n",subblock);
fprintf(stderr,"key %s not found in versionresource.\n",s);
*buflen=0;
return 0;
}
db=(struct dbW*)b;
db = (struct dbW*)b;
*buflen = db->datalen;
b = b+8+((lstrlen32W(db->name)*sizeof(WCHAR)+4)&~3);
b = b+DATA_OFFSET_W(db);
if (db->btext) {
xs = HEAP_strdupWtoA(GetProcessHeap(),0,(WCHAR*)b);
dprintf_ver(stderr,"->%s\n",xs);
HeapFree(GetProcessHeap(),0,xs);
} else
dprintf_ver(stderr,"->%p\n",b);
} else {
struct dbA *db;
b=_find_dataA(block, s, *(WORD *)block);
b=_find_dataA(block,s,*(WORD*)block);
if (!b) {
fprintf(stderr,"key %s not found in versionresource.\n",subblock);
*buflen=0;
@ -1325,10 +1375,16 @@ DWORD WINAPI VerQueryValue32A(LPVOID vblock,LPCSTR subblock,
}
db=(struct dbA*)b;
*buflen = db->datalen;
b = b+4+((lstrlen32A(db->name)+4)&~3);
b = b+DATA_OFFSET_A(db);
/* the string is only printable, if it is below \\StringFileInfo*/
if (!lstrncmpi32A("VS_VERSION_INFO\\StringFileInfo\\",s,strlen("VS_VERSION_INFO\\StringFileInfo\\")))
dprintf_ver(stddeb," -> %s=%s\n",subblock,b);
else
dprintf_ver(stddeb," -> %s=%p\n",subblock,b);
}
*buffer = b;
dprintf_ver(stddeb," -> %s=%s\n",subblock,b);
free(s);
return 1;
}

View File

@ -1332,115 +1332,233 @@ SOCKET16 WINAPI WINSOCK_socket16(INT16 af, INT16 type, INT16 protocol)
/* ----------------------------------- DNS services
*
* IMPORTANT: 16-bit API structures have SEGPTR pointers inside them.
* Also, we have to use wsock32 stubs to convert error codes from Unix
* to WSA, hence no direct mapping in if1632/wsock32.spec.
*
* FIXME: Win32 may need "short" h_addrtype and h_length in
* ...ent structures. If so, use WS_dup_...(pwsi, ..., 0) to
* convert.
* Also, we have to use wsock32 stubs to convert structures and
* error codes from Unix to WSA, hence no direct mapping in if1632/wsock32.spec.
*/
static char* NULL_STRING = "NULL";
/***********************************************************************
* gethostbyaddr() (WINSOCK.51)
*
*
struct WIN_hostent *
* gethostbyaddr() (WINSOCK.51)(WSOCK32.51)
*/
SEGPTR WINAPI WINSOCK_gethostbyaddr16(const char *addr, INT16 len, INT16 type)
static struct WIN_hostent* __ws_gethostbyaddr(const char *addr, int len, int type, int dup_flag)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetHostByAddr16(%08x): ptr %8x, len %d, type %d\n",
(unsigned)pwsi, (unsigned) addr, len, type);
if( pwsi )
{
struct hostent* host = gethostbyaddr(addr, len, type);
if( host )
if( WS_dup_he(pwsi, host, WS_DUP_SEGPTR) )
return SEGPTR_GET(pwsi->buffer);
struct hostent* host;
if( (host = gethostbyaddr(addr, len, type)) != NULL )
if( WS_dup_he(pwsi, host, dup_flag) )
return (struct WIN_hostent*)(pwsi->buffer);
else
pwsi->err = WSAENOBUFS;
else
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return (SEGPTR)NULL;
}
/***********************************************************************
* gethostbyaddr() (WSOCK32.51)
*/
struct hostent* WINAPI WINSOCK_gethostbyaddr32(const char *addr, INT32 len,
INT32 type)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetHostByAddr32(%08x): ptr %8x, len %d, type %d\n",
(unsigned)pwsi, (unsigned) addr, len, type);
if( pwsi )
{
struct hostent* host = gethostbyaddr( addr, len, type );
if( host )
return host;
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
SEGPTR WINAPI WINSOCK_gethostbyaddr16(const char *addr, INT16 len, INT16 type)
{
struct WIN_hostent* retval;
dprintf_winsock(stddeb, "WS_GetHostByAddr16: ptr %08x, len %d, type %d\n",
(unsigned) addr, len, type);
retval = __ws_gethostbyaddr( addr, len, type, WS_DUP_SEGPTR );
return retval ? SEGPTR_GET(retval) : ((SEGPTR)NULL);
}
struct WIN_hostent* WINAPI WINSOCK_gethostbyaddr32(const char *addr, INT32 len,
INT32 type)
{
dprintf_winsock(stddeb, "WS_GetHostByAddr32: ptr %08x, len %d, type %d\n",
(unsigned) addr, len, type);
return __ws_gethostbyaddr(addr, len, type, WS_DUP_LINEAR);
}
/***********************************************************************
* gethostbyname() (WINSOCK.52)
*
*
struct WIN_hostent *
* gethostbyname() (WINSOCK.52)(WSOCK32.52)
*/
SEGPTR WINAPI WINSOCK_gethostbyname16(const char *name)
static struct WIN_hostent * __ws_gethostbyname(const char *name, int dup_flag)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetHostByName16(%08x): %s\n",
(unsigned)pwsi, (name)?name:"NULL");
if( pwsi )
{
struct hostent* host;
if( (host = gethostbyname(name)) != NULL )
if( WS_dup_he(pwsi, host, WS_DUP_SEGPTR) )
return SEGPTR_GET(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
if( WS_dup_he(pwsi, host, dup_flag) )
return (struct WIN_hostent*)(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return (SEGPTR)NULL;
}
/***********************************************************************
* gethostbyname() (WSOCK32,52)
*/
struct hostent* WINAPI WINSOCK_gethostbyname32(const char* name)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetHostByName32(%08x): %s\n",
(unsigned)pwsi, (name)?name:"NULL");
if( pwsi )
{
struct hostent* host = gethostbyname( name );
if( host )
return host;
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
SEGPTR WINAPI WINSOCK_gethostbyname16(const char *name)
{
struct WIN_hostent* retval;
dprintf_winsock(stddeb, "WS_GetHostByName16: %s\n", (name)?name:NULL_STRING);
retval = __ws_gethostbyname( name, WS_DUP_SEGPTR );
return (retval)? SEGPTR_GET(retval) : ((SEGPTR)NULL) ;
}
struct WIN_hostent* WINAPI WINSOCK_gethostbyname32(const char* name)
{
dprintf_winsock(stddeb, "WS_GetHostByName32: %s\n", (name)?name:NULL_STRING);
return __ws_gethostbyname( name, WS_DUP_LINEAR );
}
/***********************************************************************
* gethostname() (WSOCK32.57)
* getprotobyname() (WINSOCK.53)(WSOCK32.53)
*/
static struct WIN_protoent* __ws_getprotobyname(const char *name, int dup_flag)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
if( pwsi )
{
struct protoent* proto;
if( (proto = getprotobyname(name)) != NULL )
if( WS_dup_pe(pwsi, proto, dup_flag) )
return (struct WIN_protoent*)(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
SEGPTR WINAPI WINSOCK_getprotobyname16(const char *name)
{
struct WIN_protoent* retval;
dprintf_winsock(stddeb, "WS_GetProtoByName16: %s\n", (name)?name:NULL_STRING);
retval = __ws_getprotobyname(name, WS_DUP_SEGPTR);
return retval ? SEGPTR_GET(retval) : ((SEGPTR)NULL);
}
struct WIN_protoent* WINAPI WINSOCK_getprotobyname32(const char* name)
{
dprintf_winsock(stddeb, "WS_GetProtoByName32: %s\n", (name)?name:NULL_STRING);
return __ws_getprotobyname(name, WS_DUP_LINEAR);
}
/***********************************************************************
* getprotobynumber() (WINSOCK.54)(WSOCK32.54)
*/
static struct WIN_protoent* __ws_getprotobynumber(int number, int dup_flag)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
if( pwsi )
{
struct protoent* proto;
if( (proto = getprotobynumber(number)) != NULL )
if( WS_dup_pe(pwsi, proto, dup_flag) )
return (struct WIN_protoent*)(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = WSANO_DATA;
}
return NULL;
}
SEGPTR WINAPI WINSOCK_getprotobynumber16(INT16 number)
{
struct WIN_protoent* retval;
dprintf_winsock(stddeb, "WS_GetProtoByNumber16: %i\n", number);
retval = __ws_getprotobynumber(number, WS_DUP_SEGPTR);
return retval ? SEGPTR_GET(retval) : ((SEGPTR)NULL);
}
struct WIN_protoent* WINAPI WINSOCK_getprotobynumber32(INT32 number)
{
dprintf_winsock(stddeb, "WS_GetProtoByNumber32: %i\n", number);
return __ws_getprotobynumber(number, WS_DUP_LINEAR);
}
/***********************************************************************
* getservbyname() (WINSOCK.55)(WSOCK32.55)
*/
struct WIN_servent* __ws_getservbyname(const char *name, const char *proto, int dup_flag)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
if( pwsi )
{
struct servent* serv;
if( (serv = getservbyname(name, proto)) != NULL )
if( WS_dup_se(pwsi, serv, dup_flag) )
return (struct WIN_servent*)(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
SEGPTR WINAPI WINSOCK_getservbyname16(const char *name, const char *proto)
{
struct WIN_servent* retval;
dprintf_winsock(stddeb, "WS_GetServByName16: '%s', '%s'\n",
(name)?name:NULL_STRING, (proto)?proto:NULL_STRING);
retval = __ws_getservbyname(name, proto, WS_DUP_SEGPTR);
return retval ? SEGPTR_GET(retval) : ((SEGPTR)NULL);
}
struct WIN_servent* WINAPI WINSOCK_getservbyname32(const char *name, const char *proto)
{
dprintf_winsock(stddeb, "WS_GetServByName32: '%s', '%s'\n",
(name)?name:NULL_STRING, (proto)?proto:NULL_STRING);
return __ws_getservbyname(name, proto, WS_DUP_LINEAR);
}
/***********************************************************************
* getservbyport() (WINSOCK.56)(WSOCK32.56)
*/
static struct WIN_servent* __ws_getservbyport(int port, const char* proto, int dup_flag)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
if( pwsi )
{
struct servent* serv;
if( (serv = getservbyport(port, proto)) != NULL )
if( WS_dup_se(pwsi, serv, dup_flag) )
return (struct WIN_servent*)(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
SEGPTR WINAPI WINSOCK_getservbyport16(INT16 port, const char *proto)
{
struct WIN_servent* retval;
dprintf_winsock(stddeb, "WS_GetServByPort16: %i, '%s'\n",
(int)port, (proto)?proto:NULL_STRING);
retval = __ws_getservbyport(port, proto, WS_DUP_SEGPTR);
return retval ? SEGPTR_GET(retval) : ((SEGPTR)NULL);
}
struct WIN_servent* WINAPI WINSOCK_getservbyport32(INT32 port, const char *proto)
{
dprintf_winsock(stddeb, "WS_GetServByPort32: %i, '%s'\n",
(int)port, (proto)?proto:NULL_STRING);
return __ws_getservbyport(port, proto, WS_DUP_LINEAR);
}
/***********************************************************************
* gethostname() (WSOCK32.57)
*/
INT32 WINAPI WINSOCK_gethostname32(char *name, INT32 namelen)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetHostName(%08x): name %s, len %d\n",
(unsigned)pwsi, (name)?name:NULL_STRING, namelen);
dprintf_winsock(stddeb, "WS_GetHostName(%08x): name %s, len %d\n",
(unsigned)pwsi, (name)?name:NULL_STRING, namelen);
if( pwsi )
{
if (gethostname(name, namelen) == 0) return 0;
@ -1450,186 +1568,13 @@ INT32 WINAPI WINSOCK_gethostname32(char *name, INT32 namelen)
}
/***********************************************************************
* gethostname() (WINSOCK.57)
* gethostname() (WINSOCK.57)
*/
INT16 WINAPI WINSOCK_gethostname16(char *name, INT16 namelen)
{
return (INT16)WINSOCK_gethostname32(name, namelen);
}
/***********************************************************************
* getprotobyname() (WINSOCK.53)
*
*
struct WIN_protoent *
*/
SEGPTR WINAPI WINSOCK_getprotobyname16(char *name)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetProtoByName16(%08x): %s\n",
(unsigned)pwsi, (name)?name:NULL_STRING);
if( pwsi )
{
struct protoent* proto;
if( (proto = getprotobyname(name)) != NULL )
if( WS_dup_pe(pwsi, proto, WS_DUP_SEGPTR) )
return SEGPTR_GET(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return (SEGPTR)NULL;
}
/***********************************************************************
* getprotobyname() (WSOCK32.53)
*/
struct protoent* WINAPI WINSOCK_getprotobyname32(char* name)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetProtoByName32(%08x): %s\n",
(unsigned)pwsi, (name)?name:NULL_STRING);
if( pwsi )
{
struct protoent* proto;
if( (proto = getprotobyname(name)) != NULL )
return proto;
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
/***********************************************************************
* getprotobynumber() (WINSOCK.54)
*
*
struct WIN_protoent *
*/
SEGPTR WINAPI WINSOCK_getprotobynumber16(INT16 number)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetProtoByNumber16(%08x): %i\n", (unsigned)pwsi, number);
if( pwsi )
{
struct protoent* proto;
if( (proto = getprotobynumber(number)) != NULL )
if( WS_dup_pe(pwsi, proto, WS_DUP_SEGPTR) )
return SEGPTR_GET(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = WSANO_DATA;
}
return (SEGPTR)NULL;
}
/***********************************************************************
* getprotobynumber() (WSOCK32.54)
*/
struct protoent* WINAPI WINSOCK_getprotobynumber32(INT32 number)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetProtoByNumber32(%08x): %i\n", (unsigned)pwsi, number);
if( pwsi )
{
struct protoent* proto;
if( (proto = getprotobynumber(number)) != NULL )
return proto;
pwsi->err = WSANO_DATA;
}
return NULL;
}
/***********************************************************************
* getservbyname() (WINSOCK.55)
*
*
struct WIN_servent *
*/
SEGPTR WINAPI WINSOCK_getservbyname16(const char *name, const char *proto)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetServByName16(%08x): '%s', '%s'\n",
(unsigned)pwsi, (name)?name:NULL_STRING, (proto)?proto:NULL_STRING);
if( pwsi )
{
struct servent* serv;
if( (serv = getservbyname(name, proto)) != NULL )
if( WS_dup_se(pwsi, serv, WS_DUP_SEGPTR) )
return SEGPTR_GET(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return (SEGPTR)NULL;
}
/***********************************************************************
* getservbyname() (WSOCK32.55)
*/
struct servent* WINAPI WINSOCK_getservbyname32(const char *name, const char *proto)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetServByName32(%08x): '%s', '%s'\n",
(unsigned)pwsi, (name)?name:NULL_STRING, (proto)?proto:NULL_STRING);
if( pwsi )
{
struct servent* serv;
if( (serv = getservbyname(name, proto)) != NULL )
return serv;
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
/***********************************************************************
* getservbyport() (WINSOCK.56)
*
*
struct WIN_servent *
*/
SEGPTR WINAPI WINSOCK_getservbyport16(INT16 port, const char *proto)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetServByPort16(%08x): %i, '%s'\n",
(unsigned)pwsi, (int)port, (proto)?proto:NULL_STRING);
if( pwsi )
{
struct servent* serv;
if( (serv = getservbyport(port, proto)) != NULL )
if( WS_dup_se(pwsi, serv, WS_DUP_SEGPTR) )
return SEGPTR_GET(pwsi->buffer);
else pwsi->err = WSAENOBUFS;
else pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return (SEGPTR)NULL;
}
/***********************************************************************
* getservbyport() (WSOCK32.56)
*/
struct servent* WINAPI WINSOCK_getservbyport32(INT32 port, const char *proto)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_GetServByPort32(%08x): %i, '%s'\n",
(unsigned)pwsi, (int)port, (proto)?proto:NULL_STRING);
if( pwsi )
{
struct servent* serv;
if( (serv = getservbyport(port, proto)) != NULL )
return serv;
pwsi->err = (h_errno < 0) ? wsaErrno() : wsaHerrno();
}
return NULL;
}
/* ------------------------------------- Windows sockets extensions -- *
* *
@ -1679,6 +1624,19 @@ HANDLE16 WINAPI WSAAsyncGetHostByName(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
return 0;
}
/***********************************************************************
* WSAAsyncGetHostByName32() (WSOCK32.103)
*/
HANDLE32 WINAPI WSAAsyncGetHostByName32(HWND32 hWnd, UINT32 uMsg, LPCSTR name,
LPSTR sbuf, INT32 buflen)
{
LPWSINFO pwsi = wsi_find(GetCurrentTask());
dprintf_winsock(stddeb, "WS_AsyncGetHostByName(%08x): hwnd %04x, msg %04x, host %s, buffer %i\n",
(unsigned)pwsi, hWnd, uMsg, (name)?name:NULL_STRING, (int)buflen );
return 0;
}
/***********************************************************************
* WSAAsyncGetProtoByName() (WINSOCK.105)

View File

@ -19,6 +19,7 @@
#define WPRINTF_LONG 0x0008 /* Long arg ('l' prefix) */
#define WPRINTF_SHORT 0x0010 /* Short arg ('h' prefix) */
#define WPRINTF_UPPER_HEX 0x0020 /* Upper-case hex ('X' specifier) */
#define WPRINTF_WIDE 0x0040 /* Wide arg ('w' prefix) */
typedef enum
{
@ -75,6 +76,7 @@ static INT32 WPRINTF_ParseFormatA( LPCSTR format, WPRINTF_FORMAT *res )
}
if (*p == 'l') { res->flags |= WPRINTF_LONG; p++; }
else if (*p == 'h') { res->flags |= WPRINTF_SHORT; p++; }
else if (*p == 'w') { res->flags |= WPRINTF_WIDE; p++; }
switch(*p)
{
case 'c':
@ -88,10 +90,12 @@ static INT32 WPRINTF_ParseFormatA( LPCSTR format, WPRINTF_FORMAT *res )
res->type = WPR_SIGNED;
break;
case 's':
res->type = (res->flags & WPRINTF_LONG) ? WPR_WSTRING : WPR_STRING;
res->type = (res->flags & (WPRINTF_LONG |WPRINTF_WIDE))
? WPR_WSTRING : WPR_STRING;
break;
case 'S':
res->type = (res->flags & WPRINTF_SHORT) ? WPR_STRING : WPR_WSTRING;
res->type = (res->flags & (WPRINTF_SHORT|WPRINTF_WIDE))
? WPR_STRING : WPR_WSTRING;
break;
case 'u':
res->type = WPR_UNSIGNED;

View File

@ -24,7 +24,6 @@
#include "task.h"
#include "options.h"
#include "miscemu.h"
#include "xmalloc.h"
#include "stddebug.h"
#include "debug.h"
#if defined(__svr4__) || defined(_SCO_DS)
@ -535,7 +534,7 @@ static int INT21_FindFirst( CONTEXT *context )
SET_CFLAG(context);
return 0;
}
dta->unixPath = xstrdup( full_name.long_name );
dta->unixPath = HEAP_strdupA( GetProcessHeap(), 0, full_name.long_name );
p = strrchr( dta->unixPath, '/' );
*p = '\0';
@ -544,7 +543,7 @@ static int INT21_FindFirst( CONTEXT *context )
*/
if (!DOSFS_ToDosFCBFormat( p + 1, dta->mask ))
{
free( dta->unixPath );
HeapFree( GetProcessHeap(), 0, dta->unixPath );
dta->unixPath = NULL;
DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
AX_reg(context) = ER_FileNotFound;
@ -569,14 +568,14 @@ static int INT21_FindNext( CONTEXT *context )
if (!(count = DOSFS_FindNext( dta->unixPath, dta->mask, NULL, dta->drive,
dta->search_attr, dta->count, &entry )))
{
free( dta->unixPath );
HeapFree( GetProcessHeap(), 0, dta->unixPath );
dta->unixPath = NULL;
return 0;
}
if ((int)dta->count + count > 0xffff)
{
fprintf( stderr, "Too many directory entries in %s\n", dta->unixPath );
free( dta->unixPath );
HeapFree( GetProcessHeap(), 0, dta->unixPath );
dta->unixPath = NULL;
return 0;
}
@ -850,13 +849,15 @@ void WINAPI DOS3Call( CONTEXT *context )
case 0x27: /* RANDOM BLOCK READ FROM FCB FILE */
case 0x28: /* RANDOM BLOCK WRITE TO FCB FILE */
case 0x29: /* PARSE FILENAME INTO FCB */
case 0x2e: /* SET VERIFY FLAG */
case 0x37: /* "SWITCHAR" - GET SWITCH CHARACTER
"SWITCHAR" - SET SWITCH CHARACTER
"AVAILDEV" - SPECIFY \DEV\ PREFIX USE */
case 0x54: /* GET VERIFY FLAG */
INT_BARF( context, 0x21 );
break;
case 0x2e: /* SET VERIFY FLAG */
/* we cannot change the behaviour anyway, so just ignore it */
break;
case 0x18: /* NULL FUNCTIONS FOR CP/M COMPATIBILITY */
case 0x1d:
@ -1197,16 +1198,20 @@ void WINAPI DOS3Call( CONTEXT *context )
break;
case 0x0e: /* get logical drive mapping */
AL_reg(context) = 0; /* drive has no mapping */
AL_reg(context) = 0; /* drive has no mapping - FIXME: may be wrong*/
break;
case 0x0F: /* Set logical drive mapping */
/* FIXME: Not implemented at the moment, always returns error
*/
INT_BARF( context, 0x21 );
AX_reg(context) = 0x0001; /* invalid function */
SET_CFLAG(context);
{
int drive;
drive = DOS_GET_DRIVE ( BL_reg(context) );
if ( ! DRIVE_SetLogicalMapping ( drive, drive+1 ) )
{
SET_CFLAG(context);
AX_reg(context) = 0x000F; /* invalid drive */
}
break;
}
default:
INT_BARF( context, 0x21 );

View File

@ -12,6 +12,7 @@ C_SRCS = \
mcicda.c \
mcistring.c \
midi.c \
mixer.c \
mmaux.c \
mmsystem.c \
time.c

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@ typedef struct {
BOOL16 fShareable; /* TRUE if first open was shareable */
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
HANDLE16 hCallback; /* Callback handle for pending notification */
MCI_OPEN_PARMS openParms;
MCI_OPEN_PARMS16 openParms;
DWORD dwTimeFormat;
int mode;
UINT16 nCurTrack;
@ -38,7 +38,7 @@ typedef struct {
DWORD dwTotalLen;
LPDWORD lpdwTrackLen;
LPDWORD lpdwTrackPos;
} LINUX_ANIM;
} LINUX_ANIM;
static LINUX_ANIM AnimDev[MAX_ANIMDRV];
#endif
@ -49,7 +49,7 @@ static LINUX_ANIM AnimDev[MAX_ANIMDRV];
/**************************************************************************
* ANIM_mciOpen [internal]
*/
static DWORD ANIM_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
static DWORD ANIM_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS16 lpParms)
{
#if defined(linux) || defined(__FreeBSD__)
LPSTR lpstrElementName;
@ -83,7 +83,7 @@ static DWORD ANIM_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms
CharUpper32A(str);
}
}
memcpy(&AnimDev[wDevID].openParms, lpParms, sizeof(MCI_OPEN_PARMS));
memcpy(&AnimDev[wDevID].openParms, lpParms, sizeof(MCI_OPEN_PARMS16));
AnimDev[wDevID].wNotifyDeviceID = lpParms->wDeviceID;
AnimDev[wDevID].mode = 0;
AnimDev[wDevID].dwTimeFormat = MCI_FORMAT_TMSF;
@ -285,7 +285,7 @@ static DWORD ANIM_CalcFrame(UINT16 wDevID, DWORD dwFormatType, DWORD dwTime)
/**************************************************************************
* ANIM_mciInfo [internal]
*/
static DWORD ANIM_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
static DWORD ANIM_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms)
{
#if defined(linux) || defined(__FreeBSD__)
dprintf_mcianim(stddeb,"ANIM_mciInfo(%u, %08lX, %p);\n",
@ -617,7 +617,7 @@ LONG ANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
case MCI_OPEN_DRIVER:
case MCI_OPEN:
return ANIM_mciOpen(dwDevID, dwParam1,
(LPMCI_OPEN_PARMS)PTR_SEG_TO_LIN(dwParam2));
(LPMCI_OPEN_PARMS16)PTR_SEG_TO_LIN(dwParam2));
case DRV_CLOSE:
case MCI_CLOSE_DRIVER:
case MCI_CLOSE:
@ -642,7 +642,7 @@ LONG ANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
(LPMCI_GETDEVCAPS_PARMS)PTR_SEG_TO_LIN(dwParam2));
case MCI_INFO:
return ANIM_mciInfo(dwDevID, dwParam1,
(LPMCI_INFO_PARMS)PTR_SEG_TO_LIN(dwParam2));
(LPMCI_INFO_PARMS16)PTR_SEG_TO_LIN(dwParam2));
case MCI_STATUS:
return ANIM_mciStatus(dwDevID, dwParam1,
(LPMCI_STATUS_PARMS)PTR_SEG_TO_LIN(dwParam2));

View File

@ -51,7 +51,7 @@ typedef struct {
BOOL16 fShareable; /* TRUE if first open was shareable */
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
HANDLE16 hCallback; /* Callback handle for pending notification */
MCI_OPEN_PARMS openParms;
MCI_OPEN_PARMS16 openParms;
DWORD dwTimeFormat;
int unixdev;
#ifdef linux
@ -227,7 +227,7 @@ static BOOL32 CDAUDIO_GetTracksInfo(UINT16 wDevID)
/**************************************************************************
* CDAUDIO_mciOpen [internal]
*/
static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS16 lpParms)
{
#if defined(linux) || defined(__FreeBSD__)
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen(%04X, %08lX, %p);\n",
@ -251,7 +251,7 @@ static DWORD CDAUDIO_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpPa
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen // MCI_OPEN_ELEMENT !\n");
/* return MCIERR_NO_ELEMENT_ALLOWED; */
}
memcpy(&CDADev[wDevID].openParms, lpParms, sizeof(MCI_OPEN_PARMS));
memcpy(&CDADev[wDevID].openParms, lpParms, sizeof(MCI_OPEN_PARMS16));
CDADev[wDevID].wNotifyDeviceID = lpParms->wDeviceID;
CDADev[wDevID].unixdev = open (CDAUDIO_DEV, O_RDONLY, 0);
if (CDADev[wDevID].unixdev == -1) {
@ -361,7 +361,7 @@ static DWORD CDAUDIO_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
/**************************************************************************
* CDAUDIO_mciInfo [internal]
*/
static DWORD CDAUDIO_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
static DWORD CDAUDIO_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms)
{
#if defined(linux) || defined(__FreeBSD__)
dprintf_cdaudio(stddeb,"CDAUDIO_mciInfo(%04X, %08lX, %p);\n",
@ -1037,7 +1037,7 @@ LONG CDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
case DRV_OPEN:
case MCI_OPEN_DRIVER:
case MCI_OPEN:
return CDAUDIO_mciOpen(dwDevID, dwParam1, (LPMCI_OPEN_PARMS)PTR_SEG_TO_LIN(dwParam2));
return CDAUDIO_mciOpen(dwDevID, dwParam1, (LPMCI_OPEN_PARMS16)PTR_SEG_TO_LIN(dwParam2));
case DRV_CLOSE:
case MCI_CLOSE_DRIVER:
case MCI_CLOSE:
@ -1061,7 +1061,7 @@ LONG CDAUDIO_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
(LPMCI_GETDEVCAPS_PARMS)PTR_SEG_TO_LIN(dwParam2));
case MCI_INFO:
return CDAUDIO_mciInfo(dwDevID, dwParam1,
(LPMCI_INFO_PARMS)PTR_SEG_TO_LIN(dwParam2));
(LPMCI_INFO_PARMS16)PTR_SEG_TO_LIN(dwParam2));
case MCI_STATUS:
return CDAUDIO_mciStatus(dwDevID, dwParam1,
(LPMCI_STATUS_PARMS)PTR_SEG_TO_LIN(dwParam2));

Some files were not shown because too many files have changed in this diff Show More