Release 980329
Sun Mar 29 15:18:57 1998 Uwe Bonnes <elektron.ikp.physik.tu-darmstadt.de> * [msdos/int21.c] More verbose Trace messages Sun Mar 29 15:03:30 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/ne_image.c] Terminate relocation chains on 0 offset. Sun Mar 29 02:35:45 1998 James Juran <jrj120@psu.edu> * [windows/caret.c] [windows/class.c] [windows/clipboard.c] Fixed more USER32 ordinal numbers in function documentation. Sat Mar 28 22:40:23 1997 Andreas Mohr <100.30936@germany.net> * [controls/desktop.c] Return 1 for WM_NCCREATE in DesktopWndProc. * [controls/menu.c] Fixed crash when destroying a top popup win that was only created but not shown. * [ole/typelib.c] [if1632/typelib.spec] Implemented OABuildVersion. * [windows/win.c] Finally fixed ugly bug in GetParent32 that affected window placement: Didn't return 0 for windows that have neither WS_POPUP nor WS_CHILD set. Now it acts exactly like Windows (at least I hope so ;) Sat Mar 28 02:26:43 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [DEVELOPERS-HINTS] [documentation/debug-msgs] Updated documentation on debug messages * [include/button.h] [controls/button.c] [include/windows.h] [include/combo.h] [controls/combo.c] [controls/commctrl.c] [controls/icontitle.c] [controls/listbox.c] [controls/menu.c] [controls/scroll.c] [controls/widgets.c] Changed some 16-bit code to 32-bit code. I am positive this will not break anything. * [controls/uitools.c] Renamed the prefix of some functions from UITOOLS_ to UITOOLS95_ to reflect the fact that they implement Win95 look. Maybe we will have a UITOOLS31_ in the future. Anyhow, the change is completely internal to this file. * [*/*.c] Changed a lot of [f]printf into appropriate debug messages. Fri Mar 27 19:56:12 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [documentation/status/] Added directdraw and directsound status. * [if1632/thunk.c][ole/*.c][win32/kernel32.c] Added some documentation. Moved FUNC004 to thunk.c since it seems to be a 16->32 thunk (calling conventions and the like still unknown). Fri Mar 27 09:59:32 1998 Morten Eriksen <mortene@pvv.org> * [loader/resource.c][windows/keyboard.c] Implemented CopyAcceleratorTable() and CreateAcceleratorTable(). * [include/compobj.h][ole/compobj.c][relay32/ole32.spec] Added implementation of StringFromGUID2(). Tue Mar 26 23:12:05 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [misc/imagelist.c][relay32/comctl32.spec] Implemented new debugging interface. Added missing functions (some are empty stubs). Changed ordinals in comctl32.spec (now dll version 4.72 comatible). * [objects/oembitmaps.c][include/windows.h] [include/bitmaps/*] Added missing restore bitmaps for Win95 look. Added missing Win95 cursors. Thu Mar 26 10:18:20 1998 Douglas Ridgway <ridgway@winehq.com> * [programs/view/Makefile.in] [programs/view/view.c] Fix compilation, Aldus placeable metafile loading. * [graphics/metafiledrv/init.c] [relay32/gdi32.spec] [objects/metafile.c] Implemented various 32 bit versions of regular metafile API. * [objects/enhmetafile.c] Implemented rendering of a couple of dozen records. Tue Mar 24 20:06:39 1998 Matthew Becker <mbecker@glasscity.net> * [memory/*.c] Updated documentation for API manpages. Mon Mar 23 09:09:00 1998 Alex Korobka <alex@pharm.sunysb.edu> * [misc/winsock.c] Fixed 32-bit DNS lookup. Mon Mar 23 23:54:47 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com> * [multimedia/init.c] New code for the initialization and gathering of information about the MIDI devices, for future use. Thu Mar 19 00:59:29 1998 Jim Peterson <jspeter@nospam.birch.ee.vt.edu> * [windows/win.c] Eliminated inaccurate setting of cs->hMenu in WIN_CreateWindowEx, along with superfluous SetMenu32 call. Mon Mar 16 17:40:53 1998 Petter Reinholdtsen <pere@td.org.uit.no> * [debugger/dbg.y] [debugger/Makefile.in] [Makefile.in] Install wine.sym in $(exec_prefix)/lib and make sure the debugger finds it. Sun Mar 15 22:36:35 1998 Michael Veksler <mveksler@tx.technion.ac.il> * [dummy.c] [if1632/gdi.spec] Fixed stub declaration of GDI_532, so Hebrew-Word2 kind of works.
This commit is contained in:
parent
a69b88b2f2
commit
54c2711ff6
18
ANNOUNCE
18
ANNOUNCE
|
@ -1,14 +1,14 @@
|
|||
This is release 980315 of Wine, the MS Windows emulator. This is still a
|
||||
This is release 980329 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-980315: (see ChangeLog for details)
|
||||
- Preliminary ImageLists support.
|
||||
- Beginnings of enhanced metafiles.
|
||||
- More debugging macros changes.
|
||||
WHAT'S NEW with Wine-980329: (see ChangeLog for details)
|
||||
- More ImageLists support.
|
||||
- More Win32 metafile support.
|
||||
- Still some debugging output changes.
|
||||
- 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-980315.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980315.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-980315.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980315.tar.gz
|
||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980329.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980329.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-980329.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980329.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
128
ChangeLog
128
ChangeLog
|
@ -1,3 +1,131 @@
|
|||
----------------------------------------------------------------------
|
||||
Sun Mar 29 15:18:57 1998 Uwe Bonnes <elektron.ikp.physik.tu-darmstadt.de>
|
||||
|
||||
* [msdos/int21.c]
|
||||
More verbose Trace messages
|
||||
|
||||
Sun Mar 29 15:03:30 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
* [loader/ne_image.c]
|
||||
Terminate relocation chains on 0 offset.
|
||||
|
||||
Sun Mar 29 02:35:45 1998 James Juran <jrj120@psu.edu>
|
||||
|
||||
* [windows/caret.c] [windows/class.c] [windows/clipboard.c]
|
||||
Fixed more USER32 ordinal numbers in function documentation.
|
||||
|
||||
Sat Mar 28 22:40:23 1997 Andreas Mohr <100.30936@germany.net>
|
||||
|
||||
* [controls/desktop.c]
|
||||
Return 1 for WM_NCCREATE in DesktopWndProc.
|
||||
|
||||
* [controls/menu.c]
|
||||
Fixed crash when destroying a top popup win that was only created
|
||||
but not shown.
|
||||
|
||||
* [ole/typelib.c] [if1632/typelib.spec]
|
||||
Implemented OABuildVersion.
|
||||
|
||||
* [windows/win.c]
|
||||
Finally fixed ugly bug in GetParent32 that affected window placement:
|
||||
Didn't return 0 for windows that have neither WS_POPUP nor
|
||||
WS_CHILD set. Now it acts exactly like Windows (at least I hope so ;)
|
||||
|
||||
Sat Mar 28 02:26:43 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
|
||||
|
||||
* [DEVELOPERS-HINTS] [documentation/debug-msgs]
|
||||
Updated documentation on debug messages
|
||||
|
||||
* [include/button.h] [controls/button.c] [include/windows.h]
|
||||
[include/combo.h] [controls/combo.c] [controls/commctrl.c]
|
||||
[controls/icontitle.c] [controls/listbox.c] [controls/menu.c]
|
||||
[controls/scroll.c] [controls/widgets.c]
|
||||
Changed some 16-bit code to 32-bit code. I am positive this will
|
||||
not break anything.
|
||||
|
||||
* [controls/uitools.c]
|
||||
Renamed the prefix of some functions from UITOOLS_ to UITOOLS95_
|
||||
to reflect the fact that they implement Win95 look. Maybe we will
|
||||
have a UITOOLS31_ in the future. Anyhow, the change is completely
|
||||
internal to this file.
|
||||
|
||||
* [*/*.c]
|
||||
Changed a lot of [f]printf into appropriate debug messages.
|
||||
|
||||
Fri Mar 27 19:56:12 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
|
||||
* [documentation/status/]
|
||||
Added directdraw and directsound status.
|
||||
|
||||
* [if1632/thunk.c][ole/*.c][win32/kernel32.c]
|
||||
Added some documentation.
|
||||
Moved FUNC004 to thunk.c since it seems to be a 16->32 thunk
|
||||
(calling conventions and the like still unknown).
|
||||
|
||||
Fri Mar 27 09:59:32 1998 Morten Eriksen <mortene@pvv.org>
|
||||
|
||||
* [loader/resource.c][windows/keyboard.c]
|
||||
Implemented CopyAcceleratorTable() and CreateAcceleratorTable().
|
||||
|
||||
* [include/compobj.h][ole/compobj.c][relay32/ole32.spec]
|
||||
Added implementation of StringFromGUID2().
|
||||
|
||||
Tue Mar 26 23:12:05 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
* [misc/imagelist.c][relay32/comctl32.spec]
|
||||
Implemented new debugging interface.
|
||||
Added missing functions (some are empty stubs).
|
||||
Changed ordinals in comctl32.spec (now dll version 4.72 comatible).
|
||||
|
||||
* [objects/oembitmaps.c][include/windows.h]
|
||||
[include/bitmaps/*]
|
||||
Added missing restore bitmaps for Win95 look.
|
||||
Added missing Win95 cursors.
|
||||
|
||||
Thu Mar 26 10:18:20 1998 Douglas Ridgway <ridgway@winehq.com>
|
||||
|
||||
* [programs/view/Makefile.in] [programs/view/view.c]
|
||||
Fix compilation, Aldus placeable metafile loading.
|
||||
|
||||
* [graphics/metafiledrv/init.c] [relay32/gdi32.spec]
|
||||
[objects/metafile.c]
|
||||
Implemented various 32 bit versions of regular metafile API.
|
||||
|
||||
* [objects/enhmetafile.c]
|
||||
Implemented rendering of a couple of dozen records.
|
||||
|
||||
Tue Mar 24 20:06:39 1998 Matthew Becker <mbecker@glasscity.net>
|
||||
|
||||
* [memory/*.c]
|
||||
Updated documentation for API manpages.
|
||||
|
||||
Mon Mar 23 09:09:00 1998 Alex Korobka <alex@pharm.sunysb.edu>
|
||||
|
||||
* [misc/winsock.c]
|
||||
Fixed 32-bit DNS lookup.
|
||||
|
||||
Mon Mar 23 23:54:47 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
|
||||
|
||||
* [multimedia/init.c]
|
||||
New code for the initialization and gathering of information about
|
||||
the MIDI devices, for future use.
|
||||
|
||||
Thu Mar 19 00:59:29 1998 Jim Peterson <jspeter@nospam.birch.ee.vt.edu>
|
||||
|
||||
* [windows/win.c]
|
||||
Eliminated inaccurate setting of cs->hMenu in
|
||||
WIN_CreateWindowEx, along with superfluous SetMenu32 call.
|
||||
|
||||
Mon Mar 16 17:40:53 1998 Petter Reinholdtsen <pere@td.org.uit.no>
|
||||
|
||||
* [debugger/dbg.y] [debugger/Makefile.in] [Makefile.in]
|
||||
Install wine.sym in $(exec_prefix)/lib and make sure the debugger
|
||||
finds it.
|
||||
|
||||
Sun Mar 15 22:36:35 1998 Michael Veksler <mveksler@tx.technion.ac.il>
|
||||
|
||||
* [dummy.c] [if1632/gdi.spec]
|
||||
Fixed stub declaration of GDI_532, so Hebrew-Word2 kind of works.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Sun Mar 15 03:46:50 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
|
||||
|
||||
|
|
|
@ -198,47 +198,41 @@ DEBUG MESSAGES
|
|||
To display a message only during debugging, you normally write something
|
||||
like this:
|
||||
|
||||
#ifdef DEBUG_WIN
|
||||
printf("abc...");
|
||||
#endif
|
||||
TRACE(win,"abc..."); or
|
||||
FIXME(win,"abc..."); or
|
||||
WARN(win,"abc..."); or
|
||||
ERR(win,"abc...");
|
||||
|
||||
You can write this shorter (and better) in this way:
|
||||
depending on the seriousness of the problem. (documentation/degug-msgs
|
||||
explains when it is appropriate to use each of them)
|
||||
|
||||
dprintf_win(stddeb,"abc...");
|
||||
These macros are defined in include/debug.h. The macro-definitions are
|
||||
generated by the shell-script tools/make_debug. It scans the source
|
||||
code for symbols of this forms and puts the necessary macro
|
||||
definitions in include/debug.h and include/debugdefs.h. These macros
|
||||
test whether the debugging "channel" associated with the first
|
||||
argument of these macros (win in the above example) is enabled and
|
||||
thus decide whether to actually display the text. In addition you can
|
||||
change the types of displayed messages by supplying the "-debugmsg"
|
||||
option to Wine. If your debugging code is more complex than just
|
||||
printf, you can use the symbols TRACE_ON(xxx), WARN_ON(xxx),
|
||||
ERR_ON(xxx) and FIXME_ON(xxx) as well. These are true when channel xxx
|
||||
is enabled, either permanent or in the command line. Thus, you can
|
||||
write:
|
||||
|
||||
All symbols of the form dprintf_xxxx are macros defined in include/debug.h .
|
||||
The macro-definitions are generated by the shell-script tools/make_debug. It
|
||||
scans the source code for symbols of this forms and puts the necessary
|
||||
macro definitions in include/debug.h and include/stddebug.h . These macros
|
||||
test for the symbol DEBUG_XXXX (e.g. dprintf_win refers to DEBUG_WIN) being
|
||||
defined and thus decided whether to actually display the text. If you want
|
||||
to enable specific types of messages, simply put the corresponding
|
||||
#define DEBUG_XXXX in include/stddebug.h . If you want to enable or disable
|
||||
a specific type of message in just one c-source-file, put the corresponding
|
||||
#define DEBUG_XXXX or #undefine DEBUG_XXXX between #include<stddebug.h> and
|
||||
#include <debug.h> in that specific file. In addition you can change the
|
||||
types of displayed messages by supplying the "-debugmsg" option to Wine.
|
||||
If your debugging code is more complex than just printf, you can use the
|
||||
symbols debugging_XXX as well. These are true when XXX is enabled, either
|
||||
permanent or in the command line. So instead of writing
|
||||
if(TRACE_ON(win))DumpSomeStructure(&str);
|
||||
|
||||
#ifdef DEBUG_WIN
|
||||
DumpSomeStructure(&str);
|
||||
#endif
|
||||
|
||||
write
|
||||
if(debugging_win)DumpSomeStructure(&str);
|
||||
Don't worry about the inefficiency of the test. If it is permanently
|
||||
disabled (thus debugging_win is 0 at compile time), the compiler will
|
||||
disabled (that is TRACE_ON(win) is 0 at compile time), the compiler will
|
||||
eliminate the dead code.
|
||||
|
||||
The file handle "stddeb" is intended for displaying standard informational
|
||||
messages, whereas "stdnimp" is intended for displaying messages concerning
|
||||
not yet implemented functions.
|
||||
|
||||
You have to start tools/make_debug only if you introduced a new macro,
|
||||
e.g. dprintf_win32s - not if you just changed one of the #define
|
||||
DEBUG_XXX's in include/stddebug.h or in a specific file.
|
||||
e.g. TRACE(win32).
|
||||
|
||||
For more info about debugging messages, read:
|
||||
|
||||
documentation/debug-msgs
|
||||
|
||||
|
||||
MORE INFO
|
||||
=========
|
||||
|
|
|
@ -121,6 +121,7 @@ libwine.so.1.0: $(LIBOBJS)
|
|||
|
||||
install_emu: install_lib
|
||||
$(INSTALL_PROGRAM) wine $(bindir)/wine
|
||||
$(INSTALL_DATA) wine.sym $(libdir)/wine.sym
|
||||
|
||||
install_lib: install_includes
|
||||
$(INSTALL_DATA) $(LIB_TARGET) $(libdir)
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
This file contains information about the current release of Wine.
|
||||
If you are new to Wine, read the files ANNOUNCE and README and the FAQ
|
||||
list first.
|
||||
If you want to contribute code to Wine, read the DEVELOPER-HINTS. The
|
||||
primary source of information to developers is the ChangeLog (next to
|
||||
the source, of course).
|
||||
|
||||
1. BAR.EXE used to work, but does not work anymore
|
||||
Look at the ChangeLog to see what files have been changed. Try to undo
|
||||
the particular patch and go partially back to the previous version. If
|
||||
you have any suspicions, report them to the author or to the newsgroup.
|
|
@ -64,7 +64,7 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
|
|||
SendMessage32A( GetParent32((wndPtr)->hwndSelf), WM_CTLCOLORBTN, \
|
||||
(hdc), (wndPtr)->hwndSelf )
|
||||
|
||||
static HBITMAP16 hbitmapCheckBoxes = 0;
|
||||
static HBITMAP32 hbitmapCheckBoxes = 0;
|
||||
static WORD checkBoxWidth = 0, checkBoxHeight = 0;
|
||||
|
||||
|
||||
|
@ -74,7 +74,8 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0;
|
|||
LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
|
||||
WPARAM32 wParam, LPARAM lParam )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
POINT32 pt = { LOWORD(lParam), HIWORD(lParam) };
|
||||
WND *wndPtr = WIN_FindWndPtr(hWnd);
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
LONG style = wndPtr->dwStyle & 0x0f;
|
||||
|
@ -98,9 +99,9 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
|
|||
case WM_CREATE:
|
||||
if (!hbitmapCheckBoxes)
|
||||
{
|
||||
BITMAP16 bmp;
|
||||
hbitmapCheckBoxes = LoadBitmap16(0, MAKEINTRESOURCE(OBM_CHECKBOXES));
|
||||
GetObject16( hbitmapCheckBoxes, sizeof(bmp), &bmp );
|
||||
BITMAP32 bmp;
|
||||
hbitmapCheckBoxes = LoadBitmap32A(0, MAKEINTRESOURCE(OBM_CHECKBOXES));
|
||||
GetObject32A( hbitmapCheckBoxes, sizeof(bmp), &bmp );
|
||||
checkBoxWidth = bmp.bmWidth / 4;
|
||||
checkBoxHeight = bmp.bmHeight / 3;
|
||||
}
|
||||
|
@ -133,8 +134,8 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
|
|||
ReleaseCapture();
|
||||
if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) break;
|
||||
SendMessage32A( hWnd, BM_SETSTATE32, FALSE, 0 );
|
||||
GetClientRect16( hWnd, &rect );
|
||||
if (PtInRect16( &rect, MAKEPOINT16(lParam) ))
|
||||
GetClientRect32( hWnd, &rect );
|
||||
if (PtInRect32( &rect, pt ))
|
||||
{
|
||||
switch(style)
|
||||
{
|
||||
|
@ -159,9 +160,8 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
|
|||
case WM_MOUSEMOVE:
|
||||
if (GetCapture32() == hWnd)
|
||||
{
|
||||
GetClientRect16( hWnd, &rect );
|
||||
SendMessage32A( hWnd, BM_SETSTATE32,
|
||||
PtInRect16( &rect,MAKEPOINT16(lParam) ), 0 );
|
||||
GetClientRect32( hWnd, &rect );
|
||||
SendMessage32A( hWnd, BM_SETSTATE32, PtInRect32(&rect, pt), 0 );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -170,7 +170,7 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
|
|||
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
|
||||
|
||||
case WM_SETTEXT:
|
||||
DEFWND_SetText( wndPtr, (LPSTR)lParam );
|
||||
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
|
||||
if( wndPtr->dwStyle & WS_VISIBLE )
|
||||
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
|
||||
return 0;
|
||||
|
@ -192,7 +192,7 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
|
|||
case WM_KILLFOCUS:
|
||||
infoPtr->state &= ~BUTTON_HASFOCUS;
|
||||
PAINT_BUTTON( wndPtr, style, ODA_FOCUS );
|
||||
InvalidateRect16( hWnd, NULL, TRUE );
|
||||
InvalidateRect32( hWnd, NULL, TRUE );
|
||||
break;
|
||||
|
||||
case WM_SYSCOLORCHANGE:
|
||||
|
@ -299,8 +299,8 @@ static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
/* draw button label, if any: */
|
||||
if (wndPtr->text && wndPtr->text[0])
|
||||
{
|
||||
LOGBRUSH16 lb;
|
||||
GetObject16( GetSysColorBrush32(COLOR_BTNFACE), sizeof(lb), &lb );
|
||||
LOGBRUSH32 lb;
|
||||
GetObject32A( GetSysColorBrush32(COLOR_BTNFACE), sizeof(lb), &lb );
|
||||
if (wndPtr->dwStyle & WS_DISABLED &&
|
||||
GetSysColor32(COLOR_GRAYTEXT)==lb.lbColor)
|
||||
/* don't write gray text on gray bkg */
|
||||
|
@ -346,7 +346,7 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
|
|||
HBITMAP32 hbm = CreateBitmap32( 8, 8, 1, 1, Pattern );
|
||||
HDC32 hdcMem = CreateCompatibleDC32(hDC);
|
||||
HBITMAP32 hbmMem;
|
||||
HBRUSH16 hBr;
|
||||
HBRUSH32 hBr;
|
||||
RECT32 rect,rc2;
|
||||
|
||||
rect=*rc;
|
||||
|
@ -375,13 +375,13 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
|
|||
|
||||
static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
||||
{
|
||||
RECT16 rbox, rtext, client;
|
||||
HBRUSH16 hBrush;
|
||||
RECT32 rbox, rtext, client;
|
||||
HBRUSH32 hBrush;
|
||||
int textlen, delta;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
||||
textlen = 0;
|
||||
GetClientRect16(wndPtr->hwndSelf, &client);
|
||||
GetClientRect32(wndPtr->hwndSelf, &client);
|
||||
rbox = rtext = client;
|
||||
|
||||
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
|
||||
|
@ -415,8 +415,8 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
int x = 0, y = 0;
|
||||
delta = (rbox.bottom - rbox.top - checkBoxHeight) >> 1;
|
||||
|
||||
if (action == ODA_SELECT) FillRect16( hDC, &rbox, hBrush );
|
||||
else FillRect16( hDC, &client, hBrush );
|
||||
if (action == ODA_SELECT) FillRect32( hDC, &rbox, hBrush );
|
||||
else FillRect32( hDC, &client, hBrush );
|
||||
|
||||
if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
|
||||
if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
|
||||
|
@ -430,8 +430,8 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
{
|
||||
if (wndPtr->dwStyle & WS_DISABLED)
|
||||
SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
|
||||
DrawText16( hDC, wndPtr->text, textlen, &rtext,
|
||||
DT_SINGLELINE | DT_VCENTER );
|
||||
DrawText32A( hDC, wndPtr->text, textlen, &rtext,
|
||||
DT_SINGLELINE | DT_VCENTER );
|
||||
textlen = 0; /* skip DrawText() below */
|
||||
}
|
||||
}
|
||||
|
@ -441,17 +441,17 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
{
|
||||
/* again, this is what CTL3D expects */
|
||||
|
||||
SetRectEmpty16(&rbox);
|
||||
SetRectEmpty32(&rbox);
|
||||
if( textlen )
|
||||
DrawText16( hDC, wndPtr->text, textlen, &rbox,
|
||||
DT_SINGLELINE | DT_CALCRECT );
|
||||
DrawText32A( hDC, wndPtr->text, textlen, &rbox,
|
||||
DT_SINGLELINE | DT_CALCRECT );
|
||||
textlen = rbox.bottom - rbox.top;
|
||||
delta = ((rtext.bottom - rtext.top) - textlen)/2;
|
||||
rbox.bottom = (rbox.top = rtext.top + delta - 1) + textlen + 2;
|
||||
textlen = rbox.right - rbox.left;
|
||||
rbox.right = (rbox.left += --rtext.left) + textlen + 2;
|
||||
IntersectRect16(&rbox, &rbox, &rtext);
|
||||
DrawFocusRect16( hDC, &rbox );
|
||||
IntersectRect32(&rbox, &rbox, &rtext);
|
||||
DrawFocusRect32( hDC, &rbox );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,14 +485,14 @@ static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
|
|||
|
||||
static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
||||
{
|
||||
RECT16 rc;
|
||||
RECT32 rc;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
||||
if (action != ODA_DRAWENTIRE) return;
|
||||
|
||||
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||
|
||||
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||
GetClientRect32( wndPtr->hwndSelf, &rc);
|
||||
GRAPH_DrawRectangle( hDC, rc.left, rc.top + 2, rc.right - 1, rc.bottom - 1,
|
||||
GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
if (wndPtr->text)
|
||||
|
@ -501,7 +501,7 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
if (wndPtr->dwStyle & WS_DISABLED)
|
||||
SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
|
||||
rc.left += 10;
|
||||
DrawText16( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
|
||||
DrawText32A( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -512,21 +512,21 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
|
||||
static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
||||
{
|
||||
RECT16 rc;
|
||||
HBRUSH16 hBrush;
|
||||
RECT32 rc;
|
||||
HBRUSH32 hBrush;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
||||
if (action == ODA_SELECT) return;
|
||||
|
||||
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||
GetClientRect32( wndPtr->hwndSelf, &rc);
|
||||
|
||||
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
|
||||
hBrush = GetControlBrush( wndPtr->hwndSelf, hDC, CTLCOLOR_BTN );
|
||||
|
||||
FillRect16( hDC, &rc, hBrush );
|
||||
FillRect32( hDC, &rc, hBrush );
|
||||
if ((action == ODA_FOCUS) ||
|
||||
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
|
||||
DrawFocusRect16( hDC, &rc );
|
||||
DrawFocusRect32( hDC, &rc );
|
||||
}
|
||||
|
||||
|
||||
|
|
146
controls/combo.c
146
controls/combo.c
|
@ -35,9 +35,9 @@
|
|||
#define CB_GETEDITTEXTLENGTH( lphc ) \
|
||||
(SendMessage32A( (lphc)->hWndEdit, WM_GETTEXTLENGTH, 0, 0 ))
|
||||
|
||||
static HBITMAP16 hComboBmp = 0;
|
||||
static UINT16 CBitHeight, CBitWidth;
|
||||
static UINT16 CBitOffset = 8;
|
||||
static HBITMAP32 hComboBmp = 0;
|
||||
static UINT32 CBitHeight, CBitWidth;
|
||||
static UINT32 CBitOffset = 8;
|
||||
|
||||
/***********************************************************************
|
||||
* COMBO_Init
|
||||
|
@ -46,31 +46,31 @@ static UINT16 CBitOffset = 8;
|
|||
*/
|
||||
static BOOL32 COMBO_Init()
|
||||
{
|
||||
HDC16 hDC;
|
||||
HDC32 hDC;
|
||||
|
||||
if( hComboBmp ) return TRUE;
|
||||
if( (hDC = CreateCompatibleDC16(0)) )
|
||||
if( (hDC = CreateCompatibleDC32(0)) )
|
||||
{
|
||||
BOOL32 bRet = FALSE;
|
||||
if( (hComboBmp = LoadBitmap16(0, MAKEINTRESOURCE(OBM_COMBO))) )
|
||||
if( (hComboBmp = LoadBitmap32A(0, MAKEINTRESOURCE(OBM_COMBO))) )
|
||||
{
|
||||
BITMAP16 bm;
|
||||
HBITMAP16 hPrevB;
|
||||
RECT16 r;
|
||||
BITMAP32 bm;
|
||||
HBITMAP32 hPrevB;
|
||||
RECT32 r;
|
||||
|
||||
GetObject16( hComboBmp, sizeof(bm), &bm );
|
||||
GetObject32A( hComboBmp, sizeof(bm), &bm );
|
||||
CBitHeight = bm.bmHeight;
|
||||
CBitWidth = bm.bmWidth;
|
||||
|
||||
TRACE(combo, "combo bitmap [%i,%i]\n", CBitWidth, CBitHeight );
|
||||
|
||||
hPrevB = SelectObject16( hDC, hComboBmp);
|
||||
SetRect16( &r, 0, 0, CBitWidth, CBitHeight );
|
||||
InvertRect16( hDC, &r );
|
||||
SelectObject16( hDC, hPrevB );
|
||||
SetRect32( &r, 0, 0, CBitWidth, CBitHeight );
|
||||
InvertRect32( hDC, &r );
|
||||
SelectObject32( hDC, hPrevB );
|
||||
bRet = TRUE;
|
||||
}
|
||||
DeleteDC16( hDC );
|
||||
DeleteDC32( hDC );
|
||||
return bRet;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -135,35 +135,35 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc )
|
|||
*
|
||||
* Set up component coordinates given valid lphc->RectCombo.
|
||||
*/
|
||||
static void CBCalcPlacement( LPHEADCOMBO lphc,
|
||||
LPRECT16 lprEdit, LPRECT16 lprButton, LPRECT16 lprLB )
|
||||
static void CBCalcPlacement( LPHEADCOMBO lphc, LPRECT32 lprEdit,
|
||||
LPRECT32 lprButton, LPRECT32 lprLB )
|
||||
{
|
||||
RECT16 rect = lphc->RectCombo;
|
||||
SIZE16 size;
|
||||
RECT32 rect = lphc->RectCombo;
|
||||
SIZE32 size;
|
||||
|
||||
/* get combo height and width */
|
||||
|
||||
if( lphc->editHeight )
|
||||
size.cy = (INT16)lphc->editHeight;
|
||||
size.cy = lphc->editHeight;
|
||||
else
|
||||
{
|
||||
HDC16 hDC = GetDC16( lphc->self->hwndSelf );
|
||||
HFONT16 hPrevFont = (HFONT16)0;
|
||||
HDC32 hDC = GetDC32( lphc->self->hwndSelf );
|
||||
HFONT32 hPrevFont = 0;
|
||||
|
||||
if( lphc->hFont ) hPrevFont = SelectObject16( hDC, lphc->hFont );
|
||||
if( lphc->hFont ) hPrevFont = SelectObject32( hDC, lphc->hFont );
|
||||
|
||||
GetTextExtentPoint16( hDC, "0", 1, &size);
|
||||
GetTextExtentPoint32A( hDC, "0", 1, &size);
|
||||
|
||||
size.cy += size.cy / 4 + 4 * SYSMETRICS_CYBORDER;
|
||||
|
||||
if( hPrevFont ) SelectObject16( hDC, hPrevFont );
|
||||
ReleaseDC16( lphc->self->hwndSelf, hDC );
|
||||
if( hPrevFont ) SelectObject32( hDC, hPrevFont );
|
||||
ReleaseDC32( lphc->self->hwndSelf, hDC );
|
||||
}
|
||||
size.cx = rect.right - rect.left;
|
||||
|
||||
if( CB_OWNERDRAWN(lphc) )
|
||||
{
|
||||
UINT16 u = lphc->RectEdit.bottom - lphc->RectEdit.top;
|
||||
UINT32 u = lphc->RectEdit.bottom - lphc->RectEdit.top;
|
||||
|
||||
if( lphc->wState & CBF_MEASUREITEM ) /* first initialization */
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ static void CBCalcPlacement( LPHEADCOMBO lphc,
|
|||
lprButton->bottom = lprButton->top + size.cy;
|
||||
|
||||
if( i < 0 ) size.cx = 0;
|
||||
else size.cx = (INT16)i;
|
||||
else size.cx = i;
|
||||
}
|
||||
|
||||
if( CB_GETTYPE(lphc) == CBS_DROPDOWN )
|
||||
|
@ -216,7 +216,7 @@ static void CBCalcPlacement( LPHEADCOMBO lphc,
|
|||
lprLB->bottom = rect.bottom - rect.top;
|
||||
|
||||
if( lphc->droppedWidth > (lprLB->right - lprLB->left) )
|
||||
lprLB->right = lprLB->left + (INT16)lphc->droppedWidth;
|
||||
lprLB->right = lprLB->left + lphc->droppedWidth;
|
||||
|
||||
TRACE(combo,"[%04x]: (%i,%i-%i,%i) placement\n",
|
||||
CB_HWND(lphc), lphc->RectCombo.left, lphc->RectCombo.top,
|
||||
|
@ -266,9 +266,9 @@ static LRESULT COMBO_Create( LPHEADCOMBO lphc, WND* wnd, LPARAM lParam)
|
|||
if( lphc->owner || !(lpcs->style & WS_VISIBLE) )
|
||||
{
|
||||
UINT32 lbeStyle;
|
||||
RECT16 editRect, btnRect, lbRect;
|
||||
RECT32 editRect, btnRect, lbRect;
|
||||
|
||||
GetWindowRect16( wnd->hwndSelf, &lphc->RectCombo );
|
||||
GetWindowRect32( wnd->hwndSelf, &lphc->RectCombo );
|
||||
|
||||
lphc->wState |= CBF_MEASUREITEM;
|
||||
CBCalcPlacement( lphc, &editRect, &btnRect, &lbRect );
|
||||
|
@ -294,7 +294,7 @@ static LRESULT COMBO_Create( LPHEADCOMBO lphc, WND* wnd, LPARAM lParam)
|
|||
else /* popup listbox */
|
||||
{
|
||||
lbeStyle |= WS_POPUP;
|
||||
OffsetRect16( &lbRect, lphc->RectCombo.left, lphc->RectCombo.top );
|
||||
OffsetRect32( &lbRect, lphc->RectCombo.left, lphc->RectCombo.top );
|
||||
}
|
||||
|
||||
/* Dropdown ComboLBox is not a child window and we cannot pass
|
||||
|
@ -359,7 +359,7 @@ static LRESULT COMBO_Create( LPHEADCOMBO lphc, WND* wnd, LPARAM lParam)
|
|||
*
|
||||
* Paint combo button (normal, pressed, and disabled states).
|
||||
*/
|
||||
static void CBPaintButton(LPHEADCOMBO lphc, HDC16 hdc)
|
||||
static void CBPaintButton(LPHEADCOMBO lphc, HDC32 hdc)
|
||||
{
|
||||
RECT32 r;
|
||||
HBRUSH32 hPrevBrush;
|
||||
|
@ -401,7 +401,7 @@ static void CBPaintButton(LPHEADCOMBO lphc, HDC16 hdc)
|
|||
*
|
||||
* Paint CBS_DROPDOWNLIST text field / update edit control contents.
|
||||
*/
|
||||
static void CBPaintText(LPHEADCOMBO lphc, HDC16 hdc)
|
||||
static void CBPaintText(LPHEADCOMBO lphc, HDC32 hdc)
|
||||
{
|
||||
INT32 id, size = 0;
|
||||
LPSTR pText = NULL;
|
||||
|
@ -446,7 +446,7 @@ static void CBPaintText(LPHEADCOMBO lphc, HDC16 hdc)
|
|||
if( hDC )
|
||||
{
|
||||
RECT32 rect;
|
||||
UINT16 itemState;
|
||||
UINT32 itemState;
|
||||
HFONT32 hPrevFont = (lphc->hFont) ? SelectObject32(hDC, lphc->hFont) : 0;
|
||||
|
||||
PatBlt32( hDC, (rect.left = lphc->RectEdit.left + SYSMETRICS_CXBORDER),
|
||||
|
@ -508,13 +508,13 @@ static void CBPaintText(LPHEADCOMBO lphc, HDC16 hdc)
|
|||
/***********************************************************************
|
||||
* COMBO_Paint
|
||||
*/
|
||||
static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC16 hParamDC)
|
||||
static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC32 hParamDC)
|
||||
{
|
||||
PAINTSTRUCT16 ps;
|
||||
HDC16 hDC;
|
||||
PAINTSTRUCT32 ps;
|
||||
HDC32 hDC;
|
||||
|
||||
hDC = (hParamDC) ? hParamDC
|
||||
: BeginPaint16( lphc->self->hwndSelf, &ps);
|
||||
: BeginPaint32( lphc->self->hwndSelf, &ps);
|
||||
if( hDC && !(lphc->wState & CBF_NOREDRAW) )
|
||||
{
|
||||
HBRUSH32 hPrevBrush, hBkgBrush;
|
||||
|
@ -524,7 +524,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC16 hParamDC)
|
|||
if( !hBkgBrush ) hBkgBrush = GetStockObject32(WHITE_BRUSH);
|
||||
|
||||
hPrevBrush = SelectObject32( hDC, hBkgBrush );
|
||||
if( !IsRectEmpty16(&lphc->RectButton) )
|
||||
if( !IsRectEmpty32(&lphc->RectButton) )
|
||||
{
|
||||
/* paint everything to the right of the text field */
|
||||
|
||||
|
@ -546,7 +546,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC16 hParamDC)
|
|||
}
|
||||
if( hPrevBrush ) SelectObject32( hDC, hPrevBrush );
|
||||
}
|
||||
if( !hParamDC ) EndPaint16(lphc->self->hwndSelf, &ps);
|
||||
if( !hParamDC ) EndPaint32(lphc->self->hwndSelf, &ps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -644,8 +644,8 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT32 index )
|
|||
static void CBDropDown( LPHEADCOMBO lphc )
|
||||
{
|
||||
INT32 index;
|
||||
RECT16 rect;
|
||||
LPRECT16 pRect = NULL;
|
||||
RECT32 rect;
|
||||
LPRECT32 pRect = NULL;
|
||||
|
||||
TRACE(combo,"[%04x]: drop down\n", CB_HWND(lphc));
|
||||
|
||||
|
@ -670,7 +670,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
|
|||
|
||||
/* now set popup position */
|
||||
|
||||
GetWindowRect16( lphc->self->hwndSelf, &rect );
|
||||
GetWindowRect32( lphc->self->hwndSelf, &rect );
|
||||
|
||||
rect.top += lphc->RectEdit.bottom - lphc->RectEdit.top - SYSMETRICS_CYBORDER;
|
||||
rect.bottom = rect.top + lphc->RectCombo.bottom -
|
||||
|
@ -684,7 +684,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
|
|||
|
||||
if( !(lphc->wState & CBF_NOREDRAW) )
|
||||
if( pRect )
|
||||
RedrawWindow16( lphc->self->hwndSelf, pRect, 0, RDW_INVALIDATE |
|
||||
RedrawWindow32( lphc->self->hwndSelf, pRect, 0, RDW_INVALIDATE |
|
||||
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
|
||||
ShowWindow32( lphc->hWndLBox, SW_SHOWNA );
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL32 ok, BOOL32 bButton )
|
|||
|
||||
if( lphc->wState & CBF_DROPPED )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
|
||||
lphc->wState &= ~CBF_DROPPED;
|
||||
ShowWindow32( lphc->hWndLBox, SW_HIDE );
|
||||
|
@ -724,7 +724,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL32 ok, BOOL32 bButton )
|
|||
else
|
||||
{
|
||||
if( bButton )
|
||||
UnionRect16( &rect, &lphc->RectButton,
|
||||
UnionRect32( &rect, &lphc->RectButton,
|
||||
&lphc->RectEdit );
|
||||
else
|
||||
rect = lphc->RectEdit;
|
||||
|
@ -732,7 +732,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL32 ok, BOOL32 bButton )
|
|||
}
|
||||
|
||||
if( bButton && !(lphc->wState & CBF_NOREDRAW) )
|
||||
RedrawWindow16( hWnd, &rect, 0, RDW_INVALIDATE |
|
||||
RedrawWindow32( hWnd, &rect, 0, RDW_INVALIDATE |
|
||||
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
|
||||
CB_NOTIFY( lphc, CBN_CLOSEUP );
|
||||
}
|
||||
|
@ -778,7 +778,7 @@ static void CBRepaintButton( LPHEADCOMBO lphc )
|
|||
|
||||
if( hDC )
|
||||
{
|
||||
CBPaintButton( lphc, (HDC16)hDC );
|
||||
CBPaintButton( lphc, hDC );
|
||||
ReleaseDC32( lphc->self->hwndSelf, hDC );
|
||||
}
|
||||
}
|
||||
|
@ -845,7 +845,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM32 wParam, HWND32 hWnd )
|
|||
case (EN_SETFOCUS >> 8):
|
||||
|
||||
TRACE(combo,"[%04x]: edit [%04x] got focus\n",
|
||||
CB_HWND(lphc), (HWND16)lphc->hWndEdit );
|
||||
CB_HWND(lphc), lphc->hWndEdit );
|
||||
|
||||
if( !(lphc->wState & CBF_FOCUSED) ) COMBO_SetFocus( lphc );
|
||||
break;
|
||||
|
@ -853,7 +853,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM32 wParam, HWND32 hWnd )
|
|||
case (EN_KILLFOCUS >> 8):
|
||||
|
||||
TRACE(combo,"[%04x]: edit [%04x] lost focus\n",
|
||||
CB_HWND(lphc), (HWND16)lphc->hWndEdit );
|
||||
CB_HWND(lphc), lphc->hWndEdit );
|
||||
|
||||
/* NOTE: it seems that Windows' edit control sends an
|
||||
* undocumented message WM_USER + 0x1B instead of this
|
||||
|
@ -927,8 +927,7 @@ static LRESULT COMBO_ItemOp32( LPHEADCOMBO lphc, UINT32 msg,
|
|||
{
|
||||
HWND32 hWnd = lphc->self->hwndSelf;
|
||||
|
||||
TRACE(combo,"[%04x]: ownerdraw op %04x\n",
|
||||
CB_HWND(lphc), (UINT16)msg );
|
||||
TRACE(combo,"[%04x]: ownerdraw op %04x\n", CB_HWND(lphc), msg );
|
||||
|
||||
#define lpIS ((LPDELETEITEMSTRUCT32)lParam)
|
||||
|
||||
|
@ -1010,7 +1009,7 @@ static LRESULT COMBO_GetText( LPHEADCOMBO lphc, UINT32 N, LPSTR lpText)
|
|||
* This function sets window positions according to the updated
|
||||
* component placement struct.
|
||||
*/
|
||||
static void CBResetPos( LPHEADCOMBO lphc, LPRECT16 lbRect, BOOL32 bRedraw )
|
||||
static void CBResetPos( LPHEADCOMBO lphc, LPRECT32 lbRect, BOOL32 bRedraw )
|
||||
{
|
||||
BOOL32 bDrop = (CB_GETTYPE(lphc) != CBS_SIMPLE);
|
||||
|
||||
|
@ -1024,7 +1023,7 @@ static void CBResetPos( LPHEADCOMBO lphc, LPRECT16 lbRect, BOOL32 bRedraw )
|
|||
SWP_NOZORDER | SWP_NOACTIVATE | ((bDrop) ? SWP_NOREDRAW : 0) );
|
||||
|
||||
if( bDrop )
|
||||
OffsetRect16( lbRect, lphc->RectCombo.left, lphc->RectCombo.top );
|
||||
OffsetRect32( lbRect, lphc->RectCombo.left, lphc->RectCombo.top );
|
||||
|
||||
lbRect->right -= lbRect->left; /* convert to width */
|
||||
lbRect->bottom -= lbRect->top;
|
||||
|
@ -1059,10 +1058,10 @@ static void CBResetPos( LPHEADCOMBO lphc, LPRECT16 lbRect, BOOL32 bRedraw )
|
|||
*/
|
||||
static void COMBO_Size( LPHEADCOMBO lphc )
|
||||
{
|
||||
RECT16 rect;
|
||||
INT16 w, h;
|
||||
RECT32 rect;
|
||||
INT32 w, h;
|
||||
|
||||
GetWindowRect16( lphc->self->hwndSelf, &rect );
|
||||
GetWindowRect32( lphc->self->hwndSelf, &rect );
|
||||
w = rect.right - rect.left; h = rect.bottom - rect.top;
|
||||
|
||||
TRACE(combo,"w = %i, h = %i\n", w, h );
|
||||
|
@ -1086,9 +1085,9 @@ static void COMBO_Size( LPHEADCOMBO lphc )
|
|||
/***********************************************************************
|
||||
* COMBO_Font
|
||||
*/
|
||||
static void COMBO_Font( LPHEADCOMBO lphc, HFONT16 hFont, BOOL32 bRedraw )
|
||||
static void COMBO_Font( LPHEADCOMBO lphc, HFONT32 hFont, BOOL32 bRedraw )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
|
||||
lphc->hFont = hFont;
|
||||
|
||||
|
@ -1096,8 +1095,8 @@ static void COMBO_Font( LPHEADCOMBO lphc, HFONT16 hFont, BOOL32 bRedraw )
|
|||
SendMessage32A( lphc->hWndEdit, WM_SETFONT, (WPARAM32)hFont, bRedraw );
|
||||
SendMessage32A( lphc->hWndLBox, WM_SETFONT, (WPARAM32)hFont, bRedraw );
|
||||
|
||||
GetWindowRect16( lphc->self->hwndSelf, &rect );
|
||||
OffsetRect16( &lphc->RectCombo, rect.left - lphc->RectCombo.left,
|
||||
GetWindowRect32( lphc->self->hwndSelf, &rect );
|
||||
OffsetRect32( &lphc->RectCombo, rect.left - lphc->RectCombo.left,
|
||||
rect.top - lphc->RectCombo.top );
|
||||
CBCalcPlacement( lphc, &lphc->RectEdit,
|
||||
&lphc->RectButton, &rect );
|
||||
|
@ -1116,11 +1115,11 @@ static LRESULT COMBO_SetItemHeight( LPHEADCOMBO lphc, INT32 index, INT32 height
|
|||
{
|
||||
if( height < 32768 )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
|
||||
lphc->editHeight = height;
|
||||
GetWindowRect16( lphc->self->hwndSelf, &rect );
|
||||
OffsetRect16( &lphc->RectCombo, rect.left - lphc->RectCombo.left,
|
||||
GetWindowRect32( lphc->self->hwndSelf, &rect );
|
||||
OffsetRect32( &lphc->RectCombo, rect.left - lphc->RectCombo.left,
|
||||
rect.top - lphc->RectCombo.top );
|
||||
CBCalcPlacement( lphc, &lphc->RectEdit,
|
||||
&lphc->RectButton, &rect );
|
||||
|
@ -1154,7 +1153,8 @@ static LRESULT COMBO_SelectString( LPHEADCOMBO lphc, INT32 start, LPCSTR pText )
|
|||
*/
|
||||
static void COMBO_LButtonDown( LPHEADCOMBO lphc, LPARAM lParam )
|
||||
{
|
||||
BOOL32 bButton = PtInRect16(&lphc->RectButton, MAKEPOINT16(lParam));
|
||||
POINT32 pt = { LOWORD(lParam), HIWORD(lParam) };
|
||||
BOOL32 bButton = PtInRect32(&lphc->RectButton, pt);
|
||||
HWND32 hWnd = lphc->self->hwndSelf;
|
||||
|
||||
if( (CB_GETTYPE(lphc) == CBS_DROPDOWNLIST) ||
|
||||
|
@ -1220,11 +1220,12 @@ static void COMBO_LButtonUp( LPHEADCOMBO lphc, LPARAM lParam )
|
|||
*/
|
||||
static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM32 wParam, LPARAM lParam )
|
||||
{
|
||||
RECT16 lbRect;
|
||||
POINT32 pt = { LOWORD(lParam), HIWORD(lParam) };
|
||||
RECT32 lbRect;
|
||||
|
||||
if( lphc->wState & CBF_BUTTONDOWN )
|
||||
{
|
||||
BOOL32 bButton = PtInRect16(&lphc->RectButton, MAKEPOINT16(lParam));
|
||||
BOOL32 bButton = PtInRect32(&lphc->RectButton, pt);
|
||||
|
||||
if( !bButton )
|
||||
{
|
||||
|
@ -1233,10 +1234,9 @@ static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM32 wParam, LPARAM lParam )
|
|||
}
|
||||
}
|
||||
|
||||
GetClientRect16( lphc->hWndLBox, &lbRect );
|
||||
MapWindowPoints16( lphc->self->hwndSelf,
|
||||
lphc->hWndLBox, (LPPOINT16)&lParam, 1 );
|
||||
if( PtInRect16(&lbRect, MAKEPOINT16(lParam)) )
|
||||
GetClientRect32( lphc->hWndLBox, &lbRect );
|
||||
MapWindowPoints32( lphc->self->hwndSelf, lphc->hWndLBox, &pt, 1 );
|
||||
if( PtInRect32(&lbRect, pt) )
|
||||
{
|
||||
lphc->wState &= ~CBF_CAPTURE;
|
||||
ReleaseCapture();
|
||||
|
@ -1283,7 +1283,7 @@ LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 message,
|
|||
|
||||
case WM_PAINT:
|
||||
/* wParam may contain a valid HDC! */
|
||||
return COMBO_Paint(lphc, (HDC16)wParam);
|
||||
return COMBO_Paint(lphc, wParam);
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return TRUE;
|
||||
|
@ -1564,7 +1564,7 @@ LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 message,
|
|||
return (lphc->wState & CBF_EUI) ? TRUE : FALSE;
|
||||
|
||||
case (WM_USER + 0x1B):
|
||||
WARN(combo, "[%04x]: undocumented msg!\n", (HWND16)hwnd );
|
||||
WARN(combo, "[%04x]: undocumented msg!\n", hwnd );
|
||||
}
|
||||
return DefWindowProc32A(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ void WINAPI InitCommonControls(void)
|
|||
old_name = class32->lpszClassName;
|
||||
strcpy( name, (char *)class32->lpszClassName );
|
||||
class32->lpszClassName = name;
|
||||
class32->hCursor = LoadCursor16( 0, IDC_ARROW );
|
||||
class32->hCursor = LoadCursor32A( 0, (LPCSTR)IDC_ARROW );
|
||||
RegisterClass32A( class32 );
|
||||
class32->lpszClassName = old_name;
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ LRESULT WINAPI DesktopWndProc( HWND32 hwnd, UINT32 message,
|
|||
infoPtr->hbitmapWallPaper = 0;
|
||||
SetDeskPattern();
|
||||
SetDeskWallPaper32( (LPSTR)-1 );
|
||||
break;
|
||||
return 1;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
if (rootWindow == DefaultRootWindow(display)) return 1;
|
||||
|
|
|
@ -24,11 +24,11 @@ static LPCSTR emptyTitleText = "<...>";
|
|||
*/
|
||||
BOOL32 ICONTITLE_Init(void)
|
||||
{
|
||||
LOGFONT16 logFont;
|
||||
LOGFONT32A logFont;
|
||||
|
||||
SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
|
||||
SystemParametersInfo16( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
|
||||
hIconTitleFont = CreateFontIndirect16( &logFont );
|
||||
SystemParametersInfo32A( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
|
||||
SystemParametersInfo32A( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
|
||||
hIconTitleFont = CreateFontIndirect32A( &logFont );
|
||||
return (hIconTitleFont) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
|
|||
hPrevFont = SelectObject32( hDC, hIconTitleFont );
|
||||
if( hPrevFont )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
INT32 length;
|
||||
char buffer[80];
|
||||
|
||||
|
@ -173,8 +173,8 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
|
|||
SetTextColor32( hDC, textColor );
|
||||
SetBkMode32( hDC, TRANSPARENT );
|
||||
|
||||
DrawText16( hDC, buffer, length, &rect, DT_CENTER | DT_NOPREFIX |
|
||||
DT_WORDBREAK | ((bMultiLineTitle) ? 0 : DT_SINGLELINE) );
|
||||
DrawText32A( hDC, buffer, length, &rect, DT_CENTER | DT_NOPREFIX |
|
||||
DT_WORDBREAK | ((bMultiLineTitle) ? 0 : DT_SINGLELINE) );
|
||||
|
||||
SelectObject32( hDC, hPrevFont );
|
||||
}
|
||||
|
|
|
@ -100,14 +100,14 @@ void LISTBOX_Dump( WND *wnd )
|
|||
LB_ITEMDATA *item;
|
||||
LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra;
|
||||
|
||||
printf( "Listbox:\n" );
|
||||
printf( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
|
||||
wnd->hwndSelf, (UINT32)descr, descr->heap, descr->nb_items,
|
||||
descr->top_item );
|
||||
DUMP( "Listbox:\n" );
|
||||
DUMP( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
|
||||
wnd->hwndSelf, (UINT32)descr, descr->heap, descr->nb_items,
|
||||
descr->top_item );
|
||||
for (i = 0, item = descr->items; i < descr->nb_items; i++, item++)
|
||||
{
|
||||
printf( "%4d: %-40s %d %08lx %3d\n",
|
||||
i, item->str, item->selected, item->data, item->height );
|
||||
DUMP( "%4d: %-40s %d %08lx %3d\n",
|
||||
i, item->str, item->selected, item->data, item->height );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2607,15 +2607,18 @@ LRESULT WINAPI PopupMenuWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
|
|||
/* zero out global pointer in case resident popup window
|
||||
* was somehow destroyed. */
|
||||
|
||||
if( hwnd == pTopPopupWnd->hwndSelf )
|
||||
{
|
||||
ERR(menu, "resident popup destroyed!\n");
|
||||
if( pTopPopupWnd )
|
||||
{
|
||||
if( hwnd == pTopPopupWnd->hwndSelf )
|
||||
{
|
||||
ERR(menu, "resident popup destroyed!\n");
|
||||
|
||||
pTopPopupWnd = NULL;
|
||||
uSubPWndLevel = 0;
|
||||
pTopPopupWnd = NULL;
|
||||
uSubPWndLevel = 0;
|
||||
}
|
||||
else
|
||||
uSubPWndLevel--;
|
||||
}
|
||||
else
|
||||
uSubPWndLevel--;
|
||||
break;
|
||||
|
||||
case WM_SHOWWINDOW:
|
||||
|
|
|
@ -81,18 +81,18 @@ static BOOL32 SCROLL_MovingThumb = FALSE;
|
|||
*/
|
||||
static void SCROLL_LoadBitmaps(void)
|
||||
{
|
||||
hUpArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_UPARROW) );
|
||||
hDnArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_DNARROW) );
|
||||
hLfArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_LFARROW) );
|
||||
hRgArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_RGARROW) );
|
||||
hUpArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_UPARROWD) );
|
||||
hDnArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_DNARROWD) );
|
||||
hLfArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_LFARROWD) );
|
||||
hRgArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_RGARROWD) );
|
||||
hUpArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_UPARROWI) );
|
||||
hDnArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_DNARROWI) );
|
||||
hLfArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_LFARROWI) );
|
||||
hRgArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_RGARROWI) );
|
||||
hUpArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_UPARROW) );
|
||||
hDnArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_DNARROW) );
|
||||
hLfArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_LFARROW) );
|
||||
hRgArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_RGARROW) );
|
||||
hUpArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_UPARROWD) );
|
||||
hDnArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_DNARROWD) );
|
||||
hLfArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_LFARROWD) );
|
||||
hRgArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_RGARROWD) );
|
||||
hUpArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_UPARROWI) );
|
||||
hDnArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_DNARROWI) );
|
||||
hLfArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_LFARROWI) );
|
||||
hRgArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_RGARROWI) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,20 +92,14 @@ static const char LTRBInnerFlat[] = {
|
|||
/***********************************************************************
|
||||
* UITOOLS_DrawDiagEdge
|
||||
*
|
||||
* Same as DrawEdge, but with BF_DIAGONAL
|
||||
* I tested it extensively and as far as I can tell it is identical to the
|
||||
* implementaion in Win95.
|
||||
* I do not like that I create and
|
||||
* use the 3 Pens to draw the diagonals. It would be better to draw them
|
||||
* using the brushes returned by GetSysColorBrush func, but I did not have
|
||||
* the patience to implement that yet.
|
||||
*/
|
||||
/*********************************************************************
|
||||
* Same as DrawEdge invoked with BF_DIAGONAL
|
||||
*
|
||||
* 03-Dec-1997: Changed by Bertho Stultiens
|
||||
*
|
||||
* See also comments with UITOOLS_DrawRectEdge()
|
||||
*/
|
||||
static BOOL32 UITOOLS_DrawDiagEdge(HDC32 hdc, LPRECT32 rc, UINT32 uType, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DrawDiagEdge(HDC32 hdc, LPRECT32 rc,
|
||||
UINT32 uType, UINT32 uFlags)
|
||||
{
|
||||
POINT32 Points[4];
|
||||
char InnerI, OuterI;
|
||||
|
@ -346,15 +340,8 @@ static BOOL32 UITOOLS_DrawDiagEdge(HDC32 hdc, LPRECT32 rc, UINT32 uType, UINT32
|
|||
/***********************************************************************
|
||||
* UITOOLS_DrawRectEdge
|
||||
*
|
||||
* Same as DrawEdge, but without BF_DIAGONAL
|
||||
* I tested this function and it works very well. You should not change it
|
||||
* unless you find a bug. If you don't like the colors, it it not its
|
||||
* fault - the system colors are not OK.
|
||||
* Again, I tested this function on Win95 and I compared the output with the
|
||||
* one generated by the native DrawEdge and it is identical on all cases that
|
||||
* I tried, and I tried quite a few.
|
||||
*/
|
||||
/*********************************************************************
|
||||
* Same as DrawEdge invoked without BF_DIAGONAL
|
||||
*
|
||||
* 23-Nov-1997: Changed by Bertho Stultiens
|
||||
*
|
||||
* Well, I started testing this and found out that there are a few things
|
||||
|
@ -424,7 +411,8 @@ static BOOL32 UITOOLS_DrawDiagEdge(HDC32 hdc, LPRECT32 rc, UINT32 uType, UINT32
|
|||
*/
|
||||
|
||||
|
||||
static BOOL32 UITOOLS_DrawRectEdge(HDC32 hdc, LPRECT32 rc, UINT32 uType, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DrawRectEdge(HDC32 hdc, LPRECT32 rc,
|
||||
UINT32 uType, UINT32 uFlags)
|
||||
{
|
||||
char LTInnerI, LTOuterI;
|
||||
char RBInnerI, RBOuterI;
|
||||
|
@ -575,13 +563,12 @@ BOOL16 WINAPI DrawEdge16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
|
|||
BOOL32 WINAPI DrawEdge32( HDC32 hdc, LPRECT32 rc, UINT32 edge, UINT32 flags )
|
||||
{
|
||||
TRACE(graphics, "%04x %d,%d-%d,%d %04x %04x\n",
|
||||
hdc, rc->left, rc->top, rc->right, rc->bottom,
|
||||
edge, flags );
|
||||
hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
|
||||
|
||||
if(flags & BF_DIAGONAL)
|
||||
return UITOOLS_DrawDiagEdge(hdc, rc, edge, flags);
|
||||
return UITOOLS95_DrawDiagEdge(hdc, rc, edge, flags);
|
||||
else
|
||||
return UITOOLS_DrawRectEdge(hdc, rc, edge, flags);
|
||||
return UITOOLS95_DrawRectEdge(hdc, rc, edge, flags);
|
||||
}
|
||||
|
||||
|
||||
|
@ -623,7 +610,7 @@ static int UITOOLS_MakeSquareRect(LPRECT32 src, LPRECT32 dst)
|
|||
* however there because MS uses a TrueType font (Marlett) to draw
|
||||
* the buttons.
|
||||
*/
|
||||
static BOOL32 UITOOLS_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
{
|
||||
UINT32 edge;
|
||||
RECT32 myr = *r;
|
||||
|
@ -636,9 +623,9 @@ static BOOL32 UITOOLS_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
if(uFlags & DFCS_CHECKED)
|
||||
{
|
||||
if(uFlags & DFCS_MONO)
|
||||
UITOOLS_DrawRectEdge(dc, &myr, edge, BF_MONO|BF_RECT|BF_ADJUST);
|
||||
UITOOLS95_DrawRectEdge(dc, &myr, edge, BF_MONO|BF_RECT|BF_ADJUST);
|
||||
else
|
||||
UITOOLS_DrawRectEdge(dc, &myr, edge, (uFlags&DFCS_FLAT)|BF_RECT|BF_SOFT|BF_ADJUST);
|
||||
UITOOLS95_DrawRectEdge(dc, &myr, edge, (uFlags&DFCS_FLAT)|BF_RECT|BF_SOFT|BF_ADJUST);
|
||||
|
||||
if(GetSysColor32(COLOR_BTNHIGHLIGHT) == RGB(255, 255, 255))
|
||||
{
|
||||
|
@ -662,12 +649,12 @@ static BOOL32 UITOOLS_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
{
|
||||
if(uFlags & DFCS_MONO)
|
||||
{
|
||||
UITOOLS_DrawRectEdge(dc, &myr, edge, BF_MONO|BF_RECT|BF_ADJUST);
|
||||
UITOOLS95_DrawRectEdge(dc, &myr, edge, BF_MONO|BF_RECT|BF_ADJUST);
|
||||
FillRect32(dc, &myr, GetSysColorBrush32(COLOR_BTNFACE));
|
||||
}
|
||||
else
|
||||
{
|
||||
UITOOLS_DrawRectEdge(dc, r, edge, (uFlags&DFCS_FLAT) | BF_MIDDLE |BF_SOFT| BF_RECT);
|
||||
UITOOLS95_DrawRectEdge(dc, r, edge, (uFlags&DFCS_FLAT) | BF_MIDDLE |BF_SOFT| BF_RECT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -695,7 +682,7 @@ static BOOL32 UITOOLS_DFC_ButtonPush(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
*/
|
||||
#define DFC_CHECKPOINTSMAX 6
|
||||
|
||||
static BOOL32 UITOOLS_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
{
|
||||
RECT32 myr;
|
||||
int SmallDiam = UITOOLS_MakeSquareRect(r, &myr);
|
||||
|
@ -803,7 +790,7 @@ static BOOL32 UITOOLS_DFC_ButtonCheck(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
* however there because MS uses a TrueType font (Marlett) to draw
|
||||
* the buttons.
|
||||
*/
|
||||
static BOOL32 UITOOLS_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
{
|
||||
RECT32 myr;
|
||||
int i;
|
||||
|
@ -924,24 +911,24 @@ static BOOL32 UITOOLS_DFC_ButtonRadio(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
/***********************************************************************
|
||||
* UITOOLS_DrawFrameButton
|
||||
*/
|
||||
static BOOL32 UITOOLS_DrawFrameButton(HDC32 hdc, LPRECT32 rc, UINT32 uState)
|
||||
static BOOL32 UITOOLS95_DrawFrameButton(HDC32 hdc, LPRECT32 rc, UINT32 uState)
|
||||
{
|
||||
switch(uState & 0xff)
|
||||
{
|
||||
case DFCS_BUTTONPUSH:
|
||||
return UITOOLS_DFC_ButtonPush(hdc, rc, uState);
|
||||
return UITOOLS95_DFC_ButtonPush(hdc, rc, uState);
|
||||
|
||||
case DFCS_BUTTONCHECK:
|
||||
case DFCS_BUTTON3STATE:
|
||||
return UITOOLS_DFC_ButtonCheck(hdc, rc, uState);
|
||||
return UITOOLS95_DFC_ButtonCheck(hdc, rc, uState);
|
||||
|
||||
case DFCS_BUTTONRADIOIMAGE:
|
||||
case DFCS_BUTTONRADIOMASK:
|
||||
case DFCS_BUTTONRADIO:
|
||||
return UITOOLS_DFC_ButtonRadio(hdc, rc, uState);
|
||||
return UITOOLS95_DFC_ButtonRadio(hdc, rc, uState);
|
||||
|
||||
default:
|
||||
WARN(uitools, "Invalid button state: 0x%04x\n", uState);
|
||||
WARN(uitools, "Invalid button state=0x%04x\n", uState);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -953,7 +940,7 @@ static BOOL32 UITOOLS_DrawFrameButton(HDC32 hdc, LPRECT32 rc, UINT32 uState)
|
|||
* Draw caption buttons (win95), coming from DrawFrameControl()
|
||||
*/
|
||||
|
||||
static BOOL32 UITOOLS_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
{
|
||||
POINT32 Line1[10];
|
||||
POINT32 Line2[10];
|
||||
|
@ -974,7 +961,7 @@ static BOOL32 UITOOLS_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
COLORREF clrsave;
|
||||
SIZE32 size;
|
||||
|
||||
UITOOLS_DFC_ButtonPush(dc, r, uFlags & 0xff00);
|
||||
UITOOLS95_DFC_ButtonPush(dc, r, uFlags & 0xff00);
|
||||
|
||||
switch(uFlags & 0xff)
|
||||
{
|
||||
|
@ -1077,7 +1064,7 @@ static BOOL32 UITOOLS_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
break;
|
||||
|
||||
default:
|
||||
WARN(uitools, "Invalid caption; flags: 0x%04x\n", uFlags);
|
||||
WARN(uitools, "Invalid caption; flags=0x%04x\n", uFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1126,7 +1113,7 @@ static BOOL32 UITOOLS_DrawFrameCaption(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
*
|
||||
* Draw a scroll-bar control coming from DrawFrameControl()
|
||||
*/
|
||||
static BOOL32 UITOOLS_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
{
|
||||
POINT32 Line[4];
|
||||
RECT32 myr;
|
||||
|
@ -1174,7 +1161,7 @@ static BOOL32 UITOOLS_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
|
||||
case DFCS_SCROLLSIZEGRIP:
|
||||
/* This one breaks the flow... */
|
||||
UITOOLS_DrawRectEdge(dc, r, EDGE_BUMP, BF_MIDDLE | ((uFlags&(DFCS_MONO|DFCS_FLAT)) ? BF_MONO : 0));
|
||||
UITOOLS95_DrawRectEdge(dc, r, EDGE_BUMP, BF_MIDDLE | ((uFlags&(DFCS_MONO|DFCS_FLAT)) ? BF_MONO : 0));
|
||||
hpsave = (HPEN32)SelectObject32(dc, GetStockObject32(NULL_PEN));
|
||||
hbsave = (HBRUSH32)SelectObject32(dc, GetStockObject32(NULL_BRUSH));
|
||||
if(uFlags & (DFCS_MONO|DFCS_FLAT))
|
||||
|
@ -1247,12 +1234,12 @@ static BOOL32 UITOOLS_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
return TRUE;
|
||||
|
||||
default:
|
||||
WARN(uitools, "Invalid scroll; flags: 0x%04x\n", uFlags);
|
||||
WARN(uitools, "Invalid scroll; flags=0x%04x\n", uFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Here do the real scroll-bar controls end up */
|
||||
UITOOLS_DFC_ButtonPush(dc, r, uFlags & 0xff00);
|
||||
UITOOLS95_DFC_ButtonPush(dc, r, uFlags & 0xff00);
|
||||
|
||||
if(uFlags & DFCS_INACTIVE)
|
||||
{
|
||||
|
@ -1284,7 +1271,7 @@ static BOOL32 UITOOLS_DrawFrameScroll(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
*
|
||||
* Draw a menu control coming from DrawFrameControl()
|
||||
*/
|
||||
static BOOL32 UITOOLS_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
static BOOL32 UITOOLS95_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
||||
{
|
||||
POINT32 Points[6];
|
||||
RECT32 myr;
|
||||
|
@ -1349,7 +1336,7 @@ static BOOL32 UITOOLS_DrawFrameMenu(HDC32 dc, LPRECT32 r, UINT32 uFlags)
|
|||
break;
|
||||
|
||||
default:
|
||||
WARN(uitools, "Invalid menu; flags: 0x%04x\n", uFlags);
|
||||
WARN(uitools, "Invalid menu; flags=0x%04x\n", uFlags);
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -1389,16 +1376,17 @@ BOOL32 WINAPI DrawFrameControl32( HDC32 hdc, LPRECT32 rc, UINT32 uType,
|
|||
switch(uType)
|
||||
{
|
||||
case DFC_BUTTON:
|
||||
return UITOOLS_DrawFrameButton(hdc, rc, uState);
|
||||
return UITOOLS95_DrawFrameButton(hdc, rc, uState);
|
||||
case DFC_CAPTION:
|
||||
return UITOOLS_DrawFrameCaption(hdc, rc, uState);
|
||||
return UITOOLS95_DrawFrameCaption(hdc, rc, uState);
|
||||
case DFC_MENU:
|
||||
return UITOOLS_DrawFrameMenu(hdc, rc, uState);
|
||||
return UITOOLS95_DrawFrameMenu(hdc, rc, uState);
|
||||
case DFC_SCROLL:
|
||||
return UITOOLS_DrawFrameScroll(hdc, rc, uState);
|
||||
return UITOOLS95_DrawFrameScroll(hdc, rc, uState);
|
||||
default:
|
||||
WARN(uitools, "(%x,%p,%d,%x), bad type!\n",
|
||||
hdc,rc,uType,uState );
|
||||
hdc,rc,uType,uState );
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ BOOL32 WIDGETS_Init(void)
|
|||
/* Just to make sure the string is > 0x10000 */
|
||||
strcpy( name, (char *)cls->lpszClassName );
|
||||
cls->lpszClassName = name;
|
||||
cls->hCursor = LoadCursor16( 0, cls->hCursor );
|
||||
cls->hCursor = LoadCursor32A( 0, (LPCSTR)cls->hCursor );
|
||||
if (!(bicAtomTable[i] = RegisterClass32A( cls ))) return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
DEFS = -D__WINE__
|
||||
DEFS = -D__WINE__ -DLIBDIR=\"$(libdir)\"
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
|
|
|
@ -348,15 +348,24 @@ void DEBUG_AddModuleBreakpoints(void)
|
|||
if (pModule->flags & NE_FFLAGS_WIN32) /* PE module */
|
||||
{
|
||||
PE_MODREF *pem = PROCESS_Current()->modref_list;
|
||||
while (pem)
|
||||
if (!pem)
|
||||
{
|
||||
if (pem->module == pModule->module32) break;
|
||||
pem = pem->next;
|
||||
addr.seg = 0;
|
||||
addr.off = (DWORD)RVA_PTR( pModule->module32,
|
||||
OptionalHeader.AddressOfEntryPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (pem)
|
||||
{
|
||||
if (pem->module == pModule->module32) break;
|
||||
pem = pem->next;
|
||||
}
|
||||
if (!pem) continue;
|
||||
addr.seg = 0;
|
||||
addr.off = (DWORD)RVA_PTR( pem->module,
|
||||
OptionalHeader.AddressOfEntryPoint);
|
||||
}
|
||||
if (!pem) continue;
|
||||
addr.seg = 0;
|
||||
addr.off = (DWORD)RVA_PTR( pem->module,
|
||||
OptionalHeader.AddressOfEntryPoint );
|
||||
fprintf( stderr, "Win32 task '%s': ", entry.szModule );
|
||||
DEBUG_AddBreakpoint( &addr );
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "class.h"
|
||||
#include "module.h"
|
||||
|
@ -436,7 +437,12 @@ static void DEBUG_Main( int signal )
|
|||
fprintf(stderr,"Loading symbols: ");
|
||||
if( DEBUG_ReadExecutableDbgInfo() == FALSE )
|
||||
{
|
||||
PROFILE_GetWineIniString( "wine", "SymbolTableFile", "wine.sym",
|
||||
char *symfilename = "wine.sym";
|
||||
struct stat statbuf;
|
||||
if (-1 == stat(symfilename, &statbuf) )
|
||||
symfilename = LIBDIR "wine.sym";
|
||||
|
||||
PROFILE_GetWineIniString( "wine", "SymbolTableFile", symfilename,
|
||||
SymbolTableFile, sizeof(SymbolTableFile));
|
||||
DEBUG_ReadSymbolTable( SymbolTableFile );
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ void DEBUG_BackTrace(void)
|
|||
frame->bp, TRUE );
|
||||
frameno++;
|
||||
fprintf( stderr, "\n" );
|
||||
if (addr.off == frame->bp) break;
|
||||
addr.off = frame->bp;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
Note: The new debugging interface is starting to take shape.
|
||||
In general, I think it can be considered to be stable,
|
||||
Note: The new debugging interface can be considered to be stable,
|
||||
with the exception of the in-memory message construction functions.
|
||||
However, there is still a lot of work to be done to polish
|
||||
things up and to convert the remaining fprintf. To make my life
|
||||
|
@ -8,9 +7,13 @@ Note: The new debugging interface is starting to take shape.
|
|||
Read this document before writing new code.
|
||||
Also, DO NOT USE fprintf (or printf) to output things. All these
|
||||
will have to be translated to the new interface and there are already
|
||||
about 3000 of them! Also, instead of writing FIXMEs in the source,
|
||||
output a FIXME message if you can. But read on...
|
||||
14 Mar 1998, Dimitrie O. Paun <dimi@cs.toronto.edu>
|
||||
about 1000 of them! Also, instead of writing FIXMEs in the source,
|
||||
output a FIXME message if you can.
|
||||
|
||||
IMPORTANT: at the end of the document, there is a "Style Guide"
|
||||
for debugging messages. Please read it.
|
||||
|
||||
28 Mar 1998, Dimitrie O. Paun <dimi@cs.toronto.edu>
|
||||
|
||||
|
||||
Debugging classes
|
||||
|
@ -25,8 +28,9 @@ FIXME -- Messages in this class relate to behavior of Wine that does
|
|||
|
||||
ERR -- Messages in this class relate to serious errors in Wine.
|
||||
This sort of messages are close to asserts -- that is,
|
||||
you should output a error message when the code detects a
|
||||
condition which should not happen.
|
||||
you should output an error message when the code detects a
|
||||
condition which should not happen. In other words, important
|
||||
things that are not warnings (see below), are errors.
|
||||
Examples: unexpected change in internal state, etc.
|
||||
|
||||
WARN -- These are warning messages. You should report a warning when
|
||||
|
@ -67,8 +71,8 @@ size of Wine.
|
|||
Debugging channels
|
||||
------------------
|
||||
|
||||
Also, we divide the debugging messages per component. Each component
|
||||
is assigned a debugging channel. The identifier of the
|
||||
Also, we divide the debugging messages on a component basis. Each
|
||||
component is assigned a debugging channel. The identifier of the
|
||||
channel must be a valid C identifier but note that it may also be a
|
||||
reserve word like int or static.
|
||||
|
||||
|
@ -80,7 +84,7 @@ We will refer to a generic channel as xxx.
|
|||
Note: for those who know the old interface, the channel/type is
|
||||
what followed the _ in the dprintf_xxx statements.
|
||||
For example, to output a message on the debugging channel
|
||||
reg in the old interface you would have to write:
|
||||
reg in the old interface you would had to write:
|
||||
|
||||
dprintf_reg(stddeb, "Could not access key!\n");
|
||||
|
||||
|
@ -88,15 +92,12 @@ Note: for those who know the old interface, the channel/type is
|
|||
However, we add an orthogonal piece of information to the
|
||||
message: its class. This is very important as it will allow
|
||||
us to selectively turn on or off certain messages based on the
|
||||
type of information they report. For this reason it is VERY
|
||||
important to choose the right class for the message.
|
||||
type of information they report. For this reason it is essential
|
||||
to choose the right class for the message.
|
||||
Anyhow, suppose we figured that this message should belong
|
||||
in the WARN class, so in the new interface, you write:
|
||||
|
||||
WARN(reg, "Could not access key!");
|
||||
|
||||
Notice the \n is no longer required.
|
||||
|
||||
WARN(reg, "Could not access key!\n");
|
||||
---
|
||||
|
||||
How to use it
|
||||
|
@ -117,8 +118,7 @@ Some examples from the code:
|
|||
|
||||
...
|
||||
|
||||
TRACE(crtdll, "CRTDLL_setbuf(file %p buf %p)",
|
||||
file, buf);
|
||||
TRACE(crtdll, "CRTDLL_setbuf(file %p buf %p)", file, buf);
|
||||
|
||||
WARN(aspi, "Error opening device errno=%d", save_error);
|
||||
|
||||
|
@ -142,10 +142,9 @@ Notes:
|
|||
he will most likely miss those because usually the TRACE class
|
||||
is turned off. A similar argument can be made if you mix any
|
||||
other two classes.
|
||||
2. All lines end by default with a newline. So you should not
|
||||
add one more. If you can NOT output everything that you want in
|
||||
the line with only one statement, then you need to build the string
|
||||
in memory.
|
||||
2. All lines should end with a newline.If you can NOT output
|
||||
everything that you want in the line with only one statement,
|
||||
then you need to build the string in memory.
|
||||
Please read the section below "In-memory messages" on the
|
||||
preferred way to do it. PLEASE USE THAT INTERFACE TO BUILD
|
||||
MESSAGES IN MEMORY. The reason is that we are not sure that
|
||||
|
@ -160,19 +159,19 @@ Are we debugging?
|
|||
To test whether the debugging output of class yyy on channel xxx is
|
||||
enabled, use:
|
||||
|
||||
TRACING to test if TRACE is enabled
|
||||
WARNING to test if WARN is enabled
|
||||
FIXMING to test if FIXME is enabled
|
||||
ERRING to test if ERR is enabled
|
||||
TRACE_ON to test if TRACE is enabled
|
||||
WARN_ON to test if WARN is enabled
|
||||
FIXME_ON to test if FIXME is enabled
|
||||
ERR_ON to test if ERR is enabled
|
||||
|
||||
Examples:
|
||||
|
||||
if(TRACING(atom)){
|
||||
if(TRACE_ON(atom)){
|
||||
...blah...
|
||||
}
|
||||
|
||||
Note that you should normaly need to test only if TRACING. At present,
|
||||
none of the other 3 tests (except for ERRING which is used only once!)
|
||||
Note that you should normally need to test only if TRACE_ON. At present,
|
||||
none of the other 3 tests (except for ERR_ON which is used only once!)
|
||||
are used in Wine.
|
||||
|
||||
In-memory messages
|
||||
|
@ -299,7 +298,7 @@ identifier is a string and thus returns a string of the form:
|
|||
|
||||
Thus, to use it, do something on the following lines:
|
||||
|
||||
#include "debugstr.h"
|
||||
#include "debug.h"
|
||||
|
||||
...
|
||||
|
||||
|
@ -351,6 +350,108 @@ Also, note that at the moment:
|
|||
- the fixme and err classes are enabled by default
|
||||
- the trace and warn classes are disabled by default
|
||||
- there is no way to compile out the messages. All are
|
||||
runtime configurable. This will come next release.
|
||||
runtime configurable. This will (hopefully) come next
|
||||
release.
|
||||
|
||||
|
||||
A Few Notes on Style
|
||||
--------------------
|
||||
|
||||
This new scheme makes certain things more consistent but there is still
|
||||
room for improvement by using a common style of debug messages. Before
|
||||
I continue, let me note that the output format is the following:
|
||||
|
||||
yyy:xxx:fff <message>
|
||||
|
||||
where:
|
||||
yyy = the class (fixme, err, warn, trace)
|
||||
xxx = the channel (atom, win, font, etc)
|
||||
fff = the function name
|
||||
these fields are output automatically. All you have to provide is
|
||||
the <message> part.
|
||||
|
||||
So here are some ideas:
|
||||
|
||||
* do NOT include the name of the function: it is included automatically
|
||||
|
||||
* if you want to output the parameters of the function, do it as the first
|
||||
thing and include them in parenthesis, like this:
|
||||
|
||||
YYY(xxx, "(%d,%p,etc)...\n", par1, par2, ...);
|
||||
|
||||
* for stubs, you should output a FIXME message. I suggest this style:
|
||||
|
||||
FIXME(xxx, "(%x,%d...): stub\n", par1, par2, ...);
|
||||
|
||||
That is, you output the parameters, then a : and then a string
|
||||
containing the word "stub". I've seen "empty stub", and others, but I
|
||||
think that just "stub" suffices.
|
||||
|
||||
* output 1 and ONLY 1 line per message. That is, the format string should
|
||||
contain only 1 \n and it should always appear at the end of the string.
|
||||
(there are many reasons for this requirement, one of them is that each
|
||||
debug macro adds things to the beginning of the line)
|
||||
|
||||
* if you want to name a value, use = and NOT :. That is, instead of
|
||||
saying:
|
||||
FIXME(xxx, "(fd: %d, file: %s): stub\n", fd, name);
|
||||
say:
|
||||
FIXME(xxx, "(fd=%d, file=%s): stub\n", fd, name);
|
||||
|
||||
use : to separate categories.
|
||||
|
||||
* try to avoid the style:
|
||||
|
||||
FIXME(xxx,
|
||||
"(fd: %d, file: %s): stub\n", fd, name);
|
||||
but use:
|
||||
|
||||
FIXME(xxx, "(fd: %d, file: %s): stub\n", fd, name);
|
||||
|
||||
The reason is that if you want to grep for things, you would search for
|
||||
FIXME but in the first case there is no additional information available,
|
||||
where in the second one, there is (e.g. the word stub)
|
||||
|
||||
* if you output a string s that might contain control characters,
|
||||
or if s may be null, use debugstr_a (for ASCII strings, or
|
||||
debugstr_w for Unicode strings) to convert s to a C string, like
|
||||
this:
|
||||
|
||||
HANDLE32 WINAPI YourFunc(LPCSTR s)
|
||||
{
|
||||
FIXME(xxx, "(%s): stub\n", debugstr_a(s));
|
||||
}
|
||||
|
||||
* if you want to output a resource identifier, use debugres to
|
||||
convert it to a string first, like this:
|
||||
|
||||
HANDLE32 WINAPI YourFunc(LPCSTR res)
|
||||
{
|
||||
FIXME(xxx, "(res=%s): stub\n", debugres(s));
|
||||
}
|
||||
|
||||
if the resource identifier is a SEGPTR, use PTR_SEG_TO_LIN to get a
|
||||
liner pointer first:
|
||||
|
||||
HRSRC16 WINAPI FindResource16( HMODULE16 hModule, SEGPTR name, SEGPTR type )
|
||||
{
|
||||
[...]
|
||||
TRACE(resource, "module=%04x name=%s type=%s\n",
|
||||
hModule, debugres(PTR_SEG_TO_LIN(name)),
|
||||
debugres(PTR_SEG_TO_LIN(type)) );
|
||||
[...]
|
||||
}
|
||||
|
||||
* for messages intended for the user (specifically those that report
|
||||
errors in wine.conf), use the MSG macro. Use it like a printf:
|
||||
|
||||
MSG( "Definition of drive %d is incorrect!\n", drive );
|
||||
|
||||
However, note that there are _very_ few valid uses of this macro.
|
||||
Most messages are debugging messages, so chances are you will not
|
||||
need to use this macro. Grep the source to get an idea where it
|
||||
is appropriate to use it.
|
||||
|
||||
* for structure dumps, use the DUMP macro. Use it like a printf,
|
||||
just like the MSG macro. Similarly, there are only a few valid
|
||||
uses of this macro. Grep the source to see when to use it.
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
This file contains information on the current implementation of the DirectDraw
|
||||
API.
|
||||
|
||||
The DirectDraw API is being used in a lot of current computergames. Its API
|
||||
layer is represented by the functions in the Win32 DLL ddraw.dll and the
|
||||
IDirectDraw* interfaces (that can be created using the API functions).
|
||||
|
||||
WINE currently implements a very basic set of the DirectDraw functionality
|
||||
in graphics/ddraw.c. This implementation uses the XFree86-DGA extension
|
||||
to get very fast access to the graphics card framebuffer and doublebuffering
|
||||
features. It is as fast as the MS equivalent for the stuff that is implemented.
|
||||
Several applications already work, see below.
|
||||
Problems of the implementation using XFree86-DGA:
|
||||
|
||||
- XFree86 cannot switch resolution nor depth on the fly.
|
||||
This is a problem with X and unavoidable.
|
||||
Current solution is to pop up a MessageBox with an error for
|
||||
mismatched parameters and advice the user to restart the X server
|
||||
with the specified depth and/or screensize.
|
||||
- The rest of the functionality that has to be implemented will have
|
||||
to be done in software and will be very slow.
|
||||
- This requires WINE to be run as root user so XF86DGA can mmap the
|
||||
framebuffer into the addressspace of the process.
|
||||
- Blocks all other X windowed applications.
|
||||
|
||||
TODO:
|
||||
- Add more implementations of the DirectDraw API.
|
||||
Primary candidate is a raw Xlib implementation (one with/one without
|
||||
XShm extension).
|
||||
An additional layer (basically a HAL) will be required to decide on
|
||||
case-by-case basis which implementation to use.
|
||||
|
||||
Status:
|
||||
- Diablo [640x480x8]:
|
||||
The movies play with speed comparable to the MS DDRAW one.
|
||||
The game doesn't work, it somehow tries to write into 2 lines _BEFORE_
|
||||
the start of the surface. I have tried to investigate this, but it is
|
||||
in code that is automatically generated.
|
||||
|
||||
- WingCommander 4 / Win95 Patch [640x480x8]:
|
||||
The intromovie plays, in 8 bit mode (to reconfigure wc4, run wine
|
||||
"wc4w.exe -I"). The 16bit mode looks broken on Mystique, but I think
|
||||
this is due to the unusual colorweight (565 rgb) of the Mystique in 16bit
|
||||
mode. [Specifying it in DDPIXELFORMAT didn't help.]
|
||||
|
||||
Requires to be run in 640x480xdepth mode (doesn't seem to heed
|
||||
DDSURFACEDESC.lPitch).
|
||||
You can even fly the first mission with Maniac (ignore the weird sounds),
|
||||
but it crashes as soon as you arrive at Blue Point Station...
|
||||
|
||||
- Monkey Island 3 [640x480x8]:
|
||||
Goes to the easy/hard selection screen, then hangs due to multithreaded
|
||||
windows-messagehandling problems.
|
||||
|
||||
- DiscWorld 2 [640x480x8]:
|
||||
[Crashes with 'cli' in WINE released version. Yes. Privileged instructions
|
||||
in 32bit code. Will they ever learn...]
|
||||
Plays through nearly all intro movies. Sound and animation skip a lot of
|
||||
stuff (possible DirectSound asynchronization problem).
|
||||
|
||||
- XvT [640x480x16]:
|
||||
Shows the splash screen, then fails with missing Joystick. I have
|
||||
investigated but failed to find a reason for this.
|
||||
|
||||
- Tomb Raider 2 Demo (using 8 bit renderer) [640x480x8]:
|
||||
I have played nearly all of the DEMO level using Keyboard Controls.
|
||||
Sound is a bit weird. Keyboard/Mouse handling too due to incomplete
|
||||
DirectInput.
|
||||
|
||||
- WingCommander Prophecy Demo (using software renderer) [640x480x16]:
|
||||
[Crashes with an invalid opcode (outb, probably to test for 3dFX) in the
|
||||
WINE release version.]
|
||||
Plays trailer, hangs in selection screen (no keyboard input, DirectInput
|
||||
problem).
|
|
@ -0,0 +1,37 @@
|
|||
This file contains information on the current implementation of the DirectSound
|
||||
API.
|
||||
|
||||
The DirectSound API can be found in the Win32 DLL dsound.dll and in the
|
||||
IDirectSound* interfaces. It is implemented in multimedia/dsound.c.
|
||||
|
||||
The current implementation uses the Linux/FreeBSD OpenSoundSystem. Some
|
||||
applications already work. There is only the basic part of the interfaces
|
||||
implemented, but it is the stuff used by 90% of the applications.
|
||||
It also uses multithreading, so it will only work on systems with working
|
||||
CreateThread.
|
||||
|
||||
Tested with SoundBlaster(16) clone and Gravis UltraSound Classic.
|
||||
|
||||
TODO:
|
||||
- Add support for other audiosystems.
|
||||
+ Sun Audio. (Solaris and probably the *BSDs except FreeBSD.)
|
||||
+ remote audio support (No clue as to what systems there are.
|
||||
Use some audio xextensions?)
|
||||
- Add support for mixing of different frequency and panning.
|
||||
- Fix all the multithread pending race conditions and the like.
|
||||
- Share filedescriptors and other stuff with mciwave/waveoutdevice code.
|
||||
|
||||
|
||||
Gamestatus:
|
||||
- Wing Commander 4/W95:
|
||||
The intromovie plays without problems. Nearly lipsynchron.
|
||||
- DiscWorld 2
|
||||
The sound works, but noticeable chunks are left out (from the sound
|
||||
and the animation). Don't know why yet.
|
||||
- Diablo:
|
||||
Sound works, but slows down the movieplayer. In the (hacked version)
|
||||
game the sound is positively weird.
|
||||
- Monkey Island 3:
|
||||
The background sound of the startscreen works.
|
||||
- WingCommander Prophecy Demo:
|
||||
Sound works for the intromovie.
|
|
@ -351,6 +351,7 @@ BOOL32 WINAPI CreateDirectory32A( LPCSTR path,
|
|||
if (!DOSFS_GetFullName( path, FALSE, &full_name )) return 0;
|
||||
if ((mkdir( full_name.long_name, 0777 ) == -1) && (errno != EEXIST))
|
||||
{
|
||||
WARN (file, "Errno %i trying to create directory %s.\n", errno, full_name.long_name);
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include "metafile.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
static const DC_FUNCTIONS MFDRV_Funcs =
|
||||
{
|
||||
MFDRV_Arc, /* pArc */
|
||||
|
@ -179,22 +181,19 @@ HDC16 WINAPI CreateMetaFile16(
|
|||
return dc->hSelf;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* CloseMetaFile16 (GDI.126)
|
||||
*
|
||||
* Stop recording graphics operations in metafile associated with
|
||||
* hdc and retrieve metafile.
|
||||
*
|
||||
* RETURNS
|
||||
* Handle of newly created metafile on success, NULL on failure.
|
||||
/**********************************************************************
|
||||
* CreateMetaFile32A (GDI32.51)
|
||||
*/
|
||||
HMETAFILE16 WINAPI CloseMetaFile16(
|
||||
HDC16 hdc /* Metafile DC to close */
|
||||
HDC32 WINAPI CreateMetaFile32A(
|
||||
LPCSTR filename /* Filename of disk metafile */
|
||||
)
|
||||
{
|
||||
return CreateMetaFile16( filename );
|
||||
}
|
||||
|
||||
static DC *METAFILE_CloseMetaFile( HDC32 hdc )
|
||||
{
|
||||
DC *dc;
|
||||
HMETAFILE16 hmf;
|
||||
HFILE32 hFile;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
|
||||
|
@ -231,6 +230,22 @@ HMETAFILE16 WINAPI CloseMetaFile16(
|
|||
_lclose32(hFile);
|
||||
}
|
||||
|
||||
return dc;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* CloseMetaFile16 (GDI.126)
|
||||
*/
|
||||
HMETAFILE16 WINAPI CloseMetaFile16(
|
||||
HDC16 hdc /* Metafile DC to close */
|
||||
)
|
||||
{
|
||||
HMETAFILE16 hmf;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
DC *dc = METAFILE_CloseMetaFile(hdc);
|
||||
if (!dc) return 0;
|
||||
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
|
||||
|
||||
/* Now allocate a global handle for the metafile */
|
||||
|
||||
hmf = GLOBAL_CreateBlock( GMEM_MOVEABLE, physDev->mh,
|
||||
|
@ -241,12 +256,25 @@ HMETAFILE16 WINAPI CloseMetaFile16(
|
|||
return hmf;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* CloseMetaFile32 (GDI32.17)
|
||||
*
|
||||
* Stop recording graphics operations in metafile associated with
|
||||
* hdc and retrieve metafile.
|
||||
*
|
||||
* RETURNS
|
||||
* Handle of newly created metafile on success, NULL on failure.
|
||||
*/
|
||||
HMETAFILE32 WINAPI CloseMetaFile32(
|
||||
HDC32 hdc /* Metafile DC to close */
|
||||
)
|
||||
{
|
||||
return CloseMetaFile32(hdc);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* DeleteMetaFile16 (GDI.127)
|
||||
*
|
||||
* Delete a memory-based metafile.
|
||||
*
|
||||
*/
|
||||
BOOL16 WINAPI DeleteMetaFile16(
|
||||
HMETAFILE16 hmf
|
||||
|
@ -256,3 +284,77 @@ BOOL16 WINAPI DeleteMetaFile16(
|
|||
return !GlobalFree16( hmf );
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* DeleteMetaFile32 (GDI32.69)
|
||||
*
|
||||
* Delete a memory-based metafile.
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI DeleteMetaFile32(
|
||||
HMETAFILE32 hmf
|
||||
) {
|
||||
return !GlobalFree16( hmf );
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
|
||||
Enhanced Metafile driver initializations
|
||||
|
||||
This possibly should be moved to their own file/directory
|
||||
at some point.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
need wide version as well
|
||||
*/
|
||||
HDC32 CreateEnhMetaFile32A(
|
||||
HDC32 hdc, /* optional reference DC */
|
||||
LPCSTR filename, /* optional filename for disk metafiles */
|
||||
const RECT32 *rect, /* optional bounding rectangle */
|
||||
LPCSTR description /* optional description */
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
DC *dc;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
HFILE32 hFile;
|
||||
|
||||
if (!(dc = MFDRV_AllocMetaFile())) return 0;
|
||||
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
|
||||
|
||||
if (filename) /* disk based metafile */
|
||||
{
|
||||
physDev->mh->mtType = METAFILE_DISK;
|
||||
if ((hFile = _lcreat32( filename, 0 )) == HFILE_ERROR32)
|
||||
{
|
||||
MFDRV_DeleteDC( dc );
|
||||
return 0;
|
||||
}
|
||||
if (_lwrite32( hFile, (LPSTR)physDev->mh,
|
||||
sizeof(*physDev->mh)) == HFILE_ERROR32)
|
||||
{
|
||||
MFDRV_DeleteDC( dc );
|
||||
return 0;
|
||||
}
|
||||
physDev->mh->mtNoParameters = hFile; /* store file descriptor here */
|
||||
/* windows probably uses this too*/
|
||||
}
|
||||
else /* memory based metafile */
|
||||
physDev->mh->mtType = METAFILE_MEMORY;
|
||||
|
||||
TRACE(metafile, "returning %04x\n", dc->hSelf);
|
||||
return dc->hSelf;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
HENHMETAFILE32 CloseEnhMetaFile32(
|
||||
HDC32 hdc /* metafile DC */
|
||||
)
|
||||
{
|
||||
/* write EMR_EOF(0x0, 0x10, 0x14) */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -695,8 +695,8 @@ BOOL32 WINAPI DrawAnimatedRects32( HWND32 hwnd, int idAni,
|
|||
const LPRECT32 lprcFrom,
|
||||
const LPRECT32 lprcTo )
|
||||
{
|
||||
fprintf( stdnimp,"DrawAnimatedRects32(%x,%d,%p,%p), empty stub!\n",
|
||||
hwnd, idAni, lprcFrom, lprcTo );
|
||||
FIXME(gdi,"(%x,%d,%p,%p): empty stub!\n",
|
||||
hwnd, idAni, lprcFrom, lprcTo );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,11 +173,12 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
|||
printerEnabled, sizeof(printerEnabled) );
|
||||
if (lstrcmpi32A(printerEnabled,"on"))
|
||||
{
|
||||
printf("WIN16DRV_CreateDC disabled in wine.conf file\n");
|
||||
MSG("WIN16DRV_CreateDC disabled in wine.conf file\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TRACE(win16drv, "In creatdc for (%s,%s,%s) initData 0x%p\n",driver, device, output, initData);
|
||||
TRACE(win16drv, "In creatdc for (%s,%s,%s) initData 0x%p\n",
|
||||
driver, device, output, initData);
|
||||
|
||||
physDev = (WIN16DRV_PDEVICE *)HeapAlloc( SystemHeap, 0, sizeof(*physDev) );
|
||||
if (!physDev) return FALSE;
|
||||
|
@ -205,11 +206,9 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
|||
dc->w.hVisRgn = CreateRectRgn32(0, 0, dc->w.devCaps->horzRes, dc->w.devCaps->vertRes);
|
||||
dc->w.bitsPerPixel = dc->w.devCaps->bitsPixel;
|
||||
|
||||
printf("Got devcaps width %d height %d bits %d planes %d\n",
|
||||
dc->w.devCaps->horzRes,
|
||||
dc->w.devCaps->vertRes,
|
||||
dc->w.devCaps->bitsPixel,
|
||||
dc->w.devCaps->planes);
|
||||
TRACE(win16drv, "Got devcaps width %d height %d bits %d planes %d\n",
|
||||
dc->w.devCaps->horzRes, dc->w.devCaps->vertRes,
|
||||
dc->w.devCaps->bitsPixel, dc->w.devCaps->planes);
|
||||
|
||||
/* Now we allocate enough memory for the PDEVICE structure */
|
||||
/* The size of this varies between printer drivers */
|
||||
|
@ -276,15 +275,15 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
|
|||
switch(nEscape)
|
||||
{
|
||||
case ENABLEPAIRKERNING:
|
||||
fprintf(stderr,"Escape: ENABLEPAIRKERNING ignored.\n");
|
||||
FIXME(win16drv,"Escape: ENABLEPAIRKERNING ignored.\n");
|
||||
nRet = 1;
|
||||
break;
|
||||
case GETPAIRKERNTABLE:
|
||||
fprintf(stderr,"Escape: GETPAIRKERNTABLE ignored.\n");
|
||||
FIXME(win16drv,"Escape: GETPAIRKERNTABLE ignored.\n");
|
||||
nRet = 0;
|
||||
break;
|
||||
case SETABORTPROC:
|
||||
printf("Escape: SetAbortProc ignored should be stored in dc somewhere\n");
|
||||
FIXME(win16drv,"Escape: SetAbortProc ignored should be stored in dc somewhere\n");
|
||||
/* Make calling application believe this worked */
|
||||
nRet = 1;
|
||||
break;
|
||||
|
@ -335,7 +334,7 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
|
|||
}
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "Escape(nEscape = %04x)\n", nEscape);
|
||||
WARN(win16drv, "Escape(nEscape = %04x) - ???\n", nEscape);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
@ -361,12 +360,12 @@ static struct hpq *hpqueue;
|
|||
|
||||
HPQ WINAPI CreatePQ(int size)
|
||||
{
|
||||
printf("CreatePQ: %d\n",size);
|
||||
FIXME(win16drv, "(%d): stub\n",size);
|
||||
return 1;
|
||||
}
|
||||
int WINAPI DeletePQ(HPQ hPQ)
|
||||
{
|
||||
printf("DeletePQ: %x\n", hPQ);
|
||||
FIXME(win16drv, "(%x): stub\n", hPQ);
|
||||
return 0;
|
||||
}
|
||||
int WINAPI ExtractPQ(HPQ hPQ)
|
||||
|
@ -402,7 +401,7 @@ int WINAPI ExtractPQ(HPQ hPQ)
|
|||
free(queue);
|
||||
}
|
||||
|
||||
printf("ExtractPQ: %x got tag %d key %d\n", hPQ, tag, key);
|
||||
TRACE(win16drv, "%x got tag %d key %d\n", hPQ, tag, key);
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
@ -415,17 +414,17 @@ int WINAPI InsertPQ(HPQ hPQ, int tag, int key)
|
|||
queueItem->key = key;
|
||||
queueItem->tag = tag;
|
||||
|
||||
printf("InsertPQ: %x %d %d\n", hPQ, tag, key);
|
||||
FIXME(win16drv, "(%x %d %d): stub???\n", hPQ, tag, key);
|
||||
return TRUE;
|
||||
}
|
||||
int WINAPI MinPQ(HPQ hPQ)
|
||||
{
|
||||
printf("MinPQ: %x\n", hPQ);
|
||||
FIXME(win16drv, "(%x): stub\n", hPQ);
|
||||
return 0;
|
||||
}
|
||||
int WINAPI SizePQ(HPQ hPQ, int sizechange)
|
||||
{
|
||||
printf("SizePQ: %x %d\n", hPQ, sizechange);
|
||||
FIXME(win16drv, "(%x %d): stub\n", hPQ, sizechange);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -468,9 +467,9 @@ static int CreateSpoolFile(LPSTR pszOutput)
|
|||
if (pszOutput == NULL || *pszOutput == '\0')
|
||||
return -1;
|
||||
|
||||
PROFILE_GetWineIniString( "spooler", pszOutput, "",
|
||||
psCmd, sizeof(psCmd) );
|
||||
printf("Got printerSpoolCommand \"%s\" for output device \"%s\"\n",psCmd, pszOutput);
|
||||
PROFILE_GetWineIniString( "spooler", pszOutput, "", psCmd, sizeof(psCmd) );
|
||||
TRACE(win16drv, "Got printerSpoolCommand '%s' for output device '%s'\n",
|
||||
psCmd, pszOutput);
|
||||
if (!*psCmd)
|
||||
psCmdP = pszOutput;
|
||||
else
|
||||
|
@ -491,7 +490,7 @@ static int CreateSpoolFile(LPSTR pszOutput)
|
|||
{
|
||||
psCmdP++;
|
||||
|
||||
printf("In child need to exec %s\n",psCmdP);
|
||||
TRACE(win16drv, "In child need to exec %s\n",psCmdP);
|
||||
close(0);
|
||||
dup2(fds[0],0);
|
||||
close (fds[1]);
|
||||
|
@ -501,15 +500,16 @@ static int CreateSpoolFile(LPSTR pszOutput)
|
|||
}
|
||||
close (fds[0]);
|
||||
fd = fds[1];
|
||||
printf("Need to execute a command and pipe the output to it\n");
|
||||
TRACE(win16drv,"Need to execute a cmnd and pipe the output to it\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Just assume its a file\n");
|
||||
TRACE(win16drv, "Just assume its a file\n");
|
||||
|
||||
if ((fd = open(psCmdP, O_CREAT | O_TRUNC | O_WRONLY , 0600)) < 0)
|
||||
{
|
||||
printf("Failed to create spool file %s, errno = %d\n", psCmdP, errno);
|
||||
ERR(win16drv, "Failed to create spool file %s, errno = %d\n",
|
||||
psCmdP, errno);
|
||||
}
|
||||
}
|
||||
return fd;
|
||||
|
@ -538,7 +538,7 @@ HANDLE16 WINAPI OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC)
|
|||
HANDLE16 hHandle = (HANDLE16)SP_ERROR;
|
||||
PPRINTJOB pPrintJob;
|
||||
|
||||
TRACE(win16drv, "\"%s\" \"%s\" %04x\n", lpOutput, lpTitle, hDC);
|
||||
TRACE(win16drv, "'%s' '%s' %04x\n", lpOutput, lpTitle, hDC);
|
||||
|
||||
pPrintJob = gPrintJobsTable[0];
|
||||
if (pPrintJob == NULL)
|
||||
|
|
|
@ -573,7 +573,7 @@ DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
|
|||
lP11, lP12, lP13,
|
||||
SEGPTR_GET(lP14));
|
||||
SEGPTR_FREE(lP14);
|
||||
printf("Called StretchBlt ret %d\n",wRet);
|
||||
TRACE(win16drv, "Called StretchBlt ret %d\n",wRet);
|
||||
}
|
||||
return wRet;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ static void __initWinG(void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
fprintf(stdnimp,"WinG: no joy.\n");
|
||||
FIXME(wing,"WinG: no joy.\n");
|
||||
__WinGOK = False;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ HDC16 WINAPI WinGCreateDC16(void)
|
|||
*/
|
||||
BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *fmt)
|
||||
{
|
||||
fprintf(stdnimp,"WinGRecommendDIBFormat()\n");
|
||||
FIXME(wing,"(%p): stub\n", fmt);
|
||||
|
||||
if( __WinGOK > 0 && fmt )
|
||||
{
|
||||
|
@ -95,14 +95,16 @@ BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *fmt)
|
|||
HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header,
|
||||
void **bits)
|
||||
{
|
||||
fprintf(stdnimp,"WinGCreateBitmap: empty stub! (expect failure)\n");
|
||||
FIXME(wing,"(%x,%p,%p): empty stub! (expect failure)\n",
|
||||
winDC, header, bits);
|
||||
if( __WinGOK > 0 && header )
|
||||
{
|
||||
BITMAPINFOHEADER* bmpi = &header->bmiHeader;
|
||||
|
||||
fprintf(stdnimp,"bytes\t=%i\nplanes\t=%i\nbpp\t=%i\nx\t=%i\ny\t=%i\nrle\t=0x%08x\nsize\t=%i\n",
|
||||
(int)bmpi->biSize, bmpi->biPlanes, bmpi->biBitCount,
|
||||
(int)bmpi->biWidth, (int)bmpi->biHeight, (unsigned)bmpi->biCompression, (int)bmpi->biSizeImage);
|
||||
FIXME(wing,"bytes=%i,planes=%i,bpp=%i,x=%i,y=%i,rle=0x%08x,size=%i\n",
|
||||
(int)bmpi->biSize, bmpi->biPlanes, bmpi->biBitCount,
|
||||
(int)bmpi->biWidth, (int)bmpi->biHeight,
|
||||
(unsigned)bmpi->biCompression, (int)bmpi->biSizeImage);
|
||||
|
||||
#ifdef PRELIMINARY_WING16_SUPPORT
|
||||
if( bmpi->biPlanes == __bmpiWinG.biPlanes && bmpi->biBitCount == __bmpiWinG.biBitCount &&
|
||||
|
@ -207,7 +209,7 @@ SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
|
|||
UINT16 WINAPI WinGSetDIBColorTable16(HDC16 hWinGDC, UINT16 start, UINT16 num,
|
||||
RGBQUAD* pColor)
|
||||
{
|
||||
fprintf(stdnimp,"WinGSetDIBColorTable: empty stub!\n");
|
||||
FIXME(wing,"(%x,%d,%d,%p): empty stub!\n",hWinGDC,start,num,pColor);
|
||||
return num;
|
||||
}
|
||||
|
||||
|
@ -215,9 +217,9 @@ UINT16 WINAPI WinGSetDIBColorTable16(HDC16 hWinGDC, UINT16 start, UINT16 num,
|
|||
* WinGGetDIBColorTable16 (WING.1005)
|
||||
*/
|
||||
UINT16 WINAPI WinGGetDIBColorTable16(HDC16 winDC, UINT16 start,
|
||||
UINT16 numentry, RGBQUAD* colors)
|
||||
UINT16 num, RGBQUAD* colors)
|
||||
{
|
||||
fprintf(stdnimp,"WinGGetDIBColorTable: empty stub!\n");
|
||||
FIXME(wing,"(%x,%d,%d,%p): empty stub!\n",winDC,start,num,colors);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -226,7 +228,7 @@ UINT16 WINAPI WinGGetDIBColorTable16(HDC16 winDC, UINT16 start,
|
|||
*/
|
||||
HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void)
|
||||
{
|
||||
fprintf(stdnimp,"WinGCreateHalfTonePalette: empty stub!\n");
|
||||
FIXME(wing,"(void): empty stub!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -236,7 +238,7 @@ HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void)
|
|||
HPALETTE16 WINAPI WinGCreateHalfToneBrush16(HDC16 winDC, COLORREF col,
|
||||
WING_DITHER_TYPE type)
|
||||
{
|
||||
fprintf(stdnimp,"WinGCreateHalfToneBrush: empty stub!\n");
|
||||
FIXME(wing,"(...): empty stub!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -250,8 +252,6 @@ BOOL16 WINAPI WinGStretchBlt16(HDC16 destDC, INT16 xDest, INT16 yDest,
|
|||
{
|
||||
|
||||
return StretchBlt16(destDC, xDest, yDest, widDest, heiDest, srcDC, xSrc, ySrc, widSrc, heiSrc, SRCCOPY);
|
||||
/* fprintf(stdnimp,"WinGStretchBlt16: empty stub!\n");*/
|
||||
/* return 0; */
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -116,9 +116,9 @@ BOOL32 X11DRV_Init(void)
|
|||
/* Finish up device caps */
|
||||
|
||||
#if 0
|
||||
printf("Display:\nHeight = %-4i pxl, %-4i mm\nWidth = %-4i pxl, %-4i mm\n",
|
||||
HeightOfScreen(screen), HeightMMOfScreen(screen),
|
||||
WidthOfScreen(screen), WidthMMOfScreen(screen) );
|
||||
TRACE(x11drv, "Height = %-4i pxl, %-4i mm, Width = %-4i pxl, %-4i mm\n",
|
||||
HeightOfScreen(screen), HeightMMOfScreen(screen),
|
||||
WidthOfScreen(screen), WidthMMOfScreen(screen) );
|
||||
#endif
|
||||
|
||||
X11DRV_DevCaps.version = 0x300;
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include "font.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define DEBUG_FONT_INIT 1
|
||||
|
||||
#define X_PFONT_MAGIC (0xFADE0000)
|
||||
#define X_FMC_MAGIC (0x0000CAFE)
|
||||
|
||||
|
@ -824,9 +822,8 @@ static void XFONT_WindowsNames( char* buffer )
|
|||
fi->df.dfPitchAndFamily |= bFamilyStyle;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font,"typeface \'%s\'\n", fr->lfFaceName);
|
||||
#endif
|
||||
|
||||
fr->fr_flags |= FR_NAMESET;
|
||||
}
|
||||
|
||||
|
@ -865,9 +862,8 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias )
|
|||
/* check if we already got one */
|
||||
if( !lstrcmpi32A( pfa->faTypeFace, lpAlias ) )
|
||||
{
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font,"\tredundant alias '%s' -> '%s'\n", lpAlias, lpTypeFace );
|
||||
#endif
|
||||
TRACE(font,"\tredundant alias '%s' -> '%s'\n",
|
||||
lpAlias, lpTypeFace );
|
||||
return NULL;
|
||||
}
|
||||
if( pfa->next ) pfa = pfa->next;
|
||||
|
@ -885,9 +881,8 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias )
|
|||
pfa->faAlias = pfa->faTypeFace + j;
|
||||
lstrcpy32A( pfa->faAlias, lpAlias );
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font, "\tadded alias '%s' for %s\n", lpAlias, lpTypeFace );
|
||||
#endif
|
||||
|
||||
return pfa;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -987,10 +982,9 @@ static void XFONT_LoadAliases( char** buffer, int buf_size )
|
|||
prev = pfa;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font, "\tsubstituted '%s' with %s\n",
|
||||
frMatch->lfFaceName, lpAlias );
|
||||
#endif
|
||||
|
||||
lstrcpyn32A( frMatch->lfFaceName, lpAlias, LF_FACESIZE );
|
||||
frMatch->fr_flags |= FR_NAMESET;
|
||||
}
|
||||
|
@ -1001,7 +995,7 @@ static void XFONT_LoadAliases( char** buffer, int buf_size )
|
|||
}
|
||||
}
|
||||
}
|
||||
else fprintf(stderr, "XFONT_Init: malformed font alias '%s'\n", *buffer );
|
||||
else ERR(font, " malformed font alias '%s'\n", *buffer );
|
||||
}
|
||||
else break;
|
||||
} while(TRUE);
|
||||
|
@ -1395,9 +1389,7 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
fr->resource = (char*) HeapAlloc(SystemHeap, 0, j + 1 );
|
||||
lstrcpyn32A( fr->resource, typeface, j + 1 );
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font," family: %s\n", fr->resource );
|
||||
#endif
|
||||
|
||||
if( pfr ) pfr->next = fr;
|
||||
else fontList = fr;
|
||||
|
@ -1439,15 +1431,14 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
XFONT_SetFontMetric( fi, fr, x_fs );
|
||||
TSXFreeFont( display, x_fs );
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font,"\t[% 2ipt] '%s'\n", fi->df.dfPoints, typeface );
|
||||
#endif
|
||||
|
||||
XFONT_CheckFIList( fr, fi, REMOVE_SUBSETS );
|
||||
fi = NULL; /* preventing reuse */
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "FONT_Init: failed to load %s\n", lpstr );
|
||||
ERR(font, "failed to load %s\n", lpstr );
|
||||
|
||||
XFONT_CheckFIList( fr, fi, UNMARK_SUBSETS );
|
||||
}
|
||||
|
@ -1484,9 +1475,7 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
fontCache = (fontObject*) HeapAlloc(SystemHeap, 0, fontCacheSize * sizeof(fontObject));
|
||||
XFONT_GrowFreeList(0, fontCacheSize - 1);
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
TRACE(font,"done!\n");
|
||||
#endif
|
||||
TRACE(font,"done!\n");
|
||||
|
||||
/* update text caps parameter */
|
||||
|
||||
|
@ -1716,9 +1705,7 @@ static void XFONT_CheckFIList( fontResource* fr, fontInfo* fi, int action)
|
|||
fr->count++;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
if( i ) TRACE(font,"\t purged %i subsets [%i]\n", i , fr->count);
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -2226,10 +2213,7 @@ INT16 WINAPI AddFontResource16( LPCSTR filename )
|
|||
*/
|
||||
INT32 WINAPI AddFontResource32A( LPCSTR str )
|
||||
{
|
||||
if (HIWORD(str)) /* font file */
|
||||
fprintf( stdnimp, "STUB: AddFontResource('%s')\n", str );
|
||||
else /* font resource handle */
|
||||
fprintf( stdnimp, "STUB: AddFontResource(%04x)\n", LOWORD(str) );
|
||||
FIXME(font, "(%s): stub\n", debugres(str));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2239,7 +2223,7 @@ INT32 WINAPI AddFontResource32A( LPCSTR str )
|
|||
*/
|
||||
INT32 WINAPI AddFontResource32W( LPCWSTR str )
|
||||
{
|
||||
fprintf( stdnimp, "STUB: AddFontResource32W(%p)\n", str );
|
||||
FIXME(font, "(%p): stub\n", str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2248,11 +2232,7 @@ INT32 WINAPI AddFontResource32W( LPCWSTR str )
|
|||
*/
|
||||
BOOL16 WINAPI RemoveFontResource16( SEGPTR str )
|
||||
{
|
||||
if (HIWORD(str))
|
||||
fprintf( stdnimp, "STUB: RemoveFontResource('%s')\n",
|
||||
(char *)PTR_SEG_TO_LIN( str) );
|
||||
else
|
||||
fprintf( stdnimp, "STUB: RemoveFontResource(%04x)\n", LOWORD(str) );
|
||||
FIXME(font, "(%s): stub\n", debugres(PTR_SEG_TO_LIN(str)));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2262,10 +2242,7 @@ BOOL16 WINAPI RemoveFontResource16( SEGPTR str )
|
|||
*/
|
||||
BOOL32 WINAPI RemoveFontResource32A( LPCSTR str )
|
||||
{
|
||||
if (HIWORD(str))
|
||||
fprintf( stdnimp, "STUB: RemoveFontResource('%s')\n", str );
|
||||
else
|
||||
fprintf( stdnimp, "STUB: RemoveFontResource(%04x)\n", LOWORD(str) );
|
||||
FIXME(font, "(%s): stub\n", debugres(str));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2275,7 +2252,7 @@ BOOL32 WINAPI RemoveFontResource32A( LPCSTR str )
|
|||
*/
|
||||
BOOL32 WINAPI RemoveFontResource32W( LPCWSTR str )
|
||||
{
|
||||
fprintf( stdnimp, "STUB: RemoveFontResource32W(%p)\n", str );
|
||||
FIXME(font, "(%p): stub\n", str );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static BUILTIN16_DLL BuiltinDLLs[] =
|
|||
{ &STORAGE_Descriptor, DLL_FLAG_NOT_USED },
|
||||
{ &STRESS_Descriptor, 0 },
|
||||
{ &TOOLHELP_Descriptor, 0 },
|
||||
{ &TYPELIB_Descriptor, 0 },
|
||||
{ &TYPELIB_Descriptor, DLL_FLAG_NOT_USED },
|
||||
{ &VER_Descriptor, 0 },
|
||||
{ &W32SYS_Descriptor, 0 },
|
||||
{ &WIN32S16_Descriptor, 0 },
|
||||
|
|
|
@ -6,7 +6,10 @@ long WINAPI stub_GDI_381(HDC16 hdc, SEGPTR proc) { fprintf(stderr, "Warning: GDI
|
|||
long WINAPI stub_GDI_382(void) { fprintf(stderr, "Warning: GDI_382:ABORTPROC unimplemented stub\n"); return 1; }
|
||||
long WINAPI stub_GDI_530(void) { fprintf(stderr, "Warning: GDI_530: unimplemented stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_531(void) { fprintf(stderr, "Warning: GDI_531: unimplemented stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_532(void) { fprintf(stderr, "Warning: GDI_532: unimplemented stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_532(LPINT16 buffer, INT16 xx) {
|
||||
fprintf(stderr, "STUB GDI_532(%p, %hd)\n",buffer,xx);
|
||||
return 0;
|
||||
}
|
||||
long WINAPI stub_GDI_536(void) { fprintf(stderr, "Warning: GDI_536: unimplemented stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_538(void) { fprintf(stderr, "Warning: GDI_538: unimplemented stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_540(void) { fprintf(stderr, "Warning: GDI_540: unimplemented stub\n"); return 0; }
|
||||
|
|
|
@ -354,7 +354,7 @@ file gdi.exe
|
|||
# Stubs for Hebrew version
|
||||
530 pascal16 GDI_530() stub_GDI_530
|
||||
531 pascal16 GDI_531() stub_GDI_531
|
||||
532 pascal16 GDI_532() stub_GDI_532
|
||||
532 pascal16 GDI_532(ptr word) stub_GDI_532
|
||||
536 pascal16 GDI_536() stub_GDI_536
|
||||
538 pascal16 GDI_538() stub_GDI_538
|
||||
540 pascal16 GDI_540() stub_GDI_540
|
||||
|
|
|
@ -299,7 +299,7 @@ file krnl386.exe
|
|||
420 pascal GetFileAttributes(ptr) GetFileAttributes16
|
||||
421 pascal16 SetFileAttributes(ptr long) SetFileAttributes16
|
||||
422 pascal16 GetDiskFreeSpace(ptr ptr ptr ptr ptr) GetDiskFreeSpace16
|
||||
431 pascal16 KERNEL_431(str word) KERNEL_431
|
||||
431 pascal16 IsPeFormat(str word) IsPeFormat
|
||||
432 stub FileTimeToLocalFileTime
|
||||
434 stub KERNEL_434
|
||||
435 stub KERNEL_435
|
||||
|
@ -356,6 +356,6 @@ file krnl386.exe
|
|||
621 stub KERNEL_621
|
||||
627 stub IsBadFlatReadWritePtr
|
||||
630 stub KERNEL_630
|
||||
631 pascal FUNC004(word word word) FUNC004 #C16ThkSl01?
|
||||
631 register FUNC004(word word word) FUNC004 #C16ThkSl01?
|
||||
651 stub KERNEL_651 #ThunkConnect16?
|
||||
700 pascal KERNEL_700() stub_KERNEL_700
|
||||
|
|
|
@ -618,9 +618,17 @@ FARPROC16 WINAPI THUNK_SetResourceHandler( HMODULE16 hModule, SEGPTR typeId, FAR
|
|||
|
||||
/***********************************************************************
|
||||
* THUNK_WOWCallback16Ex (WOW32.3)(KERNEL32.55)
|
||||
* Generic thunking routine to call 16 bit functions from 32bit code.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE if the call was done
|
||||
*/
|
||||
static BOOL32 WINAPI THUNK_WOWCallback16Ex(
|
||||
FARPROC16 proc,DWORD dwFlags,DWORD cbArgs,LPVOID xargs,LPDWORD pdwret
|
||||
FARPROC16 proc, /* [in] 16bit function to call */
|
||||
DWORD dwFlags, /* [in] flags (WCB_*) */
|
||||
DWORD cbArgs, /* [in] number of arguments */
|
||||
LPVOID xargs, /* [in/out] arguments */
|
||||
LPDWORD pdwret /* [out] return value of the 16bit call */
|
||||
) {
|
||||
LPDWORD args = (LPDWORD)xargs;
|
||||
DWORD ret,i;
|
||||
|
|
|
@ -12,4 +12,4 @@ type win16
|
|||
10 stub REGISTERTYPELIB
|
||||
11 stub LOADREGTYPELIB
|
||||
14 pascal QueryPathOfRegTypeLib(ptr word word word ptr) QueryPathOfRegTypeLib
|
||||
15 stub OABUILDVERSION
|
||||
15 pascal OABuildVersion() OABuildVersion
|
||||
|
|
|
@ -399,8 +399,8 @@ file user.exe
|
|||
434 pascal16 IsCharAlphaNumeric(word) IsCharAlphaNumeric16
|
||||
435 pascal16 IsCharUpper(word) IsCharUpper16
|
||||
436 pascal16 IsCharLower(word) IsCharLower16
|
||||
437 pascal16 AnsiUpperBuff(ptr word) AnsiUpperBuff16
|
||||
438 pascal16 AnsiLowerBuff(ptr word) AnsiLowerBuff16
|
||||
437 pascal16 AnsiUpperBuff(str word) AnsiUpperBuff16
|
||||
438 pascal16 AnsiLowerBuff(str word) AnsiLowerBuff16
|
||||
441 pascal16 InsertMenuItem(word word word ptr) InsertMenuItem16
|
||||
443 stub GetMenuItemInfo
|
||||
445 pascal DefFrameProc(word word word word long) DefFrameProc16
|
||||
|
|
|
@ -2,12 +2,12 @@ name w32sys
|
|||
type win16
|
||||
|
||||
#1 WEP
|
||||
2 stub ISPEFORMAT
|
||||
2 pascal16 IsPeFormat(str word) IsPeFormat
|
||||
3 stub EXECPE
|
||||
4 stub GETPEEXEINFO
|
||||
5 return GETW32SYSVERSION 0 0x100
|
||||
6 stub LOADPERESOURCE
|
||||
7 stub GETPERESOURCETABLE
|
||||
7 pascal16 GetPEResourceTable(word) GetPEResourceTable
|
||||
8 stub EXECPEEX
|
||||
9 stub ITSME
|
||||
10 stub W32SERROR
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* XPM */
|
||||
static char * obm_restore_95[] = {
|
||||
"16 14 6 1",
|
||||
" s button_highlight c white",
|
||||
"+ s button_edge c grey85",
|
||||
"X s button_face c grey75",
|
||||
"o s button_shadow c grey50",
|
||||
". s button_text c black",
|
||||
"O s window_frame c black",
|
||||
" O",
|
||||
" +++++++++++++oO",
|
||||
" +XXX......XXXoO",
|
||||
" +XXX......XXXoO",
|
||||
" +XXX.XXXX.XXXoO",
|
||||
" +X......X.XXXoO",
|
||||
" +X......X.XXXoO",
|
||||
" +X.XXXX...XXXoO",
|
||||
" +X.XXXX.XXXXXoO",
|
||||
" +X.XXXX.XXXXXoO",
|
||||
" +X......XXXXXoO",
|
||||
" +XXXXXXXXXXXXoO",
|
||||
" ooooooooooooooO",
|
||||
"OOOOOOOOOOOOOOOO"};
|
|
@ -0,0 +1,23 @@
|
|||
/* XPM */
|
||||
static char * obm_restored_95[] = {
|
||||
"16 14 6 1",
|
||||
" s button_highlight c white",
|
||||
"+ s button_edge c grey85",
|
||||
"X s button_face c grey75",
|
||||
"o s button_shadow c grey50",
|
||||
". s button_text c black",
|
||||
"O s window_frame c black",
|
||||
"OOOOOOOOOOOOOOO ",
|
||||
"Oooooooooooooo+ ",
|
||||
"OoXXXXXXXXXXXX+ ",
|
||||
"OoXXXX......XX+ ",
|
||||
"OoXXXX......XX+ ",
|
||||
"OoXXXX.XXXX.XX+ ",
|
||||
"OoXX......X.XX+ ",
|
||||
"OoXX......X.XX+ ",
|
||||
"OoXX.XXXX...XX+ ",
|
||||
"OoXX.XXXX.XXXX+ ",
|
||||
"OoXX.XXXX.XXXX+ ",
|
||||
"OoXX......XXXX+ ",
|
||||
"O++++++++++++++ ",
|
||||
" "};
|
|
@ -0,0 +1,40 @@
|
|||
/* XPM */
|
||||
static char *ocr_appstarting[] = {
|
||||
" 32 32 3 1 0 0",
|
||||
" s None c None",
|
||||
". s black c black",
|
||||
"X s white c white",
|
||||
". ",
|
||||
".. .......... ",
|
||||
".X. ..XXXXXX.. ",
|
||||
".XX. .......... ",
|
||||
".XXX. .XXXXXX. ",
|
||||
".XXXX. .XXXXXX. ",
|
||||
".XXXXX. .XXX.XX. ",
|
||||
".XXXXXX. ..X.XX.. ",
|
||||
".XXXXXXX. ..XX.. ",
|
||||
".XXXXXXXX. ..X. ",
|
||||
".XXXXX..... ..XX.. ",
|
||||
".XX.XX. ..XXXX.. ",
|
||||
".X. .XX. .XX.XXX. ",
|
||||
".. .XX. .X.X.XX. ",
|
||||
". .XX. ..X.X.X. ",
|
||||
" .XX. .......... ",
|
||||
" .XX. ..XXXXXX.. ",
|
||||
" .XX. .......... ",
|
||||
" .. ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/* XPM */
|
||||
static char *ocr_help[] = {
|
||||
" 32 32 3 1 0 0",
|
||||
" s None c None",
|
||||
". s black c black",
|
||||
"X s white c white",
|
||||
". ",
|
||||
".. XXXXXXX ",
|
||||
".X. X.......X ",
|
||||
".XX. X...XX....X ",
|
||||
".XXX. X...X X....X ",
|
||||
".XXXX. X...X X....X ",
|
||||
".XXXXX. X...X X....X ",
|
||||
".XXXXXX. X...X X...X ",
|
||||
".XXXXXXX.XXXXX X...X ",
|
||||
".XXXXXXXX. X...X ",
|
||||
".XXXXX..... X...X ",
|
||||
".XX.XX. X...X ",
|
||||
".X. .XX. X...X ",
|
||||
".. .XX. XXX ",
|
||||
". .XX. X...X ",
|
||||
" .XX. X.....X ",
|
||||
" .XX. X...X ",
|
||||
" .XX. XXX ",
|
||||
" .. ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/* XPM */
|
||||
static char *ocr_no[] = {
|
||||
"32 32 3 1 16 16",
|
||||
" s None c None",
|
||||
". s white c white",
|
||||
"X s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ...... ",
|
||||
" ..XXXXXX.. ",
|
||||
" .XXXXXXXXXX. ",
|
||||
" .XXXX....XXXX. ",
|
||||
" .XXX.. ..XXX. ",
|
||||
" .XXXXX. .XXX. ",
|
||||
" .XX.XXX. .XX. ",
|
||||
" .XXX..XXX. .XXX. ",
|
||||
" .XX. .XXX. .XX. ",
|
||||
" .XX. .XXX. .XX. ",
|
||||
" .XX. .XXX. .XX. ",
|
||||
" .XX. .XXX. .XX. ",
|
||||
" .XXX. .XXX..XXX. ",
|
||||
" .XX. .XXX.XX. ",
|
||||
" .XXX. .XXXXX. ",
|
||||
" .XXX.. ..XXX. ",
|
||||
" .XXXX....XXXX. ",
|
||||
" .XXXXXXXXXX. ",
|
||||
" ..XXXXXX.. ",
|
||||
" ...... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -31,11 +31,11 @@ typedef struct
|
|||
UINT32 dwStyle;
|
||||
HWND32 hWndEdit;
|
||||
HWND32 hWndLBox;
|
||||
UINT16 wState;
|
||||
HFONT16 hFont;
|
||||
RECT16 RectCombo;
|
||||
RECT16 RectEdit;
|
||||
RECT16 RectButton;
|
||||
UINT32 wState;
|
||||
HFONT32 hFont;
|
||||
RECT32 RectCombo;
|
||||
RECT32 RectEdit;
|
||||
RECT32 RectButton;
|
||||
INT32 droppedWidth; /* last two are not used unless set */
|
||||
INT32 editHeight; /* explicitly */
|
||||
} HEADCOMBO,*LPHEADCOMBO;
|
||||
|
|
|
@ -9,6 +9,21 @@
|
|||
|
||||
void WINAPI InitCommonControls(void);
|
||||
|
||||
/* common control styles */
|
||||
|
||||
#define CCS_TOP 0x00000001L
|
||||
#define CCS_NOMOVEY 0x00000002L
|
||||
#define CCS_BOTTOM 0x00000003L
|
||||
#define CCS_NORESIZE 0x00000004L
|
||||
#define CCS_NOPARENTALIGN 0x00000008L
|
||||
#define CCS_ADJUSTABLE 0x00000020L
|
||||
#define CCS_NODIVIDER 0x00000040L
|
||||
#define CCS_VERT 0x00000080L
|
||||
#define CCS_LEFT (CCS_VERT|CCS_TOP)
|
||||
#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
|
||||
#define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
|
||||
|
||||
|
||||
/* StatusWindow */
|
||||
|
||||
#define STATUSCLASSNAME16 "msctls_statusbar"
|
||||
|
@ -38,7 +53,6 @@ void WINAPI InitCommonControls(void);
|
|||
#define SBT_RTLREADING 0x0400
|
||||
#define SBT_OWNERDRAW 0x1000
|
||||
|
||||
#define CCS_BOTTOM 0x0003
|
||||
#define SBARS_SIZEGRIP 0x0100
|
||||
|
||||
/* UpDown */
|
||||
|
@ -117,19 +131,19 @@ struct _IMAGELIST;
|
|||
typedef struct _IMAGELIST *HIMAGELIST;
|
||||
#endif /* __WINE__ */
|
||||
|
||||
#define CLR_NONE 0xFFFFFFFF
|
||||
#define CLR_DEFAULT 0x00000000
|
||||
#define CLR_HILIGHT CLR_DEFAULT
|
||||
#define CLR_NONE 0xFFFFFFFF
|
||||
#define CLR_DEFAULT 0xFF000000
|
||||
#define CLR_HILIGHT CLR_DEFAULT
|
||||
|
||||
#define ILC_MASK 0x0001
|
||||
#define ILC_COLOR 0x0000
|
||||
#define ILC_COLORDDB 0x00FE
|
||||
#define ILC_COLOR4 0x0004
|
||||
#define ILC_COLOR8 0x0008
|
||||
#define ILC_COLOR16 0x0010
|
||||
#define ILC_COLOR24 0x0018
|
||||
#define ILC_COLOR32 0x0020
|
||||
#define ILC_PALETTE 0x0800
|
||||
#define ILC_MASK 0x0001
|
||||
#define ILC_COLOR 0x0000
|
||||
#define ILC_COLORDDB 0x00FE
|
||||
#define ILC_COLOR4 0x0004
|
||||
#define ILC_COLOR8 0x0008
|
||||
#define ILC_COLOR16 0x0010
|
||||
#define ILC_COLOR24 0x0018
|
||||
#define ILC_COLOR32 0x0020
|
||||
#define ILC_PALETTE 0x0800 /* no longer supported by M$ */
|
||||
|
||||
#define ILD_NORMAL 0x0000
|
||||
#define ILD_TRANSPARENT 0x0001
|
||||
|
@ -146,6 +160,10 @@ typedef struct _IMAGELIST *HIMAGELIST;
|
|||
|
||||
#define INDEXTOOVERLAYMASK(i) ((i)<<8)
|
||||
|
||||
#define ILCF_MOVE (0x00000000)
|
||||
#define ILCF_SWAP (0x00000001)
|
||||
|
||||
|
||||
typedef struct _IMAGEINFO
|
||||
{
|
||||
HBITMAP32 hbmImage;
|
||||
|
@ -156,20 +174,48 @@ typedef struct _IMAGEINFO
|
|||
} IMAGEINFO;
|
||||
|
||||
|
||||
typedef struct _IMAGELISTDRAWPARAMS
|
||||
{
|
||||
DWORD cbSize;
|
||||
HIMAGELIST himl;
|
||||
INT32 i;
|
||||
HDC32 hdcDst;
|
||||
INT32 x;
|
||||
INT32 y;
|
||||
INT32 cx;
|
||||
INT32 cy;
|
||||
INT32 xBitmap; // x offest from the upperleft of bitmap
|
||||
INT32 yBitmap; // y offset from the upperleft of bitmap
|
||||
COLORREF rgbBk;
|
||||
COLORREF rgbFg;
|
||||
UINT32 fStyle;
|
||||
DWORD dwRop;
|
||||
} IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
|
||||
|
||||
|
||||
INT32 WINAPI ImageList_Add(HIMAGELIST,HBITMAP32,HBITMAP32);
|
||||
INT32 WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP32,COLORREF);
|
||||
|
||||
BOOL32 WINAPI ImageList_BeginDrag(HIMAGELIST,INT32,INT32,INT32);
|
||||
BOOL32 WINAPI ImageList_Copy(HIMAGELIST,INT32,HIMAGELIST,INT32,INT32);
|
||||
HIMAGELIST WINAPI ImageList_Create(INT32,INT32,UINT32,INT32,INT32);
|
||||
BOOL32 WINAPI ImageList_Destroy(HIMAGELIST);
|
||||
|
||||
BOOL32 WINAPI ImageList_DragEnter(HWND32,INT32,INT32);
|
||||
BOOL32 WINAPI ImageList_DragLeave(HWND32);
|
||||
BOOL32 WINAPI ImageList_DragMove(INT32,INT32);
|
||||
BOOL32 WINAPI ImageList_DragShowNolock (BOOL32 bShow);
|
||||
BOOL32 WINAPI ImageList_Draw(HIMAGELIST,INT32,HDC32,INT32,INT32,UINT32);
|
||||
|
||||
BOOL32 WINAPI ImageList_DrawEx(HIMAGELIST,INT32,HDC32,INT32,INT32,INT32,
|
||||
INT32,COLORREF,COLORREF,UINT32);
|
||||
BOOL32 WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
|
||||
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
|
||||
BOOL32 WINAPI ImageList_EndDrag (VOID);
|
||||
COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
|
||||
|
||||
HIMAGELIST WINAPI ImageList_GetDragImage(POINT32*,POINT32*);
|
||||
HICON32 WINAPI ImageList_GetIcon(HIMAGELIST,INT32,UINT32);
|
||||
BOOL32 WINAPI ImageList_GetIconSize(HIMAGELIST,INT32*,INT32*);
|
||||
INT32 WINAPI ImageList_GetImageCount(HIMAGELIST);
|
||||
BOOL32 WINAPI ImageList_GetImageInfo(HIMAGELIST,INT32,IMAGEINFO*);
|
||||
|
||||
BOOL32 WINAPI ImageList_GetImageRect (HIMAGELIST,INT32,LPRECT32);
|
||||
HIMAGELIST WINAPI ImageList_LoadImage32A(HINSTANCE32,LPCSTR,INT32,INT32,
|
||||
COLORREF,UINT32,UINT32);
|
||||
HIMAGELIST WINAPI ImageList_LoadImage32W(HINSTANCE32,LPCWSTR,INT32,INT32,
|
||||
|
@ -177,15 +223,21 @@ HIMAGELIST WINAPI ImageList_LoadImage32W(HINSTANCE32,LPCWSTR,INT32,INT32,
|
|||
#define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
|
||||
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT32,HIMAGELIST,INT32,INT32,INT32);
|
||||
|
||||
BOOL32 WINAPI ImageList_Remove(HIMAGELIST,INT32);
|
||||
BOOL32 WINAPI ImageList_Replace(HIMAGELIST,INT32,HBITMAP32,HBITMAP32);
|
||||
INT32 WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT32,HICON32);
|
||||
|
||||
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
|
||||
|
||||
BOOL32 WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT32,INT32,INT32);
|
||||
BOOL32 WINAPI ImageList_SetIconSize (HIMAGELIST,INT32,INT32);
|
||||
BOOL32 WINAPI ImageList_SetImageCount (HIMAGELIST,INT32);
|
||||
BOOL32 WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT32,INT32);
|
||||
|
||||
#define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
|
||||
#define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
|
||||
#define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
|
||||
ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
|
||||
#define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
|
||||
|
||||
|
||||
#endif /* __WINE_COMMCTRL_H */
|
||||
|
|
|
@ -174,7 +174,8 @@ typedef FINDREPLACE *LPFINDREPLACE;
|
|||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
DWORD lStructSize;
|
||||
HWND16 hwndOwner; /* caller's window handle */
|
||||
HDC16 hDC; /* printer DC/IC or NULL */
|
||||
|
@ -195,8 +196,27 @@ typedef struct {
|
|||
short nSizeMin WINE_PACKED; /* minimum pt size allowed & */
|
||||
short nSizeMax WINE_PACKED; /* max pt size allowed if */
|
||||
/* CF_LIMITSIZE is used */
|
||||
} CHOOSEFONT;
|
||||
typedef CHOOSEFONT *LPCHOOSEFONT;
|
||||
} CHOOSEFONT, *LPCHOOSEFONT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 lStructSize;
|
||||
HWND32 hwndOwner;
|
||||
HDC32 hDC;
|
||||
LPLOGFONT32A lpLogFont;
|
||||
INT32 iPointSize;
|
||||
UINT32 Flags;
|
||||
COLORREF rgbColors;
|
||||
LPARAM lCustData;
|
||||
WNDPROC32 lpfnHook;
|
||||
LPCSTR lpTemplateName;
|
||||
HINSTANCE32 hInstance;
|
||||
LPSTR lpszStyle;
|
||||
UINT16 nFontType;
|
||||
UINT16 ___MISSING_ALIGNMENT__;
|
||||
INT32 nSizeMin;
|
||||
INT32 nSizeMax;
|
||||
} CHOOSEFONT32A, *PCHOOSEFONT32A;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
|
|
|
@ -24,6 +24,10 @@ OLESTATUS WINAPI CLSIDFromString32(LPCOLESTR32, CLSID *);
|
|||
|
||||
OLESTATUS WINAPI WINE_StringFromCLSID(const CLSID *id, LPSTR);
|
||||
|
||||
OLESTATUS WINAPI StringFromGUID2(const REFGUID *id, LPOLESTR32 *str, INT32 cmax);
|
||||
// #define StringFromGUID2 WINELIB_NAME(StringFromGUID2)
|
||||
|
||||
|
||||
#ifdef INITGUID
|
||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
const GUID name =\
|
||||
|
|
197
include/debug.h
197
include/debug.h
|
@ -6,97 +6,112 @@
|
|||
|
||||
/* Definitions for channels identifiers */
|
||||
#define dbch_accel 0
|
||||
#define dbch_aspi 1
|
||||
#define dbch_atom 2
|
||||
#define dbch_bitblt 3
|
||||
#define dbch_bitmap 4
|
||||
#define dbch_caret 5
|
||||
#define dbch_cdaudio 6
|
||||
#define dbch_class 7
|
||||
#define dbch_clipboard 8
|
||||
#define dbch_clipping 9
|
||||
#define dbch_combo 10
|
||||
#define dbch_comm 11
|
||||
#define dbch_commdlg 12
|
||||
#define dbch_console 13
|
||||
#define dbch_crtdll 14
|
||||
#define dbch_cursor 15
|
||||
#define dbch_dc 16
|
||||
#define dbch_dde 17
|
||||
#define dbch_ddeml 18
|
||||
#define dbch_ddraw 19
|
||||
#define dbch_dialog 20
|
||||
#define dbch_dll 21
|
||||
#define dbch_dosfs 22
|
||||
#define dbch_driver 23
|
||||
#define dbch_dsound 24
|
||||
#define dbch_edit 25
|
||||
#define dbch_event 26
|
||||
#define dbch_exec 27
|
||||
#define dbch_file 28
|
||||
#define dbch_fixup 29
|
||||
#define dbch_font 30
|
||||
#define dbch_gdi 31
|
||||
#define dbch_global 32
|
||||
#define dbch_graphics 33
|
||||
#define dbch_heap 34
|
||||
#define dbch_hook 35
|
||||
#define dbch_icon 36
|
||||
#define dbch_int 37
|
||||
#define dbch_int21 38
|
||||
#define dbch_key 39
|
||||
#define dbch_keyboard 40
|
||||
#define dbch_ldt 41
|
||||
#define dbch_listbox 42
|
||||
#define dbch_local 43
|
||||
#define dbch_mci 44
|
||||
#define dbch_mcianim 45
|
||||
#define dbch_mciwave 46
|
||||
#define dbch_mdi 47
|
||||
#define dbch_menu 48
|
||||
#define dbch_message 49
|
||||
#define dbch_metafile 50
|
||||
#define dbch_midi 51
|
||||
#define dbch_mmaux 52
|
||||
#define dbch_mmio 53
|
||||
#define dbch_mmsys 54
|
||||
#define dbch_mmtime 55
|
||||
#define dbch_module 56
|
||||
#define dbch_msg 57
|
||||
#define dbch_nonclient 58
|
||||
#define dbch_ole 59
|
||||
#define dbch_palette 60
|
||||
#define dbch_profile 61
|
||||
#define dbch_progress 62
|
||||
#define dbch_prop 63
|
||||
#define dbch_reg 64
|
||||
#define dbch_region 65
|
||||
#define dbch_relay 66
|
||||
#define dbch_resource 67
|
||||
#define dbch_scroll 68
|
||||
#define dbch_selector 69
|
||||
#define dbch_sem 70
|
||||
#define dbch_sendmsg 71
|
||||
#define dbch_shm 72
|
||||
#define dbch_static 73
|
||||
#define dbch_stress 74
|
||||
#define dbch_string 75
|
||||
#define dbch_task 76
|
||||
#define dbch_text 77
|
||||
#define dbch_thunk 78
|
||||
#define dbch_timer 79
|
||||
#define dbch_toolhelp 80
|
||||
#define dbch_tweak 81
|
||||
#define dbch_uitools 82
|
||||
#define dbch_updown 83
|
||||
#define dbch_ver 84
|
||||
#define dbch_virtual 85
|
||||
#define dbch_vxd 86
|
||||
#define dbch_win 87
|
||||
#define dbch_win16drv 88
|
||||
#define dbch_win32 89
|
||||
#define dbch_winsock 90
|
||||
#define dbch_x11 91
|
||||
#define dbch_advapi 1
|
||||
#define dbch_aspi 2
|
||||
#define dbch_atom 3
|
||||
#define dbch_bitblt 4
|
||||
#define dbch_bitmap 5
|
||||
#define dbch_caret 6
|
||||
#define dbch_cd 7
|
||||
#define dbch_cdaudio 8
|
||||
#define dbch_class 9
|
||||
#define dbch_clipboard 10
|
||||
#define dbch_clipping 11
|
||||
#define dbch_combo 12
|
||||
#define dbch_comm 13
|
||||
#define dbch_commdlg 14
|
||||
#define dbch_console 15
|
||||
#define dbch_crtdll 16
|
||||
#define dbch_cursor 17
|
||||
#define dbch_dc 18
|
||||
#define dbch_dde 19
|
||||
#define dbch_ddeml 20
|
||||
#define dbch_ddraw 21
|
||||
#define dbch_debug 22
|
||||
#define dbch_dialog 23
|
||||
#define dbch_dll 24
|
||||
#define dbch_dosfs 25
|
||||
#define dbch_driver 26
|
||||
#define dbch_dsound 27
|
||||
#define dbch_edit 28
|
||||
#define dbch_event 29
|
||||
#define dbch_exec 30
|
||||
#define dbch_file 31
|
||||
#define dbch_fixup 32
|
||||
#define dbch_font 33
|
||||
#define dbch_gdi 34
|
||||
#define dbch_global 35
|
||||
#define dbch_graphics 36
|
||||
#define dbch_heap 37
|
||||
#define dbch_hook 38
|
||||
#define dbch_icon 39
|
||||
#define dbch_imagelist 40
|
||||
#define dbch_int 41
|
||||
#define dbch_int21 42
|
||||
#define dbch_int31 43
|
||||
#define dbch_key 44
|
||||
#define dbch_keyboard 45
|
||||
#define dbch_ldt 46
|
||||
#define dbch_listbox 47
|
||||
#define dbch_local 48
|
||||
#define dbch_mci 49
|
||||
#define dbch_mcianim 50
|
||||
#define dbch_mciwave 51
|
||||
#define dbch_mdi 52
|
||||
#define dbch_menu 53
|
||||
#define dbch_message 54
|
||||
#define dbch_metafile 55
|
||||
#define dbch_midi 56
|
||||
#define dbch_mmaux 57
|
||||
#define dbch_mmio 58
|
||||
#define dbch_mmsys 59
|
||||
#define dbch_mmtime 60
|
||||
#define dbch_module 61
|
||||
#define dbch_mpr 62
|
||||
#define dbch_msg 63
|
||||
#define dbch_nonclient 64
|
||||
#define dbch_ntdll 65
|
||||
#define dbch_ole 66
|
||||
#define dbch_palette 67
|
||||
#define dbch_print 68
|
||||
#define dbch_profile 69
|
||||
#define dbch_progress 70
|
||||
#define dbch_prop 71
|
||||
#define dbch_reg 72
|
||||
#define dbch_region 73
|
||||
#define dbch_relay 74
|
||||
#define dbch_resource 75
|
||||
#define dbch_scroll 76
|
||||
#define dbch_security 77
|
||||
#define dbch_selector 78
|
||||
#define dbch_sem 79
|
||||
#define dbch_sendmsg 80
|
||||
#define dbch_shell 81
|
||||
#define dbch_shm 82
|
||||
#define dbch_sound 83
|
||||
#define dbch_static 84
|
||||
#define dbch_stress 85
|
||||
#define dbch_string 86
|
||||
#define dbch_task 87
|
||||
#define dbch_text 88
|
||||
#define dbch_thread 89
|
||||
#define dbch_thunk 90
|
||||
#define dbch_timer 91
|
||||
#define dbch_toolhelp 92
|
||||
#define dbch_tweak 93
|
||||
#define dbch_uitools 94
|
||||
#define dbch_updown 95
|
||||
#define dbch_ver 96
|
||||
#define dbch_virtual 97
|
||||
#define dbch_vxd 98
|
||||
#define dbch_win 99
|
||||
#define dbch_win16drv 100
|
||||
#define dbch_win32 101
|
||||
#define dbch_wing 102
|
||||
#define dbch_winsock 103
|
||||
#define dbch_wnet 104
|
||||
#define dbch_x11 105
|
||||
#define dbch_x11drv 106
|
||||
/* Definitions for classes identifiers */
|
||||
#define dbcl_fixme 0
|
||||
#define dbcl_err 1
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "debugtools.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_CHANNEL_COUNT 92
|
||||
#define DEBUG_CHANNEL_COUNT 107
|
||||
#ifdef DEBUG_RUNTIME
|
||||
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
||||
{1, 1, 0, 0},
|
||||
|
@ -99,14 +99,31 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
|||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
};
|
||||
const char* debug_ch_name[] = {
|
||||
"accel",
|
||||
"advapi",
|
||||
"aspi",
|
||||
"atom",
|
||||
"bitblt",
|
||||
"bitmap",
|
||||
"caret",
|
||||
"cd",
|
||||
"cdaudio",
|
||||
"class",
|
||||
"clipboard",
|
||||
|
@ -121,6 +138,7 @@ const char* debug_ch_name[] = {
|
|||
"dde",
|
||||
"ddeml",
|
||||
"ddraw",
|
||||
"debug",
|
||||
"dialog",
|
||||
"dll",
|
||||
"dosfs",
|
||||
|
@ -138,8 +156,10 @@ const char* debug_ch_name[] = {
|
|||
"heap",
|
||||
"hook",
|
||||
"icon",
|
||||
"imagelist",
|
||||
"int",
|
||||
"int21",
|
||||
"int31",
|
||||
"key",
|
||||
"keyboard",
|
||||
"ldt",
|
||||
|
@ -158,10 +178,13 @@ const char* debug_ch_name[] = {
|
|||
"mmsys",
|
||||
"mmtime",
|
||||
"module",
|
||||
"mpr",
|
||||
"msg",
|
||||
"nonclient",
|
||||
"ntdll",
|
||||
"ole",
|
||||
"palette",
|
||||
"print",
|
||||
"profile",
|
||||
"progress",
|
||||
"prop",
|
||||
|
@ -170,15 +193,19 @@ const char* debug_ch_name[] = {
|
|||
"relay",
|
||||
"resource",
|
||||
"scroll",
|
||||
"security",
|
||||
"selector",
|
||||
"sem",
|
||||
"sendmsg",
|
||||
"shell",
|
||||
"shm",
|
||||
"sound",
|
||||
"static",
|
||||
"stress",
|
||||
"string",
|
||||
"task",
|
||||
"text",
|
||||
"thread",
|
||||
"thunk",
|
||||
"timer",
|
||||
"toolhelp",
|
||||
|
@ -191,8 +218,11 @@ const char* debug_ch_name[] = {
|
|||
"win",
|
||||
"win16drv",
|
||||
"win32",
|
||||
"wing",
|
||||
"winsock",
|
||||
"wnet",
|
||||
"x11",
|
||||
"x11drv",
|
||||
};
|
||||
const char* debug_cl_name[] = {
|
||||
"fixme",
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
#define __WINE_DEBUGTOOLS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "debugstr.h"
|
||||
|
||||
#define DEBUG_RUNTIME
|
||||
#define stddeb stdout
|
||||
#define stdnimp stdout
|
||||
#define stddeb stderr
|
||||
|
||||
#define DEBUG_CLASS_COUNT 4
|
||||
|
||||
|
@ -31,8 +31,7 @@ extern short debug_msg_enabled[][DEBUG_CLASS_COUNT];
|
|||
(dbg_ch_index(ch) >=0 && dbg_cl_index(cl) >= 0 && \
|
||||
debug_msg_enabled[dbg_ch_index(ch)][dbg_cl_index(cl)])
|
||||
|
||||
#define DPRINTF(format, args...) \
|
||||
fprintf(stddeb, format, ## args)
|
||||
#define DPRINTF(format, args...) fprintf(stddeb, format, ## args)
|
||||
|
||||
#define DPRINTF_(cl, ch, format, args...) \
|
||||
if(!DEBUGGING(cl, ch)) ; \
|
||||
|
@ -43,6 +42,9 @@ extern short debug_msg_enabled[][DEBUG_CLASS_COUNT];
|
|||
#define FIXME(ch, fmt, args...) DPRINTF_(fixme, ch, fmt, ## args)
|
||||
#define ERR(ch, fmt, args...) DPRINTF_(err, ch, fmt, ## args)
|
||||
|
||||
#define DUMP(format, args...) DPRINTF(format, ## args)
|
||||
#define MSG(format, args...) fprintf(stderr, format, ## args)
|
||||
|
||||
#define FIXME_ON(ch) DEBUGGING(fixme, ch)
|
||||
#define ERR_ON(ch) DEBUGGING(err, ch)
|
||||
#define WARN_ON(ch) DEBUGGING(warn, ch)
|
||||
|
|
|
@ -44,4 +44,26 @@ extern LPSTR HEAP_strdupWtoA( HANDLE32 heap, DWORD flags, LPCWSTR str );
|
|||
/* Use this one only when you own the lock! */
|
||||
#define SYSTEM_LOCK_COUNT() (HEAP_SystemLock->RecursionCount)
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LPVOID lpData;
|
||||
DWORD cbData;
|
||||
BYTE cbOverhead;
|
||||
BYTE iRegionIndex;
|
||||
WORD wFlags;
|
||||
union {
|
||||
struct {
|
||||
HANDLE32 hMem;
|
||||
DWORD dwReserved[3];
|
||||
} Block;
|
||||
struct {
|
||||
DWORD dwCommittedSize;
|
||||
DWORD dwUnCommittedSize;
|
||||
LPVOID lpFirstBlock;
|
||||
LPVOID lpLastBlock;
|
||||
} Region;
|
||||
} Foo;
|
||||
} PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY;
|
||||
|
||||
#endif /* __WINE_HEAP_H */
|
||||
|
|
|
@ -9,20 +9,24 @@
|
|||
|
||||
struct _IMAGELIST
|
||||
{
|
||||
HANDLE32 hHeap;
|
||||
HBITMAP32 hbmImage;
|
||||
HBITMAP32 hbmMask;
|
||||
HBRUSH32 hbrushBlend25;
|
||||
HBRUSH32 hbrushBlend50;
|
||||
COLORREF clrBk;
|
||||
INT32 cInitial;
|
||||
INT32 cGrow;
|
||||
INT32 cMaxImage;
|
||||
INT32 cCurImage;
|
||||
INT32 cx;
|
||||
INT32 cy;
|
||||
UINT32 flags;
|
||||
INT32 nOvlIdx[4];
|
||||
UINT32 uBitsPixel;
|
||||
INT32 nOvlIdx[15];
|
||||
};
|
||||
|
||||
typedef struct _IMAGELIST *HIMAGELIST;
|
||||
|
||||
|
||||
#endif /* __WINE_IMAGELIST_H */
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "gdi.h"
|
||||
|
||||
/* FIXME: SDK docs says these should be 1 and 2 */
|
||||
/* DR 980322: most wmf's have 1, so I think 0 and 1 is correct */
|
||||
#define METAFILE_MEMORY 0
|
||||
#define METAFILE_DISK 1
|
||||
|
||||
|
|
|
@ -481,6 +481,8 @@ typedef WORD *LPKEYARRAY;
|
|||
#define MOM_CLOSE MM_MOM_CLOSE
|
||||
#define MOM_DONE MM_MOM_DONE
|
||||
|
||||
/* device ID for MIDI mapper */
|
||||
|
||||
#define MIDIMAPPER (-1)
|
||||
#define MIDI_MAPPER (-1)
|
||||
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
/*****************************************************************************
|
||||
* Copyright 1998, Luiz Otavio L. Zorzella
|
||||
*
|
||||
* File: multimedia.h
|
||||
* Purpose: multimedia declarations
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
#ifndef __WINE_MULTIMEDIA_H
|
||||
#define __WINE_MULTIMEDIA_H
|
||||
|
||||
#include "mmsystem.h"
|
||||
|
||||
#define MAX_MIDIINDRV (1)
|
||||
/* For now I'm making 16 the maximum number of midi devices one can
|
||||
* have. This should be more than enough for everybody. But as a purist,
|
||||
* I intend to make it unbounded in the future, as soon as I figure
|
||||
* a good way to do so.
|
||||
*/
|
||||
#define MAX_MIDIOUTDRV (16)
|
||||
#define MAX_MCIMIDIDRV (1)
|
||||
|
||||
#if defined (linux)
|
||||
#define __HAS_SOUNDCARD_H__
|
||||
#include <sys/soundcard.h>
|
||||
#elif defined (__FreeBSD__)
|
||||
#define __HAS_SOUNDCARD_H__
|
||||
#include <machine/soundcard.h>
|
||||
#include <sys/errno.h>
|
||||
#endif
|
||||
|
||||
#if defined (__HAS_SOUNDCARD_H__)
|
||||
|
||||
#define MIDI_DEV "/dev/sequencer"
|
||||
|
||||
#ifdef SOUND_VERSION
|
||||
#define IOCTL(a,b,c) ioctl(a,b,&c)
|
||||
#else
|
||||
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int unixdev;
|
||||
int state;
|
||||
DWORD bufsize;
|
||||
MIDIOPENDESC midiDesc;
|
||||
WORD wFlags;
|
||||
LPMIDIHDR lpQueueHdr;
|
||||
DWORD dwTotalPlayed;
|
||||
} LINUX_MIDIIN;
|
||||
|
||||
typedef struct {
|
||||
int unixdev;
|
||||
int state;
|
||||
DWORD bufsize;
|
||||
MIDIOPENDESC midiDesc;
|
||||
WORD wFlags;
|
||||
LPMIDIHDR lpQueueHdr;
|
||||
DWORD dwTotalPlayed;
|
||||
} LINUX_MIDIOUT;
|
||||
|
||||
typedef struct {
|
||||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL16 fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
HMMIO16 hFile; /* mmio file handle open as Element */
|
||||
DWORD dwBeginData;
|
||||
DWORD dwTotalLen;
|
||||
WORD wFormat;
|
||||
WORD nTracks;
|
||||
WORD nTempo;
|
||||
MCI_OPEN_PARMS16 openParms;
|
||||
/* MIDIHDR MidiHdr; */
|
||||
HLOCAL16 hMidiHdr;
|
||||
WORD dwStatus;
|
||||
} LINUX_MCIMIDI;
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __WINE_MULTIMEDIA_H */
|
|
@ -31,9 +31,7 @@ typedef struct
|
|||
WORD e_oemid; /* 24: OEM identifier (for e_oeminfo) */
|
||||
WORD e_oeminfo; /* 26: OEM information; e_oemid specific */
|
||||
WORD e_res2[10]; /* 28: Reserved words */
|
||||
WORD e_lfanew; /* 3c: Offset to extended header */
|
||||
WORD e_xxx; /* 3e: Wine internal pad (some programs expect
|
||||
* this to be 0) */
|
||||
DWORD e_lfanew; /* 3c: Offset to extended header */
|
||||
} IMAGE_DOS_HEADER,*LPIMAGE_DOS_HEADER;
|
||||
|
||||
#define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
|
||||
|
|
|
@ -59,41 +59,42 @@ typedef struct _IMAGE_OPTIONAL_HEADER
|
|||
* Standard fields.
|
||||
*/
|
||||
|
||||
WORD Magic;
|
||||
BYTE MajorLinkerVersion;
|
||||
BYTE MinorLinkerVersion;
|
||||
DWORD SizeOfCode;
|
||||
DWORD SizeOfInitializedData;
|
||||
DWORD SizeOfUninitializedData;
|
||||
DWORD AddressOfEntryPoint;
|
||||
DWORD BaseOfCode;
|
||||
DWORD BaseOfData;
|
||||
WORD Magic; /* 00 */
|
||||
BYTE MajorLinkerVersion; /* 02 */
|
||||
BYTE MinorLinkerVersion; /* 03 */
|
||||
DWORD SizeOfCode; /* 04 */
|
||||
DWORD SizeOfInitializedData; /* 08 */
|
||||
DWORD SizeOfUninitializedData; /* 0C */
|
||||
DWORD AddressOfEntryPoint; /* 10 */
|
||||
DWORD BaseOfCode; /* 14 */
|
||||
DWORD BaseOfData; /* 18 */
|
||||
|
||||
/*
|
||||
* NT additional fields.
|
||||
*/
|
||||
|
||||
DWORD ImageBase;
|
||||
DWORD SectionAlignment;
|
||||
DWORD FileAlignment;
|
||||
WORD MajorOperatingSystemVersion;
|
||||
WORD MinorOperatingSystemVersion;
|
||||
WORD MajorImageVersion;
|
||||
WORD MinorImageVersion;
|
||||
WORD MajorSubsystemVersion;
|
||||
WORD MinorSubsystemVersion;
|
||||
DWORD Reserved1;
|
||||
DWORD SizeOfImage;
|
||||
DWORD SizeOfHeaders;
|
||||
DWORD CheckSum;
|
||||
WORD Subsystem;
|
||||
WORD DllCharacteristics;
|
||||
DWORD SizeOfStackReserve;
|
||||
DWORD SizeOfStackCommit;
|
||||
DWORD SizeOfHeapReserve;
|
||||
DWORD SizeOfHeapCommit;
|
||||
DWORD LoaderFlags;
|
||||
DWORD NumberOfRvaAndSizes;
|
||||
DWORD ImageBase; /* 1C */
|
||||
DWORD SectionAlignment; /* 20 */
|
||||
DWORD FileAlignment; /* 24 */
|
||||
WORD MajorOperatingSystemVersion; /* 28 */
|
||||
WORD MinorOperatingSystemVersion; /* 2A */
|
||||
WORD MajorImageVersion; /* 2C */
|
||||
WORD MinorImageVersion; /* 2E */
|
||||
WORD MajorSubsystemVersion; /* 30 */
|
||||
WORD MinorSubsystemVersion; /* 32 */
|
||||
DWORD Reserved1; /* 34 */
|
||||
DWORD SizeOfImage; /* 38 */
|
||||
DWORD SizeOfHeaders; /* 3C */
|
||||
DWORD CheckSum; /* 40 */
|
||||
WORD Subsystem; /* 44 */
|
||||
WORD DllCharacteristics; /* 46 */
|
||||
DWORD SizeOfStackReserve; /* 48 */
|
||||
DWORD SizeOfStackCommit; /* 4C */
|
||||
DWORD SizeOfHeapReserve; /* 50 */
|
||||
DWORD SizeOfHeapCommit; /* 54 */
|
||||
DWORD LoaderFlags; /* 58 */
|
||||
DWORD NumberOfRvaAndSizes; /* 5C */
|
||||
/* 60: */
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
} IMAGE_OPTIONAL_HEADER,*LPIMAGE_OPTIONAL_HEADER;
|
||||
|
||||
|
@ -140,9 +141,9 @@ typedef struct _IMAGE_OPTIONAL_HEADER
|
|||
#define IMAGE_SUBSYSTEM_POSIX_CUI 7
|
||||
|
||||
typedef struct _IMAGE_NT_HEADERS {
|
||||
DWORD Signature;
|
||||
IMAGE_FILE_HEADER FileHeader;
|
||||
IMAGE_OPTIONAL_HEADER OptionalHeader;
|
||||
DWORD Signature; /* 00: PE\0\0 */
|
||||
IMAGE_FILE_HEADER FileHeader; /* 04: Fileheader */
|
||||
IMAGE_OPTIONAL_HEADER OptionalHeader; /* 18: Optional Header */
|
||||
} IMAGE_NT_HEADERS,*LPIMAGE_NT_HEADERS;
|
||||
|
||||
|
||||
|
@ -161,19 +162,20 @@ typedef struct _IMAGE_NT_HEADERS {
|
|||
#define IMAGE_SIZEOF_SHORT_NAME 8
|
||||
|
||||
typedef struct _IMAGE_SECTION_HEADER {
|
||||
BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
|
||||
BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; /* 00: */
|
||||
union {
|
||||
DWORD PhysicalAddress;
|
||||
DWORD VirtualSize;
|
||||
DWORD PhysicalAddress; /* 04: */
|
||||
DWORD VirtualSize; /* 04: */
|
||||
} Misc;
|
||||
DWORD VirtualAddress;
|
||||
DWORD SizeOfRawData;
|
||||
DWORD PointerToRawData;
|
||||
DWORD PointerToRelocations;
|
||||
DWORD PointerToLinenumbers;
|
||||
WORD NumberOfRelocations;
|
||||
WORD NumberOfLinenumbers;
|
||||
DWORD Characteristics;
|
||||
DWORD VirtualAddress; /* 08: */
|
||||
DWORD SizeOfRawData; /* 0C: */
|
||||
DWORD PointerToRawData; /* 10: */
|
||||
DWORD PointerToRelocations; /* 14: */
|
||||
DWORD PointerToLinenumbers; /* 18: */
|
||||
WORD NumberOfRelocations; /* 1C: */
|
||||
WORD NumberOfLinenumbers; /* 1E: */
|
||||
DWORD Characteristics; /* 20: */
|
||||
/* 24: */
|
||||
} IMAGE_SECTION_HEADER,*LPIMAGE_SECTION_HEADER;
|
||||
|
||||
#define IMAGE_SIZEOF_SECTION_HEADER 40
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define WINE_RELEASE_INFO "Wine release 980315"
|
||||
#define WINE_RELEASE_INFO "Wine release 980329"
|
||||
|
|
|
@ -817,6 +817,8 @@ DECL_WINELIB_TYPE(LPDEBUGHOOKINFO);
|
|||
#define IDIGNORE 5
|
||||
#define IDYES 6
|
||||
#define IDNO 7
|
||||
#define IDCLOSE 8
|
||||
#define IDHELP 9
|
||||
|
||||
|
||||
typedef struct
|
||||
|
@ -2495,6 +2497,9 @@ typedef struct tagCOMSTAT
|
|||
#define IDC_SIZENESW MAKEINTRESOURCE(32643)
|
||||
#define IDC_SIZEWE MAKEINTRESOURCE(32644)
|
||||
#define IDC_SIZENS MAKEINTRESOURCE(32645)
|
||||
#define IDC_NO MAKEINTRESOURCE(32648)
|
||||
#define IDC_APPSTARTING MAKEINTRESOURCE(32650)
|
||||
#define IDC_HELP MAKEINTRESOURCE(32651)
|
||||
|
||||
/* OEM Resource Ordinal Numbers */
|
||||
#define OBM_CLOSE 32754
|
||||
|
@ -2559,6 +2564,9 @@ typedef struct tagCOMSTAT
|
|||
#define OCR_SIZENS 32645
|
||||
#define OCR_SIZEALL 32646
|
||||
#define OCR_ICOCUR 32647
|
||||
#define OCR_NO 32648
|
||||
#define OCR_APPSTARTING 32650
|
||||
#define OCR_HELP 32651 /* only defined in wine */
|
||||
|
||||
#define OIC_SAMPLE 32512
|
||||
#define OIC_HAND 32513
|
||||
|
|
|
@ -518,7 +518,9 @@ typedef struct __aop
|
|||
#define WSMSG_ASYNC_PROTOBYNUM 0x0020
|
||||
#define WSMSG_ASYNC_SERVBYNAME 0x0100
|
||||
#define WSMSG_ASYNC_SERVBYPORT 0x0200
|
||||
#define WSMSG_ASYNC_WIN32 0x1000
|
||||
#define WSMSG_ASYNC_RQMASK 0x0fff
|
||||
|
||||
#define WSMSG_WIN32_AOP 0x1000
|
||||
#define WSMSG_DEAD_AOP 0x8000
|
||||
|
||||
typedef struct __sop /* WSAAsyncSelect() control struct */
|
||||
|
|
|
@ -82,6 +82,7 @@ BOOL32 MAIN_KernelInit(void)
|
|||
BOOL32 MAIN_UserInit(void)
|
||||
{
|
||||
extern BOOL32 WIDGETS_Init(void);
|
||||
extern BOOL32 MULTIMEDIA_Init(void);
|
||||
|
||||
int queueSize;
|
||||
|
||||
|
@ -134,6 +135,9 @@ BOOL32 MAIN_UserInit(void)
|
|||
/* Initialize menus */
|
||||
if (!MENU_Init()) return FALSE;
|
||||
|
||||
/* Initialize multimedia */
|
||||
if (!MULTIMEDIA_Init()) return FALSE;
|
||||
|
||||
/* Create desktop window */
|
||||
if (!WIN_CreateDesktopWindow()) return FALSE;
|
||||
|
||||
|
|
|
@ -115,86 +115,86 @@ void MODULE_DumpModule( HMODULE32 hModule )
|
|||
}
|
||||
|
||||
/* Dump the module info */
|
||||
|
||||
printf( "Module %04x:\n", hModule );
|
||||
printf( "count=%d flags=%04x heap=%d stack=%d\n",
|
||||
pModule->count, pModule->flags,
|
||||
pModule->heap_size, pModule->stack_size );
|
||||
printf( "cs:ip=%04x:%04x ss:sp=%04x:%04x ds=%04x nb seg=%d modrefs=%d\n",
|
||||
pModule->cs, pModule->ip, pModule->ss, pModule->sp, pModule->dgroup,
|
||||
pModule->seg_count, pModule->modref_count );
|
||||
printf( "os_flags=%d swap_area=%d version=%04x\n",
|
||||
pModule->os_flags, pModule->min_swap_area,
|
||||
pModule->expected_version );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Module %04x:\n", hModule );
|
||||
DUMP( "count=%d flags=%04x heap=%d stack=%d\n",
|
||||
pModule->count, pModule->flags,
|
||||
pModule->heap_size, pModule->stack_size );
|
||||
DUMP( "cs:ip=%04x:%04x ss:sp=%04x:%04x ds=%04x nb seg=%d modrefs=%d\n",
|
||||
pModule->cs, pModule->ip, pModule->ss, pModule->sp, pModule->dgroup,
|
||||
pModule->seg_count, pModule->modref_count );
|
||||
DUMP( "os_flags=%d swap_area=%d version=%04x\n",
|
||||
pModule->os_flags, pModule->min_swap_area,
|
||||
pModule->expected_version );
|
||||
if (pModule->flags & NE_FFLAGS_WIN32)
|
||||
printf( "PE module=%08x\n", pModule->module32 );
|
||||
DUMP( "PE module=%08x\n", pModule->module32 );
|
||||
|
||||
/* Dump the file info */
|
||||
|
||||
printf( "Filename: '%s'\n", NE_MODULE_NAME(pModule) );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Filename: '%s'\n", NE_MODULE_NAME(pModule) );
|
||||
|
||||
/* Dump the segment table */
|
||||
|
||||
printf( "\nSegment table:\n" );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Segment table:\n" );
|
||||
pSeg = NE_SEG_TABLE( pModule );
|
||||
for (i = 0; i < pModule->seg_count; i++, pSeg++)
|
||||
printf( "%02x: pos=%d size=%d flags=%04x minsize=%d sel=%04x\n",
|
||||
i + 1, pSeg->filepos, pSeg->size, pSeg->flags,
|
||||
pSeg->minsize, pSeg->selector );
|
||||
DUMP( "%02x: pos=%d size=%d flags=%04x minsize=%d sel=%04x\n",
|
||||
i + 1, pSeg->filepos, pSeg->size, pSeg->flags,
|
||||
pSeg->minsize, pSeg->selector );
|
||||
|
||||
/* Dump the resource table */
|
||||
|
||||
printf( "\nResource table:\n" );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Resource table:\n" );
|
||||
if (pModule->res_table)
|
||||
{
|
||||
pword = (WORD *)((BYTE *)pModule + pModule->res_table);
|
||||
printf( "Alignment: %d\n", *pword++ );
|
||||
DUMP( "Alignment: %d\n", *pword++ );
|
||||
while (*pword)
|
||||
{
|
||||
struct resource_typeinfo_s *ptr = (struct resource_typeinfo_s *)pword;
|
||||
struct resource_nameinfo_s *pname = (struct resource_nameinfo_s *)(ptr + 1);
|
||||
printf( "id=%04x count=%d\n", ptr->type_id, ptr->count );
|
||||
DUMP( "id=%04x count=%d\n", ptr->type_id, ptr->count );
|
||||
for (i = 0; i < ptr->count; i++, pname++)
|
||||
printf( "offset=%d len=%d id=%04x\n",
|
||||
pname->offset, pname->length, pname->id );
|
||||
DUMP( "offset=%d len=%d id=%04x\n",
|
||||
pname->offset, pname->length, pname->id );
|
||||
pword = (WORD *)pname;
|
||||
}
|
||||
}
|
||||
else printf( "None\n" );
|
||||
else DUMP( "None\n" );
|
||||
|
||||
/* Dump the resident name table */
|
||||
|
||||
printf( "\nResident-name table:\n" );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Resident-name table:\n" );
|
||||
pstr = (char *)pModule + pModule->name_table;
|
||||
while (*pstr)
|
||||
{
|
||||
printf( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
|
||||
*(WORD *)(pstr + *pstr + 1) );
|
||||
DUMP( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
|
||||
*(WORD *)(pstr + *pstr + 1) );
|
||||
pstr += *pstr + 1 + sizeof(WORD);
|
||||
}
|
||||
|
||||
/* Dump the module reference table */
|
||||
|
||||
printf( "\nModule ref table:\n" );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Module ref table:\n" );
|
||||
if (pModule->modref_table)
|
||||
{
|
||||
pword = (WORD *)((BYTE *)pModule + pModule->modref_table);
|
||||
for (i = 0; i < pModule->modref_count; i++, pword++)
|
||||
{
|
||||
printf( "%d: %04x -> '%s'\n", i, *pword,
|
||||
DUMP( "%d: %04x -> '%s'\n", i, *pword,
|
||||
MODULE_GetModuleName(*pword));
|
||||
}
|
||||
}
|
||||
else printf( "None\n" );
|
||||
else DUMP( "None\n" );
|
||||
|
||||
/* Dump the entry table */
|
||||
|
||||
printf( "\nEntry table:\n" );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Entry table:\n" );
|
||||
pstr = (char *)pModule + pModule->entry_table;
|
||||
ordinal = 1;
|
||||
while (*pstr)
|
||||
{
|
||||
printf( "Bundle %d-%d: %02x\n", ordinal, ordinal + *pstr - 1, pstr[1]);
|
||||
DUMP( "Bundle %d-%d: %02x\n", ordinal, ordinal + *pstr - 1, pstr[1]);
|
||||
if (!pstr[1])
|
||||
{
|
||||
ordinal += *pstr;
|
||||
|
@ -204,34 +204,34 @@ void MODULE_DumpModule( HMODULE32 hModule )
|
|||
{
|
||||
struct entry_tab_movable_s *pe = (struct entry_tab_movable_s*)(pstr+2);
|
||||
for (i = 0; i < *pstr; i++, pe++)
|
||||
printf( "%d: %02x:%04x (moveable)\n",
|
||||
ordinal++, pe->seg_number, pe->offset );
|
||||
DUMP( "%d: %02x:%04x (moveable)\n",
|
||||
ordinal++, pe->seg_number, pe->offset );
|
||||
pstr = (char *)pe;
|
||||
}
|
||||
else /* fixed */
|
||||
{
|
||||
struct entry_tab_fixed_s *pe = (struct entry_tab_fixed_s*)(pstr+2);
|
||||
for (i = 0; i < *pstr; i++, pe++)
|
||||
printf( "%d: %04x (fixed)\n",
|
||||
ordinal++, pe->offset[0] + (pe->offset[1] << 8) );
|
||||
DUMP( "%d: %04x (fixed)\n",
|
||||
ordinal++, pe->offset[0] + (pe->offset[1] << 8) );
|
||||
pstr = (char *)pe;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump the non-resident names table */
|
||||
|
||||
printf( "\nNon-resident names table:\n" );
|
||||
DUMP( "---\n" );
|
||||
DUMP( "Non-resident names table:\n" );
|
||||
if (pModule->nrname_handle)
|
||||
{
|
||||
pstr = (char *)GlobalLock16( pModule->nrname_handle );
|
||||
while (*pstr)
|
||||
{
|
||||
printf( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
|
||||
DUMP( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
|
||||
*(WORD *)(pstr + *pstr + 1) );
|
||||
pstr += *pstr + 1 + sizeof(WORD);
|
||||
}
|
||||
}
|
||||
printf( "\n" );
|
||||
DUMP( "\n" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
else
|
||||
*(unsigned char*)sp = (unsigned char)((int)address & 0xFF);
|
||||
}
|
||||
while (offset != 0xffff && !additive);
|
||||
while (offset && offset != 0xffff && !additive);
|
||||
break;
|
||||
|
||||
case NE_RADDR_OFFSET16:
|
||||
|
@ -301,7 +301,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
*sp = LOWORD(address);
|
||||
if (additive) *sp += offset;
|
||||
}
|
||||
while (offset != 0xffff && !additive);
|
||||
while (offset && offset != 0xffff && !additive);
|
||||
break;
|
||||
|
||||
case NE_RADDR_POINTER32:
|
||||
|
@ -314,7 +314,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
if (additive) *sp += offset;
|
||||
*(sp+1) = HIWORD(address);
|
||||
}
|
||||
while (offset != 0xffff && !additive);
|
||||
while (offset && offset != 0xffff && !additive);
|
||||
break;
|
||||
|
||||
case NE_RADDR_SELECTOR:
|
||||
|
@ -328,7 +328,6 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
if(additive && offset)
|
||||
fprintf(stderr,"Additive selector to %4.4x.Please report\n",offset);
|
||||
}
|
||||
/* FIXME: Quicken 5 has a zero offset fixup. This seems to work */
|
||||
while (offset && offset != 0xffff && !additive);
|
||||
break;
|
||||
|
||||
|
|
|
@ -459,8 +459,8 @@ BOOL32 NE_FreeResource( HMODULE16 hModule, HGLOBAL16 handle )
|
|||
pTypeInfo = (NE_TYPEINFO *)pNameInfo;
|
||||
}
|
||||
|
||||
TRACE(resource, "[%04x]: no intrinsic resource for %04x\n",
|
||||
TRACE(resource, "[%04x]: no intrinsic resource for %04x, assuming DirectResAlloc()!\n",
|
||||
hModule, handle );
|
||||
GlobalFree16( handle ); /* it could have been DirectResAlloc()'ed */
|
||||
GlobalFree16( handle );
|
||||
return handle;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
#include "task.h"
|
||||
#include "module.h"
|
||||
#include "resource.h"
|
||||
#include "debugstr.h"
|
||||
#include "debug.h"
|
||||
#include "libres.h"
|
||||
#include "winerror.h"
|
||||
|
||||
extern WORD WINE_LanguageId;
|
||||
|
||||
|
@ -414,6 +414,7 @@ HGLOBAL16 WINAPI DirectResAlloc( HINSTANCE16 hInstance, WORD wType,
|
|||
HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
|
||||
{
|
||||
HRSRC16 hRsrc;
|
||||
HACCEL16 hAccel;
|
||||
|
||||
if (HIWORD(lpTableName))
|
||||
TRACE(accel, "%04x '%s'\n",
|
||||
|
@ -422,8 +423,12 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
|
|||
TRACE(accel, "%04x %04x\n",
|
||||
instance, LOWORD(lpTableName) );
|
||||
|
||||
if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR )))
|
||||
if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR ))) {
|
||||
WARN(accel, "couldn't find accelerator table resource\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
TRACE(accel, "returning HACCEL 0x%x\n", hRsrc);
|
||||
return LoadResource16(instance,hRsrc);
|
||||
}
|
||||
|
||||
|
@ -439,18 +444,26 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
|
|||
HACCEL32 WINAPI LoadAccelerators32W(HINSTANCE32 instance,LPCWSTR lpTableName)
|
||||
{
|
||||
HRSRC32 hRsrc;
|
||||
HACCEL32 hRetval;
|
||||
|
||||
if (HIWORD(lpTableName))
|
||||
TRACE(accel, "%04x '%s'\n",
|
||||
instance, (char *)( lpTableName ) );
|
||||
TRACE(accel, "%p '%s'\n",
|
||||
(LPVOID)instance, (char *)( lpTableName ) );
|
||||
else
|
||||
TRACE(accel, "%04x %04x\n",
|
||||
instance, LOWORD(lpTableName) );
|
||||
TRACE(accel, "%p 0x%04x\n",
|
||||
(LPVOID)instance, LOWORD(lpTableName) );
|
||||
|
||||
if (!(hRsrc = FindResource32W( instance, lpTableName,
|
||||
(LPCWSTR)RT_ACCELERATOR )))
|
||||
return 0;
|
||||
return LoadResource32( instance, hRsrc );
|
||||
(LPCWSTR)RT_ACCELERATOR ))) {
|
||||
WARN(accel, "couldn't find accelerator table resource\n");
|
||||
hRetval = 0;
|
||||
}
|
||||
else {
|
||||
hRetval = LoadResource32( instance, hRsrc );
|
||||
}
|
||||
|
||||
TRACE(accel, "returning HACCEL 0x%x\n", hRsrc);
|
||||
return hRetval;
|
||||
}
|
||||
|
||||
HACCEL32 WINAPI LoadAccelerators32A(HINSTANCE32 instance,LPCSTR lpTableName)
|
||||
|
@ -471,25 +484,129 @@ HACCEL32 WINAPI LoadAccelerators32A(HINSTANCE32 instance,LPCSTR lpTableName)
|
|||
*/
|
||||
INT32 WINAPI CopyAcceleratorTable32A(HACCEL32 src, LPACCEL32 dst, INT32 entries)
|
||||
{
|
||||
fprintf(stderr,"CopyAcceleratorTable32A: not implemented: %d\n", entries);
|
||||
return 0;
|
||||
return CopyAcceleratorTable32W(src, dst, entries);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* CopyAcceleratorTable32W (USER32.59)
|
||||
*
|
||||
* By mortene@pvv.org 980321
|
||||
*/
|
||||
INT32 WINAPI CopyAcceleratorTable32W(HACCEL32 src, LPACCEL32 dst, INT32 entries)
|
||||
INT32 WINAPI CopyAcceleratorTable32W(HACCEL32 src, LPACCEL32 dst,
|
||||
INT32 entries)
|
||||
{
|
||||
fprintf(stderr,"CopyAcceleratorTable32W: not implemented: %d\n", entries);
|
||||
return 0;
|
||||
int i;
|
||||
LPACCEL32 accel = (LPACCEL32)src;
|
||||
BOOL32 done = FALSE;
|
||||
|
||||
/* Do parameter checking to avoid the explosions and the screaming
|
||||
as far as possible. */
|
||||
if((dst && (entries < 1)) || (src == (HACCEL32)NULL)) {
|
||||
WARN(accel, "Application sent invalid parameters (%p %p %d).\n",
|
||||
(LPVOID)src, (LPVOID)dst, entries);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
i=0;
|
||||
while(!done) {
|
||||
/* Spit out some debugging information. */
|
||||
TRACE(accel, "accel %d: type 0x%02x, event '%c', IDval 0x%04x.\n",
|
||||
i, accel[i].fVirt, accel[i].key, accel[i].cmd);
|
||||
|
||||
/* Copy data to the destination structure array (if dst == NULL,
|
||||
we're just supposed to count the number of entries). */
|
||||
if(dst) {
|
||||
memcpy(&dst[i], &accel[i], sizeof(ACCEL32));
|
||||
|
||||
/* Check if we've reached the end of the application supplied
|
||||
accelerator table. */
|
||||
if(i+1 == entries) {
|
||||
/* Turn off the high order bit, just in case. */
|
||||
dst[i].fVirt &= 0x7f;
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* The highest order bit seems to mark the end of the accelerator
|
||||
resource table. (?) */
|
||||
if((accel[i].fVirt & 0x80) != 0) done = TRUE;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* CreateAcceleratorTable (USER32.64)
|
||||
*
|
||||
* By mortene@pvv.org 980321
|
||||
*/
|
||||
HACCEL32 WINAPI CreateAcceleratorTable32A(LPACCEL32 lpaccel, INT32 cEntries)
|
||||
{
|
||||
HACCEL32 hAccel;
|
||||
|
||||
/* Do parameter checking just in case someone's trying to be
|
||||
funny. */
|
||||
if(cEntries < 1) {
|
||||
WARN(accel, "Application sent invalid parameters (%p %d).\n",
|
||||
lpaccel, cEntries);
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return (HACCEL32)NULL;
|
||||
}
|
||||
FIXME(accel, "should check that the accelerator descriptions are valid,"
|
||||
" return NULL and SetLastError() if not.\n");
|
||||
|
||||
|
||||
/* Allocate memory and copy the table. */
|
||||
hAccel = (HACCEL32)HeapAlloc(GetProcessHeap(), 0,
|
||||
cEntries * sizeof(ACCEL32));
|
||||
TRACE(accel, "handle %p\n", (LPVOID)hAccel);
|
||||
if(!hAccel) {
|
||||
WARN(accel, "Out of memory.\n");
|
||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return (HACCEL32)NULL;
|
||||
}
|
||||
memcpy((LPACCEL32)hAccel, lpaccel, cEntries * sizeof(ACCEL32));
|
||||
|
||||
/* Set the end-of-table terminator. */
|
||||
((LPACCEL32)hAccel)[cEntries-1].fVirt |= 0x80;
|
||||
|
||||
TRACE(accel, "Allocated accelerator handle %x\n", hAccel);
|
||||
return hAccel;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* DestroyAcceleratorTable (USER32.130)
|
||||
*
|
||||
* By mortene@pvv.org 980321
|
||||
*/
|
||||
BOOL32 WINAPI DestroyAcceleratorTable( HACCEL32 handle )
|
||||
{
|
||||
fprintf(stderr,"DestroyAcceleratorTable: not implemented\n");
|
||||
FIXME(accel, "stub (handle 0x%x)\n", handle);
|
||||
|
||||
|
||||
/* Weird.. I thought this should work. According to the API
|
||||
specification, DestroyAcceleratorTable() should only be called on
|
||||
HACCEL32's made by CreateAcceleratorTable(), but Microsoft Visual
|
||||
Studio 97 calls this function with a series of different handle
|
||||
values without ever calling CreateAcceleratorTable(). Something
|
||||
is very fishy in Denmark... */
|
||||
/* Update: looks like the calls to this function matches the calls
|
||||
to LoadAccelerators() in M$ Visual Studio, except that the handle
|
||||
values are off by some variable size from the HACCEL's returned
|
||||
from LoadAccelerators(). WTH? */
|
||||
|
||||
/* Parameter checking to avoid any embarassing situations. */
|
||||
/* if(!handle) { */
|
||||
/* WARN(accel, "Application sent NULL ptr.\n"); */
|
||||
/* SetLastError(ERROR_INVALID_PARAMETER); */
|
||||
/* return FALSE; */
|
||||
/* } */
|
||||
|
||||
/* HeapFree(GetProcessHeap(), 0, (LPACCEL32)handle); */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -586,9 +703,8 @@ INT32 WINAPI LoadString32W( HINSTANCE32 instance, UINT32 resource_id,
|
|||
fprintf(stderr,"LoadString // and try to obtain string '%s'\n", p + 1);
|
||||
#endif
|
||||
}
|
||||
#if 0
|
||||
TRACE(resource,"'%s' copied !\n", buffer);
|
||||
#endif
|
||||
|
||||
TRACE(resource,"'%s' copied !\n", (char *)buffer);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,11 +74,10 @@ static __inline__ int wine_sigaction( int sig, struct kernel_sigaction *new,
|
|||
}
|
||||
#endif /* linux && __i386__ */
|
||||
|
||||
|
||||
/* Signal stack */
|
||||
|
||||
static char SIGNAL_Stack[16384];
|
||||
|
||||
static sigset_t async_signal_set;
|
||||
|
||||
/**********************************************************************
|
||||
* SIGNAL_child
|
||||
|
@ -155,6 +154,8 @@ BOOL32 SIGNAL_Init(void)
|
|||
{
|
||||
extern void SYNC_SetupSignals(void);
|
||||
|
||||
sigemptyset(&async_signal_set);
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__svr4__) || defined(_SCO_DS)
|
||||
struct sigaltstack ss;
|
||||
ss.ss_sp = SIGNAL_Stack;
|
||||
|
@ -169,11 +170,19 @@ BOOL32 SIGNAL_Init(void)
|
|||
|
||||
SIGNAL_SetHandler( SIGCHLD, (void (*)())SIGNAL_child, 1);
|
||||
#ifdef CONFIG_IPC
|
||||
sigaddset(&async_signal_set, SIGUSR2);
|
||||
SIGNAL_SetHandler( SIGUSR2, (void (*)())stop_wait, 1); /* For IPC */
|
||||
#endif
|
||||
#ifdef SIGIO
|
||||
sigaddset(&async_signal_set, SIGIO);
|
||||
SIGNAL_SetHandler( SIGIO, (void (*)())WINSOCK_sigio, 0);
|
||||
#endif
|
||||
|
||||
sigaddset(&async_signal_set, SIGALRM);
|
||||
|
||||
/* ignore SIGPIPE so that WINSOCK can get a EPIPE error instead */
|
||||
signal (SIGPIPE, SIG_IGN);
|
||||
|
||||
SYNC_SetupSignals();
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -184,13 +193,6 @@ BOOL32 SIGNAL_Init(void)
|
|||
*/
|
||||
void SIGNAL_MaskAsyncEvents( BOOL32 flag )
|
||||
{
|
||||
sigset_t set;
|
||||
sigemptyset(&set);
|
||||
#ifdef SIGIO
|
||||
sigaddset(&set, SIGIO);
|
||||
#endif
|
||||
#ifdef CONFIG_IPC
|
||||
sigaddset(&set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask( (flag) ? SIG_BLOCK : SIG_UNBLOCK , &set, NULL);
|
||||
sigprocmask( (flag) ? SIG_BLOCK : SIG_UNBLOCK , &async_signal_set, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -486,7 +486,7 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
|
|||
memset( pTask->pdb.fileHandles, 0xff, sizeof(pTask->pdb.fileHandles) );
|
||||
pTask->pdb.environment = hEnvironment;
|
||||
pTask->pdb.nbFiles = 20;
|
||||
lstrcpyn32A( pTask->pdb.cmdLine, cmdLine, 127 );
|
||||
lstrcpyn32A( pTask->pdb.cmdLine, cmdLine, sizeof(pTask->pdb.cmdLine) );
|
||||
|
||||
/* Get the compatibility flags */
|
||||
|
||||
|
@ -839,7 +839,7 @@ void WINAPI InitTask( CONTEXT *context )
|
|||
* es:bx pointer to command-line inside PSP
|
||||
*/
|
||||
EAX_reg(context) = 1;
|
||||
EBX_reg(context) = 0x81;
|
||||
EBX_reg(context) = pTask->pdb.cmdLine[0] ? 0x81 : 0x80;
|
||||
ECX_reg(context) = pModule->stack_size;
|
||||
EDX_reg(context) = pTask->nCmdShow;
|
||||
ESI_reg(context) = (DWORD)pTask->hPrevInstance;
|
||||
|
@ -1005,7 +1005,8 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
|
|||
{
|
||||
BYTE *thunk,*lfunc;
|
||||
SEGPTR thunkaddr;
|
||||
|
||||
|
||||
if (!hInstance) return 0;
|
||||
if (__winelib) return func; /* func can be called directly in Winelib */
|
||||
thunkaddr = TASK_AllocThunk( hCurrentTask );
|
||||
if (!thunkaddr) return (FARPROC16)0;
|
||||
|
@ -1358,8 +1359,8 @@ FARPROC16 WINAPI SetTaskSignalProc( HTASK16 hTask, FARPROC16 proc )
|
|||
WORD WINAPI SetSigHandler( FARPROC16 newhandler, FARPROC16* oldhandler,
|
||||
UINT16 *oldmode, UINT16 newmode, UINT16 flag )
|
||||
{
|
||||
fprintf(stdnimp,"SetSigHandler(%p,%p,%p,%d,%d), unimplemented.\n",
|
||||
newhandler,oldhandler,oldmode,newmode,flag );
|
||||
FIXME(task,"(%p,%p,%p,%d,%d), unimplemented.\n",
|
||||
newhandler,oldhandler,oldmode,newmode,flag );
|
||||
|
||||
if (flag != 1) return 0;
|
||||
if (!newmode) newhandler = NULL; /* Default handler */
|
||||
|
|
175
memory/atom.c
175
memory/atom.c
|
@ -42,9 +42,18 @@
|
|||
|
||||
/***********************************************************************
|
||||
* ATOM_InitTable
|
||||
*
|
||||
* NOTES
|
||||
* Should this validate the value of entries to be 0 < x < 0x3fff?
|
||||
*
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
static HANDLE16 ATOM_InitTable( WORD selector, WORD entries )
|
||||
{
|
||||
static HANDLE16 ATOM_InitTable(
|
||||
WORD selector, /* [in] Segment */
|
||||
WORD entries /* [in] Size of atom table */
|
||||
) {
|
||||
int i;
|
||||
HANDLE16 handle;
|
||||
ATOMTABLE *table;
|
||||
|
@ -81,9 +90,15 @@ BOOL32 ATOM_Init(void)
|
|||
*
|
||||
* Return a pointer to the atom table of a given segment, creating
|
||||
* it if necessary.
|
||||
*
|
||||
* RETURNS
|
||||
* Pointer to table: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
static ATOMTABLE * ATOM_GetTable( WORD selector, BOOL32 create )
|
||||
{
|
||||
static ATOMTABLE *ATOM_GetTable(
|
||||
WORD selector, /* [in] Segment */
|
||||
BOOL32 create /* [in] Create */
|
||||
) {
|
||||
INSTANCEDATA *ptr = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN( selector, 0 );
|
||||
if (!ptr->atomtable)
|
||||
{
|
||||
|
@ -101,17 +116,24 @@ static ATOMTABLE * ATOM_GetTable( WORD selector, BOOL32 create )
|
|||
*
|
||||
* Make an ATOMENTRY pointer from a handle (obtained from GetAtomHandle()).
|
||||
*/
|
||||
static ATOMENTRY * ATOM_MakePtr( WORD selector, HANDLE16 handle )
|
||||
{
|
||||
static ATOMENTRY *ATOM_MakePtr(
|
||||
WORD selector, /* [in] Segment */
|
||||
HANDLE16 handle /* [in] Handle */
|
||||
) {
|
||||
return (ATOMENTRY *)PTR_SEG_OFF_TO_LIN( selector, handle );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ATOM_Hash
|
||||
* RETURNS
|
||||
* The hash value for the input string
|
||||
*/
|
||||
static WORD ATOM_Hash( WORD entries, LPCSTR str, WORD len )
|
||||
{
|
||||
static WORD ATOM_Hash(
|
||||
WORD entries, /* [in] Total number of entries */
|
||||
LPCSTR str, /* [in] Pointer to string to hash */
|
||||
WORD len /* [in] Length of string */
|
||||
) {
|
||||
WORD i, hash = 0;
|
||||
|
||||
for (i = 0; i < len; i++) hash ^= toupper(str[i]) + i;
|
||||
|
@ -121,9 +143,15 @@ static WORD ATOM_Hash( WORD entries, LPCSTR str, WORD len )
|
|||
|
||||
/***********************************************************************
|
||||
* ATOM_AddAtom
|
||||
*
|
||||
* RETURNS
|
||||
* Atom: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
static ATOM ATOM_AddAtom( WORD selector, LPCSTR str )
|
||||
{
|
||||
static ATOM ATOM_AddAtom(
|
||||
WORD selector, /* [in] Segment */
|
||||
LPCSTR str /* [in] Pointer to the string to add */
|
||||
) {
|
||||
WORD hash;
|
||||
HANDLE16 entry;
|
||||
ATOMENTRY * entryPtr;
|
||||
|
@ -163,9 +191,14 @@ static ATOM ATOM_AddAtom( WORD selector, LPCSTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* ATOM_DeleteAtom
|
||||
* RETURNS
|
||||
* 0: Success
|
||||
* Atom: Failure
|
||||
*/
|
||||
static ATOM ATOM_DeleteAtom( WORD selector, ATOM atom )
|
||||
{
|
||||
static ATOM ATOM_DeleteAtom(
|
||||
WORD selector, /* [in] Segment */
|
||||
ATOM atom /* [in] Atom to delete */
|
||||
) {
|
||||
ATOMENTRY * entryPtr;
|
||||
ATOMTABLE * table;
|
||||
HANDLE16 entry, *prevEntry;
|
||||
|
@ -199,9 +232,14 @@ static ATOM ATOM_DeleteAtom( WORD selector, ATOM atom )
|
|||
|
||||
/***********************************************************************
|
||||
* ATOM_FindAtom
|
||||
* RETURNS
|
||||
* Atom: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
static ATOM ATOM_FindAtom( WORD selector, LPCSTR str )
|
||||
{
|
||||
static ATOM ATOM_FindAtom(
|
||||
WORD selector, /* [in] Segment */
|
||||
LPCSTR str /* [in] Pointer to string to find */
|
||||
) {
|
||||
ATOMTABLE * table;
|
||||
WORD hash;
|
||||
HANDLE16 entry;
|
||||
|
@ -226,10 +264,16 @@ static ATOM ATOM_FindAtom( WORD selector, LPCSTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* ATOM_GetAtomName
|
||||
* RETURNS
|
||||
* Length of string copied to buffer: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
static UINT32 ATOM_GetAtomName( WORD selector, ATOM atom,
|
||||
LPSTR buffer, INT32 count )
|
||||
{
|
||||
static UINT32 ATOM_GetAtomName(
|
||||
WORD selector, /* [in] Segment */
|
||||
ATOM atom, /* [in] Atom identifier */
|
||||
LPSTR buffer, /* [out] Pointer to buffer for atom string */
|
||||
INT32 count /* [in] Size of buffer */
|
||||
) {
|
||||
ATOMTABLE * table;
|
||||
ATOMENTRY * entryPtr;
|
||||
HANDLE16 entry;
|
||||
|
@ -302,15 +346,23 @@ ATOM WINAPI AddAtom16( SEGPTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* AddAtom32A (KERNEL32.0)
|
||||
* Adds a string to the atom table and returns the atom identifying the
|
||||
* string.
|
||||
*
|
||||
* RETURNS
|
||||
* Atom: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
ATOM WINAPI AddAtom32A( LPCSTR str )
|
||||
{
|
||||
ATOM WINAPI AddAtom32A(
|
||||
LPCSTR str /* [in] Pointer to string to add */
|
||||
) {
|
||||
return GlobalAddAtom32A( str ); /* FIXME */
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AddAtom32W (KERNEL32.1)
|
||||
* See AddAtom32A
|
||||
*/
|
||||
ATOM WINAPI AddAtom32W( LPCWSTR str )
|
||||
{
|
||||
|
@ -329,9 +381,16 @@ ATOM WINAPI DeleteAtom16( ATOM atom )
|
|||
|
||||
/***********************************************************************
|
||||
* DeleteAtom32 (KERNEL32.69)
|
||||
* Decrements the reference count of a string atom. If count becomes
|
||||
* zero, the string associated with the atom is removed from the table.
|
||||
*
|
||||
* RETURNS
|
||||
* 0: Success
|
||||
* Atom: Failure
|
||||
*/
|
||||
ATOM WINAPI DeleteAtom32( ATOM atom )
|
||||
{
|
||||
ATOM WINAPI DeleteAtom32(
|
||||
ATOM atom /* [in] Atom to delete */
|
||||
) {
|
||||
return GlobalDeleteAtom( atom ); /* FIXME */
|
||||
}
|
||||
|
||||
|
@ -348,15 +407,23 @@ ATOM WINAPI FindAtom16( SEGPTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* FindAtom32A (KERNEL32.117)
|
||||
* Searches the local atom table for the string and returns the atom
|
||||
* associated with that string.
|
||||
*
|
||||
* RETURNS
|
||||
* Atom: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
ATOM WINAPI FindAtom32A( LPCSTR str )
|
||||
{
|
||||
ATOM WINAPI FindAtom32A(
|
||||
LPCSTR str /* [in] Pointer to string to find */
|
||||
) {
|
||||
return GlobalFindAtom32A( str ); /* FIXME */
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FindAtom32W (KERNEL32.118)
|
||||
* See FindAtom32A
|
||||
*/
|
||||
ATOM WINAPI FindAtom32W( LPCWSTR str )
|
||||
{
|
||||
|
@ -375,15 +442,24 @@ UINT16 WINAPI GetAtomName16( ATOM atom, LPSTR buffer, INT16 count )
|
|||
|
||||
/***********************************************************************
|
||||
* GetAtomName32A (KERNEL32.149)
|
||||
* Retrieves a copy of the string associated with the atom.
|
||||
*
|
||||
* RETURNS
|
||||
* Length of string: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
UINT32 WINAPI GetAtomName32A( ATOM atom, LPSTR buffer, INT32 count )
|
||||
{
|
||||
UINT32 WINAPI GetAtomName32A(
|
||||
ATOM atom, /* [in] Atom */
|
||||
LPSTR buffer, /* [out] Pointer to string for atom string */
|
||||
INT32 count /* [in] Size of buffer */
|
||||
) {
|
||||
return GlobalGetAtomName32A( atom, buffer, count ); /* FIXME */
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetAtomName32W (KERNEL32.150)
|
||||
* See GetAtomName32A
|
||||
*/
|
||||
UINT32 WINAPI GetAtomName32W( ATOM atom, LPWSTR buffer, INT32 count )
|
||||
{
|
||||
|
@ -407,9 +483,16 @@ ATOM WINAPI GlobalAddAtom16( SEGPTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalAddAtom32A (KERNEL32.313)
|
||||
* Adds a character string to the global atom table and returns a unique
|
||||
* value identifying the string.
|
||||
*
|
||||
* RETURNS
|
||||
* Atom: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
ATOM WINAPI GlobalAddAtom32A( LPCSTR str )
|
||||
{
|
||||
ATOM WINAPI GlobalAddAtom32A(
|
||||
LPCSTR str /* [in] Pointer to string to add */
|
||||
) {
|
||||
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||
return ATOM_AddAtom( USER_HeapSel, str );
|
||||
}
|
||||
|
@ -417,6 +500,7 @@ ATOM WINAPI GlobalAddAtom32A( LPCSTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalAddAtom32W (KERNEL32.314)
|
||||
* See GlobalAddAtom32A
|
||||
*/
|
||||
ATOM WINAPI GlobalAddAtom32W( LPCWSTR str )
|
||||
{
|
||||
|
@ -429,9 +513,16 @@ ATOM WINAPI GlobalAddAtom32W( LPCWSTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalDeleteAtom (USER.269) (KERNEL32.317)
|
||||
* Decrements the reference count of a string atom. If the count is
|
||||
* zero, the string associated with the atom is removed from the table.
|
||||
*
|
||||
* RETURNS
|
||||
* 0: Success
|
||||
* Atom: Failure
|
||||
*/
|
||||
ATOM WINAPI GlobalDeleteAtom( ATOM atom )
|
||||
{
|
||||
ATOM WINAPI GlobalDeleteAtom(
|
||||
ATOM atom /* [in] Atom to delete */
|
||||
) {
|
||||
#ifdef CONFIG_IPC
|
||||
return DDE_GlobalDeleteAtom( atom );
|
||||
#else
|
||||
|
@ -456,9 +547,16 @@ ATOM WINAPI GlobalFindAtom16( SEGPTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalFindAtom32A (KERNEL32.318)
|
||||
* Searches the atom table for the string and returns the atom
|
||||
* associated with it.
|
||||
*
|
||||
* RETURNS
|
||||
* Atom: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
ATOM WINAPI GlobalFindAtom32A( LPCSTR str )
|
||||
{
|
||||
ATOM WINAPI GlobalFindAtom32A(
|
||||
LPCSTR str /* [in] Pointer to string to search for */
|
||||
) {
|
||||
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||
return ATOM_FindAtom( USER_HeapSel, str );
|
||||
}
|
||||
|
@ -466,6 +564,7 @@ ATOM WINAPI GlobalFindAtom32A( LPCSTR str )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalFindAtom32W (KERNEL32.319)
|
||||
* See GlobalFindAtom32A
|
||||
*/
|
||||
ATOM WINAPI GlobalFindAtom32W( LPCWSTR str )
|
||||
{
|
||||
|
@ -491,14 +590,24 @@ UINT16 WINAPI GlobalGetAtomName16( ATOM atom, LPSTR buffer, INT16 count )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalGetAtomName32A (KERNEL32.323)
|
||||
* Retrieves a copy of the string associated with an atom.
|
||||
*
|
||||
* RETURNS
|
||||
* Length of string in characters: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
UINT32 WINAPI GlobalGetAtomName32A( ATOM atom, LPSTR buffer, INT32 count )
|
||||
{
|
||||
UINT32 WINAPI GlobalGetAtomName32A(
|
||||
ATOM atom, /* [in] Atom identifier */
|
||||
LPSTR buffer, /* [out] Pointer to buffer for atom string */
|
||||
INT32 count /* [in] Size of buffer */
|
||||
) {
|
||||
return ATOM_GetAtomName( USER_HeapSel, atom, buffer, count );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalGetAtomName32W (KERNEL32.324)
|
||||
* See GlobalGetAtomName32A
|
||||
*/
|
||||
UINT32 WINAPI GlobalGetAtomName32W( ATOM atom, LPWSTR buffer, INT32 count )
|
||||
{
|
||||
|
|
196
memory/global.c
196
memory/global.c
|
@ -81,11 +81,11 @@ void debug_handles()
|
|||
for (i = globalArenaSize-1 ; i>=0 ; i--) {
|
||||
if (pGlobalArena[i].size!=0 && (pGlobalArena[i].handle & 0x8000)){
|
||||
printed=1;
|
||||
printf("0x%08x, ",pGlobalArena[i].handle);
|
||||
DUMP("0x%08x, ",pGlobalArena[i].handle);
|
||||
}
|
||||
}
|
||||
if (printed)
|
||||
printf("\n");
|
||||
DUMP("\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -271,9 +271,14 @@ WORD DDE_GlobalHandleToSel( HGLOBAL16 handle )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalAlloc16 (KERNEL.15)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HGLOBAL16 WINAPI GlobalAlloc16( UINT16 flags, DWORD size )
|
||||
{
|
||||
HGLOBAL16 WINAPI GlobalAlloc16(
|
||||
UINT16 flags, /* [in] Object allocation attributes */
|
||||
DWORD size /* [in] Number of bytes to allocate */
|
||||
) {
|
||||
HANDLE16 owner = GetCurrentPDB();
|
||||
|
||||
if (flags & GMEM_DDESHARE)
|
||||
|
@ -284,9 +289,15 @@ HGLOBAL16 WINAPI GlobalAlloc16( UINT16 flags, DWORD size )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalReAlloc16 (KERNEL.16)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HGLOBAL16 WINAPI GlobalReAlloc16( HGLOBAL16 handle, DWORD size, UINT16 flags )
|
||||
{
|
||||
HGLOBAL16 WINAPI GlobalReAlloc16(
|
||||
HGLOBAL16 handle, /* [in] Handle of global memory object */
|
||||
DWORD size, /* [in] New size of block */
|
||||
UINT16 flags /* [in] How to reallocate object */
|
||||
) {
|
||||
WORD selcount;
|
||||
DWORD oldsize;
|
||||
void *ptr;
|
||||
|
@ -300,14 +311,13 @@ HGLOBAL16 WINAPI GlobalReAlloc16( HGLOBAL16 handle, DWORD size, UINT16 flags )
|
|||
#ifdef CONFIG_IPC
|
||||
if (flags & GMEM_DDESHARE || is_dde_handle(handle))
|
||||
{
|
||||
fprintf(stdnimp,
|
||||
"GlobalReAlloc16: shared memory reallocating unimplemented\n");
|
||||
FIXME(global, "shared memory reallocating unimplemented\n");
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_IPC */
|
||||
|
||||
if (!VALID_HANDLE(handle)) {
|
||||
fprintf(stderr," Invalid handle 0x%04x passed to GlobalReAlloc16!\n",handle);
|
||||
WARN(global, "Invalid handle 0x%04x!\n", handle);
|
||||
return 0;
|
||||
}
|
||||
pArena = GET_ARENA_PTR( handle );
|
||||
|
@ -398,9 +408,13 @@ HGLOBAL16 WINAPI GlobalReAlloc16( HGLOBAL16 handle, DWORD size, UINT16 flags )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalFree16 (KERNEL.17)
|
||||
* RETURNS
|
||||
* NULL: Success
|
||||
* Handle: Failure
|
||||
*/
|
||||
HGLOBAL16 WINAPI GlobalFree16( HGLOBAL16 handle )
|
||||
{
|
||||
HGLOBAL16 WINAPI GlobalFree16(
|
||||
HGLOBAL16 handle /* [in] Handle of global memory object */
|
||||
) {
|
||||
void *ptr;
|
||||
|
||||
if (!VALID_HANDLE(handle)) {
|
||||
|
@ -454,9 +468,14 @@ SEGPTR WINAPI WIN16_GlobalLock16( HGLOBAL16 handle )
|
|||
* GlobalLock16 (KERNEL.18)
|
||||
*
|
||||
* This is the GlobalLock16() function used by 32-bit code.
|
||||
*
|
||||
* RETURNS
|
||||
* Pointer to first byte of memory block
|
||||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI GlobalLock16( HGLOBAL16 handle )
|
||||
{
|
||||
LPVOID WINAPI GlobalLock16(
|
||||
HGLOBAL16 handle /* [in] Handle of global memory object */
|
||||
) {
|
||||
if (!handle) return 0;
|
||||
if (!VALID_HANDLE(handle))
|
||||
return (LPVOID)0;
|
||||
|
@ -470,9 +489,16 @@ LPVOID WINAPI GlobalLock16( HGLOBAL16 handle )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalUnlock16 (KERNEL.19)
|
||||
* NOTES
|
||||
* Should the return values be cast to booleans?
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Object is still locked
|
||||
* FALSE: Object is unlocked
|
||||
*/
|
||||
BOOL16 WINAPI GlobalUnlock16( HGLOBAL16 handle )
|
||||
{
|
||||
BOOL16 WINAPI GlobalUnlock16(
|
||||
HGLOBAL16 handle /* [in] Handle of global memory object */
|
||||
) {
|
||||
GLOBALARENA *pArena = GET_ARENA_PTR(handle);
|
||||
if (!VALID_HANDLE(handle)) {
|
||||
fprintf(stderr,"Invalid handle 0x%04x passed to GlobalUnlock16!\n",handle);
|
||||
|
@ -486,9 +512,13 @@ BOOL16 WINAPI GlobalUnlock16( HGLOBAL16 handle )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalSize16 (KERNEL.20)
|
||||
* RETURNS
|
||||
* Size in bytes of object
|
||||
* 0: Failure
|
||||
*/
|
||||
DWORD WINAPI GlobalSize16( HGLOBAL16 handle )
|
||||
{
|
||||
DWORD WINAPI GlobalSize16(
|
||||
HGLOBAL16 handle /* [in] Handle of global memory object */
|
||||
) {
|
||||
TRACE(global, "%04x\n", handle );
|
||||
if (!handle) return 0;
|
||||
if (!VALID_HANDLE(handle))
|
||||
|
@ -499,9 +529,16 @@ DWORD WINAPI GlobalSize16( HGLOBAL16 handle )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalHandle16 (KERNEL.21)
|
||||
* NOTES
|
||||
* Why is GlobalHandleToSel used here with the sel as input?
|
||||
*
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
DWORD WINAPI GlobalHandle16( WORD sel )
|
||||
{
|
||||
DWORD WINAPI GlobalHandle16(
|
||||
WORD sel /* [in] Address of global memory block */
|
||||
) {
|
||||
TRACE(global, "%04x\n", sel );
|
||||
if (!VALID_HANDLE(sel)) {
|
||||
fprintf(stderr,"Invalid handle 0x%04x passed to GlobalHandle16!\n",sel);
|
||||
|
@ -523,11 +560,20 @@ DWORD WINAPI GlobalHandleNoRIP( WORD sel )
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalFlags16 (KERNEL.22)
|
||||
* NOTES
|
||||
* Should this return GMEM_INVALID_HANDLE instead of 0 on invalid
|
||||
* handle?
|
||||
*
|
||||
* RETURNS
|
||||
* Value specifying flags and lock count
|
||||
* GMEM_INVALID_HANDLE: Invalid handle
|
||||
*/
|
||||
UINT16 WINAPI GlobalFlags16( HGLOBAL16 handle )
|
||||
{
|
||||
UINT16 WINAPI GlobalFlags16(
|
||||
HGLOBAL16 handle /* [in] Handle of global memory object */
|
||||
) {
|
||||
GLOBALARENA *pArena;
|
||||
|
||||
TRACE(global, "%04x\n", handle );
|
||||
|
@ -662,12 +708,15 @@ DWORD WINAPI GetFreeSpace16( UINT16 wFlags )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalDOSAlloc (KERNEL.184)
|
||||
* RETURNS
|
||||
* Address (HW=Paragraph segment; LW=Selector)
|
||||
*/
|
||||
DWORD WINAPI GlobalDOSAlloc(DWORD size)
|
||||
{
|
||||
DWORD WINAPI GlobalDOSAlloc(
|
||||
DWORD size /* [in] Number of bytes to be allocated */
|
||||
) {
|
||||
UINT16 uParagraph;
|
||||
LPVOID lpBlock = DOSMEM_GetBlock( size, &uParagraph );
|
||||
|
||||
|
||||
if( lpBlock )
|
||||
{
|
||||
HMODULE16 hModule = GetModuleHandle16("KERNEL");
|
||||
|
@ -680,11 +729,16 @@ DWORD WINAPI GlobalDOSAlloc(DWORD size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalDOSFree (KERNEL.185)
|
||||
* RETURNS
|
||||
* NULL: Success
|
||||
* sel: Failure
|
||||
*/
|
||||
WORD WINAPI GlobalDOSFree(WORD sel)
|
||||
{
|
||||
WORD WINAPI GlobalDOSFree(
|
||||
WORD sel /* [in] Selector */
|
||||
) {
|
||||
DWORD block = GetSelectorBase(sel);
|
||||
|
||||
if( block && block < 0x100000 )
|
||||
|
@ -697,6 +751,7 @@ WORD WINAPI GlobalDOSFree(WORD sel)
|
|||
return sel;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalPageLock (KERNEL.191)
|
||||
*/
|
||||
|
@ -966,9 +1021,14 @@ typedef struct __GLOBAL32_INTERN
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalAlloc32 (KERNEL32.315)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HGLOBAL32 WINAPI GlobalAlloc32(UINT32 flags, DWORD size)
|
||||
{
|
||||
HGLOBAL32 WINAPI GlobalAlloc32(
|
||||
UINT32 flags, /* [in] Object allocation attributes */
|
||||
DWORD size /* [in] Number of bytes to allocate */
|
||||
) {
|
||||
PGLOBAL32_INTERN pintern;
|
||||
DWORD hpflags;
|
||||
LPVOID palloc;
|
||||
|
@ -1009,9 +1069,13 @@ HGLOBAL32 WINAPI GlobalAlloc32(UINT32 flags, DWORD size)
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalLock32 (KERNEL32.326)
|
||||
* RETURNS
|
||||
* Pointer to first byte of block
|
||||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI GlobalLock32(HGLOBAL32 hmem)
|
||||
{
|
||||
LPVOID WINAPI GlobalLock32(
|
||||
HGLOBAL32 hmem /* [in] Handle of global memory object */
|
||||
) {
|
||||
PGLOBAL32_INTERN pintern;
|
||||
LPVOID palloc;
|
||||
|
||||
|
@ -1039,9 +1103,13 @@ LPVOID WINAPI GlobalLock32(HGLOBAL32 hmem)
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalUnlock32 (KERNEL32.332)
|
||||
* RETURNS
|
||||
* TRUE: Object is still locked
|
||||
* FALSE: Object is unlocked
|
||||
*/
|
||||
BOOL32 WINAPI GlobalUnlock32(HGLOBAL32 hmem)
|
||||
{
|
||||
BOOL32 WINAPI GlobalUnlock32(
|
||||
HGLOBAL32 hmem /* [in] Handle of global memory object */
|
||||
) {
|
||||
PGLOBAL32_INTERN pintern;
|
||||
BOOL32 locked;
|
||||
|
||||
|
@ -1070,9 +1138,19 @@ BOOL32 WINAPI GlobalUnlock32(HGLOBAL32 hmem)
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalHandle32 (KERNEL32.325)
|
||||
* Returns the handle associated with the specified pointer.
|
||||
*
|
||||
* NOTES
|
||||
* Since there in only one goto, can it be removed and the return
|
||||
* be put 'inline'?
|
||||
*
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HGLOBAL32 WINAPI GlobalHandle32(LPCVOID pmem)
|
||||
{
|
||||
HGLOBAL32 WINAPI GlobalHandle32(
|
||||
LPCVOID pmem /* [in] Pointer to global memory block */
|
||||
) {
|
||||
HGLOBAL32 handle;
|
||||
|
||||
if (!HEAP_IsInsideHeap( GetProcessHeap(), 0, pmem )) goto error;
|
||||
|
@ -1094,9 +1172,15 @@ error:
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalReAlloc32 (KERNEL32.328)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HGLOBAL32 WINAPI GlobalReAlloc32(HGLOBAL32 hmem, DWORD size, UINT32 flags)
|
||||
{
|
||||
HGLOBAL32 WINAPI GlobalReAlloc32(
|
||||
HGLOBAL32 hmem, /* [in] Handle of global memory object */
|
||||
DWORD size, /* [in] New size of block */
|
||||
UINT32 flags /* [in] How to reallocate object */
|
||||
) {
|
||||
LPVOID palloc;
|
||||
HGLOBAL32 hnew;
|
||||
PGLOBAL32_INTERN pintern;
|
||||
|
@ -1177,9 +1261,13 @@ HGLOBAL32 WINAPI GlobalReAlloc32(HGLOBAL32 hmem, DWORD size, UINT32 flags)
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalFree32 (KERNEL32.322)
|
||||
* RETURNS
|
||||
* NULL: Success
|
||||
* Handle: Failure
|
||||
*/
|
||||
HGLOBAL32 WINAPI GlobalFree32(HGLOBAL32 hmem)
|
||||
{
|
||||
HGLOBAL32 WINAPI GlobalFree32(
|
||||
HGLOBAL32 hmem /* [in] Handle of global memory object */
|
||||
) {
|
||||
PGLOBAL32_INTERN pintern;
|
||||
HGLOBAL32 hreturned = 0;
|
||||
|
||||
|
@ -1211,9 +1299,13 @@ HGLOBAL32 WINAPI GlobalFree32(HGLOBAL32 hmem)
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalSize32 (KERNEL32.329)
|
||||
* RETURNS
|
||||
* Size in bytes of the global memory object
|
||||
* 0: Failure
|
||||
*/
|
||||
DWORD WINAPI GlobalSize32(HGLOBAL32 hmem)
|
||||
{
|
||||
DWORD WINAPI GlobalSize32(
|
||||
HGLOBAL32 hmem /* [in] Handle of global memory object */
|
||||
) {
|
||||
DWORD retval;
|
||||
PGLOBAL32_INTERN pintern;
|
||||
|
||||
|
@ -1280,9 +1372,18 @@ VOID WINAPI GlobalUnfix32(HGLOBAL32 hmem)
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalFlags32 (KERNEL32.321)
|
||||
* Returns information about the specified global memory object
|
||||
*
|
||||
* NOTES
|
||||
* Should this return GMEM_INVALID_HANDLE on invalid handle?
|
||||
*
|
||||
* RETURNS
|
||||
* Value specifying allocation flags and lock count
|
||||
* GMEM_INVALID_HANDLE: Failure
|
||||
*/
|
||||
UINT32 WINAPI GlobalFlags32(HGLOBAL32 hmem)
|
||||
{
|
||||
UINT32 WINAPI GlobalFlags32(
|
||||
HGLOBAL32 hmem /* [in] Handle to global memory object */
|
||||
) {
|
||||
DWORD retval;
|
||||
PGLOBAL32_INTERN pintern;
|
||||
|
||||
|
@ -1302,7 +1403,7 @@ UINT32 WINAPI GlobalFlags32(HGLOBAL32 hmem)
|
|||
}
|
||||
else
|
||||
{
|
||||
WARN(global,"invalid handle\n");
|
||||
WARN(global,"Invalid handle: %04x", hmem);
|
||||
retval=0;
|
||||
}
|
||||
/* HeapUnlock(GetProcessHeap()); */
|
||||
|
@ -1322,9 +1423,12 @@ DWORD WINAPI GlobalCompact32( DWORD minfree )
|
|||
|
||||
/***********************************************************************
|
||||
* GlobalMemoryStatus (KERNEL32.327)
|
||||
* RETURNS
|
||||
* None
|
||||
*/
|
||||
VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpmem )
|
||||
{
|
||||
VOID WINAPI GlobalMemoryStatus(
|
||||
LPMEMORYSTATUS lpmem
|
||||
) {
|
||||
#ifdef linux
|
||||
FILE *f = fopen( "/proc/meminfo", "r" );
|
||||
if (f)
|
||||
|
@ -1380,6 +1484,7 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpmem )
|
|||
lpmem->dwAvailVirtual = 32*1024*1024;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* WOWGlobalAllocLock (KERNEL32.62)
|
||||
*
|
||||
|
@ -1393,6 +1498,7 @@ SEGPTR WINAPI WOWGlobalAllocLock16(DWORD flags,DWORD cb,HGLOBAL16 *hmem)
|
|||
return WIN16_GlobalLock16(xhmem);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* WOWGlobalUnlockFree (KERNEL32.64)
|
||||
*
|
||||
|
|
198
memory/heap.c
198
memory/heap.c
|
@ -106,42 +106,42 @@ void HEAP_Dump( HEAP *heap )
|
|||
SUBHEAP *subheap;
|
||||
char *ptr;
|
||||
|
||||
printf( "Heap: %08lx\n", (DWORD)heap );
|
||||
printf( "Next: %08lx Sub-heaps: %08lx",
|
||||
(DWORD)heap->next, (DWORD)&heap->subheap );
|
||||
DUMP( "Heap: %08lx\n", (DWORD)heap );
|
||||
DUMP( "Next: %08lx Sub-heaps: %08lx",
|
||||
(DWORD)heap->next, (DWORD)&heap->subheap );
|
||||
subheap = &heap->subheap;
|
||||
while (subheap->next)
|
||||
{
|
||||
printf( " -> %08lx", (DWORD)subheap->next );
|
||||
DUMP( " -> %08lx", (DWORD)subheap->next );
|
||||
subheap = subheap->next;
|
||||
}
|
||||
|
||||
printf( "\nFree lists:\n Block Stat Size Id\n" );
|
||||
DUMP( "\nFree lists:\n Block Stat Size Id\n" );
|
||||
for (i = 0; i < HEAP_NB_FREE_LISTS; i++)
|
||||
printf( "%08lx free %08lx %04x prev=%08lx next=%08lx\n",
|
||||
(DWORD)&heap->freeList[i].arena, heap->freeList[i].arena.size,
|
||||
heap->freeList[i].arena.threadId,
|
||||
(DWORD)heap->freeList[i].arena.prev,
|
||||
(DWORD)heap->freeList[i].arena.next );
|
||||
DUMP( "%08lx free %08lx %04x prev=%08lx next=%08lx\n",
|
||||
(DWORD)&heap->freeList[i].arena, heap->freeList[i].arena.size,
|
||||
heap->freeList[i].arena.threadId,
|
||||
(DWORD)heap->freeList[i].arena.prev,
|
||||
(DWORD)heap->freeList[i].arena.next );
|
||||
|
||||
subheap = &heap->subheap;
|
||||
while (subheap)
|
||||
{
|
||||
DWORD freeSize = 0, usedSize = 0, arenaSize = subheap->headerSize;
|
||||
printf( "\n\nSub-heap %08lx: size=%08lx committed=%08lx\n",
|
||||
(DWORD)subheap, subheap->size, subheap->commitSize );
|
||||
|
||||
printf( "\n Block Stat Size Id\n" );
|
||||
DUMP( "\n\nSub-heap %08lx: size=%08lx committed=%08lx\n",
|
||||
(DWORD)subheap, subheap->size, subheap->commitSize );
|
||||
|
||||
DUMP( "\n Block Stat Size Id\n" );
|
||||
ptr = (char*)subheap + subheap->headerSize;
|
||||
while (ptr < (char *)subheap + subheap->size)
|
||||
{
|
||||
if (*(DWORD *)ptr & ARENA_FLAG_FREE)
|
||||
{
|
||||
ARENA_FREE *pArena = (ARENA_FREE *)ptr;
|
||||
printf( "%08lx free %08lx %04x prev=%08lx next=%08lx\n",
|
||||
(DWORD)pArena, pArena->size & ARENA_SIZE_MASK,
|
||||
pArena->threadId, (DWORD)pArena->prev,
|
||||
(DWORD)pArena->next);
|
||||
DUMP( "%08lx free %08lx %04x prev=%08lx next=%08lx\n",
|
||||
(DWORD)pArena, pArena->size & ARENA_SIZE_MASK,
|
||||
pArena->threadId, (DWORD)pArena->prev,
|
||||
(DWORD)pArena->next);
|
||||
ptr += sizeof(*pArena) + (pArena->size & ARENA_SIZE_MASK);
|
||||
arenaSize += sizeof(ARENA_FREE);
|
||||
freeSize += pArena->size & ARENA_SIZE_MASK;
|
||||
|
@ -149,10 +149,10 @@ void HEAP_Dump( HEAP *heap )
|
|||
else if (*(DWORD *)ptr & ARENA_FLAG_PREV_FREE)
|
||||
{
|
||||
ARENA_INUSE *pArena = (ARENA_INUSE *)ptr;
|
||||
printf( "%08lx Used %08lx %04x back=%08lx EIP=%08lx\n",
|
||||
(DWORD)pArena, pArena->size & ARENA_SIZE_MASK,
|
||||
pArena->threadId, *((DWORD *)pArena - 1),
|
||||
pArena->callerEIP );
|
||||
DUMP( "%08lx Used %08lx %04x back=%08lx EIP=%08lx\n",
|
||||
(DWORD)pArena, pArena->size & ARENA_SIZE_MASK,
|
||||
pArena->threadId, *((DWORD *)pArena - 1),
|
||||
pArena->callerEIP );
|
||||
ptr += sizeof(*pArena) + (pArena->size & ARENA_SIZE_MASK);
|
||||
arenaSize += sizeof(ARENA_INUSE);
|
||||
usedSize += pArena->size & ARENA_SIZE_MASK;
|
||||
|
@ -160,17 +160,17 @@ void HEAP_Dump( HEAP *heap )
|
|||
else
|
||||
{
|
||||
ARENA_INUSE *pArena = (ARENA_INUSE *)ptr;
|
||||
printf( "%08lx used %08lx %04x EIP=%08lx\n",
|
||||
(DWORD)pArena, pArena->size & ARENA_SIZE_MASK,
|
||||
pArena->threadId, pArena->callerEIP );
|
||||
DUMP( "%08lx used %08lx %04x EIP=%08lx\n",
|
||||
(DWORD)pArena, pArena->size & ARENA_SIZE_MASK,
|
||||
pArena->threadId, pArena->callerEIP );
|
||||
ptr += sizeof(*pArena) + (pArena->size & ARENA_SIZE_MASK);
|
||||
arenaSize += sizeof(ARENA_INUSE);
|
||||
usedSize += pArena->size & ARENA_SIZE_MASK;
|
||||
}
|
||||
}
|
||||
printf( "\nTotal: Size=%08lx Committed=%08lx Free=%08lx Used=%08lx Arenas=%08lx (%ld%%)\n\n",
|
||||
subheap->size, subheap->commitSize, freeSize, usedSize,
|
||||
arenaSize, (arenaSize * 100) / subheap->size );
|
||||
DUMP( "\nTotal: Size=%08lx Committed=%08lx Free=%08lx Used=%08lx Arenas=%08lx (%ld%%)\n\n",
|
||||
subheap->size, subheap->commitSize, freeSize, usedSize,
|
||||
arenaSize, (arenaSize * 100) / subheap->size );
|
||||
subheap = subheap->next;
|
||||
}
|
||||
}
|
||||
|
@ -178,9 +178,13 @@ void HEAP_Dump( HEAP *heap )
|
|||
|
||||
/***********************************************************************
|
||||
* HEAP_GetPtr
|
||||
* RETURNS
|
||||
* Pointer to the heap
|
||||
* NULL: Failure
|
||||
*/
|
||||
static HEAP *HEAP_GetPtr( HANDLE32 heap )
|
||||
{
|
||||
static HEAP *HEAP_GetPtr(
|
||||
HANDLE32 heap /* [in] Handle to the heap */
|
||||
) {
|
||||
HEAP *heapPtr = (HEAP *)heap;
|
||||
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
|
||||
{
|
||||
|
@ -218,11 +222,16 @@ static void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena )
|
|||
|
||||
/***********************************************************************
|
||||
* HEAP_FindSubHeap
|
||||
*
|
||||
* Find the sub-heap containing a given address.
|
||||
*
|
||||
* RETURNS
|
||||
* Pointer: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
static SUBHEAP *HEAP_FindSubHeap( HEAP *heap, LPCVOID ptr )
|
||||
{
|
||||
static SUBHEAP *HEAP_FindSubHeap(
|
||||
HEAP *heap, /* [in] Heap pointer */
|
||||
LPCVOID ptr /* [in] Address */
|
||||
) {
|
||||
SUBHEAP *sub = &heap->subheap;
|
||||
while (sub)
|
||||
{
|
||||
|
@ -717,11 +726,20 @@ static BOOL32 HEAP_ValidateInUseArena( SUBHEAP *subheap, ARENA_INUSE *pArena )
|
|||
|
||||
/***********************************************************************
|
||||
* HEAP_IsInsideHeap
|
||||
* Checks whether the pointer points to a block inside a given heap.
|
||||
*
|
||||
* Check whether the pointer is to a block inside a given heap.
|
||||
* NOTES
|
||||
* Should this return BOOL32?
|
||||
*
|
||||
* RETURNS
|
||||
* !0: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
int HEAP_IsInsideHeap( HANDLE32 heap, DWORD flags, LPCVOID ptr )
|
||||
{
|
||||
int HEAP_IsInsideHeap(
|
||||
HANDLE32 heap, /* [in] Heap */
|
||||
DWORD flags, /* [in] Flags */
|
||||
LPCVOID ptr /* [in] Pointer */
|
||||
) {
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
SUBHEAP *subheap;
|
||||
int ret;
|
||||
|
@ -783,9 +801,15 @@ SEGPTR HEAP_GetSegptr( HANDLE32 heap, DWORD flags, LPCVOID ptr )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapCreate (KERNEL32.336)
|
||||
* RETURNS
|
||||
* Handle of heap: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HANDLE32 WINAPI HeapCreate( DWORD flags, DWORD initialSize, DWORD maxSize )
|
||||
{
|
||||
HANDLE32 WINAPI HeapCreate(
|
||||
DWORD flags, /* [in] Heap allocation flag */
|
||||
DWORD initialSize, /* [in] Initial heap size */
|
||||
DWORD maxSize /* [in] Maximum heap size */
|
||||
) {
|
||||
int i;
|
||||
HEAP *heap;
|
||||
SUBHEAP *subheap;
|
||||
|
@ -844,9 +868,13 @@ HANDLE32 WINAPI HeapCreate( DWORD flags, DWORD initialSize, DWORD maxSize )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapDestroy (KERNEL32.337)
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI HeapDestroy( HANDLE32 heap )
|
||||
{
|
||||
BOOL32 WINAPI HeapDestroy(
|
||||
HANDLE32 heap /* [in] Handle of heap */
|
||||
) {
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
SUBHEAP *subheap;
|
||||
|
||||
|
@ -868,9 +896,15 @@ BOOL32 WINAPI HeapDestroy( HANDLE32 heap )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapAlloc (KERNEL32.334)
|
||||
* RETURNS
|
||||
* Pointer to allocated memory block
|
||||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI HeapAlloc( HANDLE32 heap, DWORD flags, DWORD size )
|
||||
{
|
||||
LPVOID WINAPI HeapAlloc(
|
||||
HANDLE32 heap, /* [in] Handle of private heap block */
|
||||
DWORD flags, /* [in] Heap allocation control flags */
|
||||
DWORD size /* [in] Number of bytes to allocate */
|
||||
) {
|
||||
ARENA_FREE *pArena;
|
||||
ARENA_INUSE *pInUse;
|
||||
SUBHEAP *subheap;
|
||||
|
@ -927,9 +961,15 @@ LPVOID WINAPI HeapAlloc( HANDLE32 heap, DWORD flags, DWORD size )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapFree (KERNEL32.338)
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI HeapFree( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
||||
{
|
||||
BOOL32 WINAPI HeapFree(
|
||||
HANDLE32 heap, /* [in] Handle of heap */
|
||||
DWORD flags, /* [in] Heap freeing flags */
|
||||
LPVOID ptr /* [in] Address of memory to free */
|
||||
) {
|
||||
ARENA_INUSE *pInUse;
|
||||
SUBHEAP *subheap;
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
|
@ -966,9 +1006,16 @@ BOOL32 WINAPI HeapFree( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapReAlloc (KERNEL32.340)
|
||||
* RETURNS
|
||||
* Pointer to reallocated memory block
|
||||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI HeapReAlloc( HANDLE32 heap, DWORD flags, LPVOID ptr, DWORD size )
|
||||
{
|
||||
LPVOID WINAPI HeapReAlloc(
|
||||
HANDLE32 heap, /* [in] Handle of heap block */
|
||||
DWORD flags, /* [in] Heap reallocation flags */
|
||||
LPVOID ptr, /* [in] Address of memory to reallocate */
|
||||
DWORD size /* [in] Number of bytes to reallocate */
|
||||
) {
|
||||
ARENA_INUSE *pArena;
|
||||
DWORD oldSize;
|
||||
HEAP *heapPtr;
|
||||
|
@ -1091,9 +1138,15 @@ DWORD WINAPI HeapCompact( HANDLE32 heap, DWORD flags )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapLock (KERNEL32.339)
|
||||
* Attempts to acquire the critical section object for a specified heap.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI HeapLock( HANDLE32 heap )
|
||||
{
|
||||
BOOL32 WINAPI HeapLock(
|
||||
HANDLE32 heap /* [in] Handle of heap to lock for exclusive access */
|
||||
) {
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
if (!heapPtr) return FALSE;
|
||||
EnterCriticalSection( &heapPtr->critSection );
|
||||
|
@ -1103,9 +1156,15 @@ BOOL32 WINAPI HeapLock( HANDLE32 heap )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapUnlock (KERNEL32.342)
|
||||
* Releases ownership of the critical section object.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI HeapUnlock( HANDLE32 heap )
|
||||
{
|
||||
BOOL32 WINAPI HeapUnlock(
|
||||
HANDLE32 heap /* [in] Handle to the heap to unlock */
|
||||
) {
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
if (!heapPtr) return FALSE;
|
||||
LeaveCriticalSection( &heapPtr->critSection );
|
||||
|
@ -1115,9 +1174,15 @@ BOOL32 WINAPI HeapUnlock( HANDLE32 heap )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapSize (KERNEL32.341)
|
||||
* RETURNS
|
||||
* Size in bytes of allocated memory
|
||||
* 0: Failure
|
||||
*/
|
||||
DWORD WINAPI HeapSize( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
||||
{
|
||||
DWORD WINAPI HeapSize(
|
||||
HANDLE32 heap, /* [in] Handle of heap */
|
||||
DWORD flags, /* [in] Heap size control flags */
|
||||
LPVOID ptr /* [in] Address of memory to return size for */
|
||||
) {
|
||||
DWORD ret;
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
|
||||
|
@ -1145,11 +1210,22 @@ DWORD WINAPI HeapSize( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapValidate (KERNEL32.343)
|
||||
* Validates a specified heap.
|
||||
*
|
||||
* NOTES
|
||||
* Flags is ignored.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI HeapValidate( HANDLE32 heap, DWORD flags, LPCVOID block )
|
||||
{
|
||||
BOOL32 WINAPI HeapValidate(
|
||||
HANDLE32 heap, /* [in] Handle to the heap */
|
||||
DWORD flags, /* [in] Bit flags that control access during operation */
|
||||
LPCVOID block /* [in] Optional pointer to memory block to validate */
|
||||
) {
|
||||
SUBHEAP *subheap;
|
||||
HEAP *heapPtr = (HEAP *)heap;
|
||||
HEAP *heapPtr = HEAP_GetPtr(heap);
|
||||
|
||||
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
|
||||
{
|
||||
|
@ -1159,6 +1235,7 @@ BOOL32 WINAPI HeapValidate( HANDLE32 heap, DWORD flags, LPCVOID block )
|
|||
|
||||
if (block)
|
||||
{
|
||||
/* Only check this single memory block */
|
||||
if (!(subheap = HEAP_FindSubHeap( heapPtr, block )) ||
|
||||
((char *)block < (char *)subheap + subheap->headerSize
|
||||
+ sizeof(ARENA_INUSE)))
|
||||
|
@ -1197,9 +1274,16 @@ BOOL32 WINAPI HeapValidate( HANDLE32 heap, DWORD flags, LPCVOID block )
|
|||
|
||||
/***********************************************************************
|
||||
* HeapWalk (KERNEL32.344)
|
||||
* Enumerates the memory blocks in a specified heap.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI HeapWalk( HANDLE32 heap, void *entry )
|
||||
{
|
||||
BOOL32 WINAPI HeapWalk(
|
||||
HANDLE32 heap, /* [in] Handle to heap to enumerate */
|
||||
LPPROCESS_HEAP_ENTRY *entry /* [out] Pointer to structure of enumeration info */
|
||||
) {
|
||||
fprintf( stderr, "HeapWalk(%08x): not implemented\n", heap );
|
||||
return FALSE;
|
||||
}
|
||||
|
|
113
memory/local.c
113
memory/local.c
|
@ -266,43 +266,43 @@ static void LOCAL_PrintHeap( HANDLE16 ds )
|
|||
|
||||
if (!pInfo)
|
||||
{
|
||||
printf( "Local Heap corrupted! ds=%04x\n", ds );
|
||||
DUMP( "Local Heap corrupted! ds=%04x\n", ds );
|
||||
return;
|
||||
}
|
||||
printf( "Local Heap ds=%04x first=%04x last=%04x items=%d\n",
|
||||
ds, pInfo->first, pInfo->last, pInfo->items );
|
||||
DUMP( "Local Heap ds=%04x first=%04x last=%04x items=%d\n",
|
||||
ds, pInfo->first, pInfo->last, pInfo->items );
|
||||
|
||||
arena = pInfo->first;
|
||||
for (;;)
|
||||
{
|
||||
LOCALARENA *pArena = ARENA_PTR(ptr,arena);
|
||||
printf( " %04x: prev=%04x next=%04x type=%d\n", arena,
|
||||
pArena->prev & ~3, pArena->next, pArena->prev & 3 );
|
||||
DUMP( " %04x: prev=%04x next=%04x type=%d\n", arena,
|
||||
pArena->prev & ~3, pArena->next, pArena->prev & 3 );
|
||||
if (arena == pInfo->first)
|
||||
{
|
||||
printf( " size=%d free_prev=%04x free_next=%04x\n",
|
||||
pArena->size, pArena->free_prev, pArena->free_next );
|
||||
DUMP( " size=%d free_prev=%04x free_next=%04x\n",
|
||||
pArena->size, pArena->free_prev, pArena->free_next );
|
||||
}
|
||||
if ((pArena->prev & 3) == LOCAL_ARENA_FREE)
|
||||
{
|
||||
printf( " size=%d free_prev=%04x free_next=%04x\n",
|
||||
pArena->size, pArena->free_prev, pArena->free_next );
|
||||
DUMP( " size=%d free_prev=%04x free_next=%04x\n",
|
||||
pArena->size, pArena->free_prev, pArena->free_next );
|
||||
if (pArena->next == arena) break; /* last one */
|
||||
if (ARENA_PTR(ptr,pArena->free_next)->free_prev != arena)
|
||||
{
|
||||
printf( "*** arena->free_next->free_prev != arena\n" );
|
||||
DUMP( "*** arena->free_next->free_prev != arena\n" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pArena->next == arena)
|
||||
{
|
||||
printf( "*** last block is not marked free\n" );
|
||||
DUMP( "*** last block is not marked free\n" );
|
||||
break;
|
||||
}
|
||||
if ((ARENA_PTR(ptr,pArena->next)->prev & ~3) != arena)
|
||||
{
|
||||
printf( "*** arena->next->prev != arena (%04x, %04x)\n",
|
||||
pArena->next, ARENA_PTR(ptr,pArena->next)->prev);
|
||||
DUMP( "*** arena->next->prev != arena (%04x, %04x)\n",
|
||||
pArena->next, ARENA_PTR(ptr,pArena->next)->prev);
|
||||
break;
|
||||
}
|
||||
arena = pArena->next;
|
||||
|
@ -717,7 +717,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
|
|||
/* Free the old location */
|
||||
LOCAL_FreeArena(ds, movearena);
|
||||
/* Update handle table entry */
|
||||
pEntry->addr = finalarena + ARENA_HEADER_SIZE;
|
||||
pEntry->addr = finalarena + ARENA_HEADER_SIZE + sizeof(HLOCAL16) ;
|
||||
}
|
||||
else if((ARENA_PTR(ptr, pMoveArena->prev & ~3)->prev & 3)
|
||||
== LOCAL_ARENA_FREE)
|
||||
|
@ -727,7 +727,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
|
|||
finalarena = pMoveArena->prev & ~3;
|
||||
LOCAL_GrowArenaDownward( ds, movearena, movesize );
|
||||
/* Update handle table entry */
|
||||
pEntry->addr = finalarena + ARENA_HEADER_SIZE;
|
||||
pEntry->addr = finalarena + ARENA_HEADER_SIZE + sizeof(HLOCAL16) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1246,7 +1246,12 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
|
|||
}
|
||||
if(HANDLE_MOVEABLE(handle)) size += sizeof(HLOCAL16);
|
||||
hmem = LOCAL_GetBlock( ds, size, flags );
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); /* Reload ptr */
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); /* Reload ptr */
|
||||
if(HANDLE_MOVEABLE(handle)) /* LOCAL_GetBlock might have triggered */
|
||||
{ /* a compaction, which might in turn have */
|
||||
blockhandle = pEntry->addr ; /* moved the very block we are resizing */
|
||||
arena = ARENA_HEADER( blockhandle ); /* thus, we reload arena, too */
|
||||
}
|
||||
if (!hmem)
|
||||
{
|
||||
/* Remove the block from the heap and try again */
|
||||
|
@ -1569,12 +1574,12 @@ FARPROC16 WINAPI LocalNotify( FARPROC16 func )
|
|||
|
||||
if (!(pInfo = LOCAL_GetHeap( ds )))
|
||||
{
|
||||
fprintf( stderr, "LOCAL_Notify(%04x): Local heap not found\n", ds );
|
||||
ERR(local, "(%04x): Local heap not found\n", ds );
|
||||
LOCAL_PrintHeap( ds );
|
||||
return 0;
|
||||
}
|
||||
TRACE(local, "(%04x): %08lx\n", ds, (DWORD)func );
|
||||
fprintf(stdnimp, "LocalNotify(): Half implemented\n");
|
||||
FIXME(local, "Half implemented\n");
|
||||
oldNotify = pInfo->notify;
|
||||
pInfo->notify = func;
|
||||
return oldNotify;
|
||||
|
@ -1633,7 +1638,7 @@ WORD WINAPI LocalHandleDelta( WORD delta )
|
|||
|
||||
if (!(pInfo = LOCAL_GetHeap( CURRENT_DS )))
|
||||
{
|
||||
fprintf( stderr, "LocalHandleDelta: Local heap not found\n");
|
||||
ERR(local, "Local heap not found\n");
|
||||
LOCAL_PrintHeap( CURRENT_DS );
|
||||
return 0;
|
||||
}
|
||||
|
@ -1707,9 +1712,14 @@ BOOL16 WINAPI LocalNext( LOCALENTRY *pLocalEntry )
|
|||
|
||||
/***********************************************************************
|
||||
* LocalAlloc32 (KERNEL32.371)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HLOCAL32 WINAPI LocalAlloc32( UINT32 flags, DWORD size )
|
||||
{
|
||||
HLOCAL32 WINAPI LocalAlloc32(
|
||||
UINT32 flags, /* [in] Allocation attributes */
|
||||
DWORD size /* [in] Number of bytes to allocate */
|
||||
) {
|
||||
return (HLOCAL32)GlobalAlloc32( flags, size );
|
||||
}
|
||||
|
||||
|
@ -1725,45 +1735,70 @@ UINT32 WINAPI LocalCompact32( UINT32 minfree )
|
|||
|
||||
/***********************************************************************
|
||||
* LocalFlags32 (KERNEL32.374)
|
||||
* RETURNS
|
||||
* Value specifying allocation flags and lock count.
|
||||
* LMEM_INVALID_HANDLE: Failure
|
||||
*/
|
||||
UINT32 WINAPI LocalFlags32( HLOCAL32 handle )
|
||||
{
|
||||
UINT32 WINAPI LocalFlags32(
|
||||
HLOCAL32 handle /* [in] Handle of memory object */
|
||||
) {
|
||||
return GlobalFlags32( (HGLOBAL32)handle );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LocalFree32 (KERNEL32.375)
|
||||
* RETURNS
|
||||
* NULL: Success
|
||||
* Handle: Failure
|
||||
*/
|
||||
HLOCAL32 WINAPI LocalFree32( HLOCAL32 handle )
|
||||
{
|
||||
HLOCAL32 WINAPI LocalFree32(
|
||||
HLOCAL32 handle /* [in] Handle of memory object */
|
||||
) {
|
||||
return (HLOCAL32)GlobalFree32( (HGLOBAL32)handle );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LocalHandle32 (KERNEL32.376)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HLOCAL32 WINAPI LocalHandle32( LPCVOID ptr )
|
||||
{
|
||||
HLOCAL32 WINAPI LocalHandle32(
|
||||
LPCVOID ptr /* [in] Address of local memory object */
|
||||
) {
|
||||
return (HLOCAL32)GlobalHandle32( ptr );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LocalLock32 (KERNEL32.377)
|
||||
* Locks a local memory object and returns pointer to the first byte
|
||||
* of the memory block.
|
||||
*
|
||||
* RETURNS
|
||||
* Pointer: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI LocalLock32( HLOCAL32 handle )
|
||||
{
|
||||
LPVOID WINAPI LocalLock32(
|
||||
HLOCAL32 handle /* [in] Address of local memory object */
|
||||
) {
|
||||
return GlobalLock32( (HGLOBAL32)handle );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LocalReAlloc32 (KERNEL32.378)
|
||||
* RETURNS
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HLOCAL32 WINAPI LocalReAlloc32( HLOCAL32 handle, DWORD size, UINT32 flags )
|
||||
{
|
||||
HLOCAL32 WINAPI LocalReAlloc32(
|
||||
HLOCAL32 handle, /* [in] Handle of memory object */
|
||||
DWORD size, /* [in] New size of block */
|
||||
UINT32 flags /* [in] How to reallocate object */
|
||||
) {
|
||||
return (HLOCAL32)GlobalReAlloc32( (HGLOBAL32)handle, size, flags );
|
||||
}
|
||||
|
||||
|
@ -1779,17 +1814,25 @@ UINT32 WINAPI LocalShrink32( HGLOBAL32 handle, UINT32 newsize )
|
|||
|
||||
/***********************************************************************
|
||||
* LocalSize32 (KERNEL32.380)
|
||||
* RETURNS
|
||||
* Size: Success
|
||||
* 0: Failure
|
||||
*/
|
||||
UINT32 WINAPI LocalSize32( HLOCAL32 handle )
|
||||
{
|
||||
UINT32 WINAPI LocalSize32(
|
||||
HLOCAL32 handle /* [in] Handle of memory object */
|
||||
) {
|
||||
return GlobalSize32( (HGLOBAL32)handle );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LocalUnlock32 (KERNEL32.381)
|
||||
* RETURNS
|
||||
* TRUE: Object is still locked
|
||||
* FALSE: Object is unlocked
|
||||
*/
|
||||
BOOL32 WINAPI LocalUnlock32( HLOCAL32 handle )
|
||||
{
|
||||
BOOL32 WINAPI LocalUnlock32(
|
||||
HLOCAL32 handle /* [in] Handle of memory object */
|
||||
) {
|
||||
return GlobalUnlock32( (HGLOBAL32)handle );
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "winerror.h"
|
||||
#include "ldt.h"
|
||||
#include "debug.h"
|
||||
#include "debugstr.h"
|
||||
|
||||
static const BYTE STRING_Oem2Ansi[256] =
|
||||
"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\244"
|
||||
|
|
259
memory/virtual.c
259
memory/virtual.c
|
@ -137,28 +137,28 @@ static void VIRTUAL_DumpView( FILE_VIEW *view )
|
|||
UINT32 addr = view->base;
|
||||
BYTE prot = view->prot[0];
|
||||
|
||||
printf( "View: %08x - %08x%s",
|
||||
view->base, view->base + view->size - 1,
|
||||
(view->flags & VFLAG_SYSTEM) ? " (system)" : "" );
|
||||
DUMP( "View: %08x - %08x%s",
|
||||
view->base, view->base + view->size - 1,
|
||||
(view->flags & VFLAG_SYSTEM) ? " (system)" : "" );
|
||||
if (view->mapping && view->mapping->file)
|
||||
printf( " %s @ %08x\n", view->mapping->file->unix_name, view->offset );
|
||||
DUMP( " %s @ %08x\n", view->mapping->file->unix_name, view->offset );
|
||||
else
|
||||
printf( " (anonymous)\n");
|
||||
DUMP( " (anonymous)\n");
|
||||
|
||||
for (count = i = 1; i < view->size >> page_shift; i++, count++)
|
||||
{
|
||||
if (view->prot[i] == prot) continue;
|
||||
printf( " %08x - %08x %s\n",
|
||||
addr, addr + (count << page_shift) - 1,
|
||||
VIRTUAL_GetProtStr(prot) );
|
||||
DUMP( " %08x - %08x %s\n",
|
||||
addr, addr + (count << page_shift) - 1,
|
||||
VIRTUAL_GetProtStr(prot) );
|
||||
addr += (count << page_shift);
|
||||
prot = view->prot[i];
|
||||
count = 0;
|
||||
}
|
||||
if (count)
|
||||
printf( " %08x - %08x %s\n",
|
||||
addr, addr + (count << page_shift) - 1,
|
||||
VIRTUAL_GetProtStr(prot) );
|
||||
DUMP( " %08x - %08x %s\n",
|
||||
addr, addr + (count << page_shift) - 1,
|
||||
VIRTUAL_GetProtStr(prot) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,7 +168,7 @@ static void VIRTUAL_DumpView( FILE_VIEW *view )
|
|||
void VIRTUAL_Dump(void)
|
||||
{
|
||||
FILE_VIEW *view = VIRTUAL_FirstView;
|
||||
printf( "\nDump of all virtual memory views:\n\n" );
|
||||
DUMP( "\nDump of all virtual memory views:\n\n" );
|
||||
while (view)
|
||||
{
|
||||
VIRTUAL_DumpView( view );
|
||||
|
@ -181,9 +181,14 @@ void VIRTUAL_Dump(void)
|
|||
* VIRTUAL_FindView
|
||||
*
|
||||
* Find the view containing a given address.
|
||||
*
|
||||
* RETURNS
|
||||
* View: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
static FILE_VIEW *VIRTUAL_FindView( UINT32 addr )
|
||||
{
|
||||
static FILE_VIEW *VIRTUAL_FindView(
|
||||
UINT32 addr /* [in] Address */
|
||||
) {
|
||||
FILE_VIEW *view = VIRTUAL_FirstView;
|
||||
while (view)
|
||||
{
|
||||
|
@ -245,11 +250,14 @@ static FILE_VIEW *VIRTUAL_CreateView( UINT32 base, UINT32 size, UINT32 offset,
|
|||
|
||||
/***********************************************************************
|
||||
* VIRTUAL_DeleteView
|
||||
* Deletes a view.
|
||||
*
|
||||
* Delete an view.
|
||||
* RETURNS
|
||||
* None
|
||||
*/
|
||||
static void VIRTUAL_DeleteView( FILE_VIEW *view )
|
||||
{
|
||||
static void VIRTUAL_DeleteView(
|
||||
FILE_VIEW *view /* [in] View */
|
||||
) {
|
||||
FILE_munmap( (void *)view->base, 0, view->size );
|
||||
if (view->next) view->next->prev = view->prev;
|
||||
if (view->prev) view->prev->next = view->next;
|
||||
|
@ -281,9 +289,15 @@ static int VIRTUAL_GetUnixProt( BYTE vprot )
|
|||
* VIRTUAL_GetWin32Prot
|
||||
*
|
||||
* Convert page protections to Win32 flags.
|
||||
*
|
||||
* RETURNS
|
||||
* None
|
||||
*/
|
||||
static void VIRTUAL_GetWin32Prot( BYTE vprot, DWORD *protect, DWORD *state )
|
||||
{
|
||||
static void VIRTUAL_GetWin32Prot(
|
||||
BYTE vprot, /* [in] Page protection flags */
|
||||
DWORD *protect, /* [out] Location to store Win32 protection flags */
|
||||
DWORD *state /* [out] Location to store mem state flag */
|
||||
) {
|
||||
if (protect) {
|
||||
*protect = VIRTUAL_Win32Flags[vprot & 0x0f];
|
||||
if (vprot & VPROT_GUARD) *protect |= PAGE_GUARD;
|
||||
|
@ -298,9 +312,13 @@ static void VIRTUAL_GetWin32Prot( BYTE vprot, DWORD *protect, DWORD *state )
|
|||
* VIRTUAL_GetProt
|
||||
*
|
||||
* Build page protections from Win32 flags.
|
||||
*
|
||||
* RETURNS
|
||||
* Value of page protection flags
|
||||
*/
|
||||
static BYTE VIRTUAL_GetProt( DWORD protect )
|
||||
{
|
||||
static BYTE VIRTUAL_GetProt(
|
||||
DWORD protect /* [in] Win32 protection flags */
|
||||
) {
|
||||
BYTE vprot;
|
||||
|
||||
switch(protect & 0xff)
|
||||
|
@ -341,10 +359,17 @@ static BYTE VIRTUAL_GetProt( DWORD protect )
|
|||
* VIRTUAL_SetProt
|
||||
*
|
||||
* Change the protection of a range of pages.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
static BOOL32 VIRTUAL_SetProt( FILE_VIEW *view, UINT32 base,
|
||||
UINT32 size, BYTE vprot )
|
||||
{
|
||||
static BOOL32 VIRTUAL_SetProt(
|
||||
FILE_VIEW *view, /* [in] Pointer to view */
|
||||
UINT32 base, /* [in] Starting address */
|
||||
UINT32 size, /* [in] Size in bytes */
|
||||
BYTE vprot /* [in] Protections to use */
|
||||
) {
|
||||
TRACE(virtual, "%08x-%08x %s\n",
|
||||
base, base + size - 1, VIRTUAL_GetProtStr( vprot ) );
|
||||
|
||||
|
@ -362,9 +387,16 @@ static BOOL32 VIRTUAL_SetProt( FILE_VIEW *view, UINT32 base,
|
|||
* VIRTUAL_CheckFlags
|
||||
*
|
||||
* Check that all pages in a range have the given flags.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: They do
|
||||
* FALSE: They do not
|
||||
*/
|
||||
static BOOL32 VIRTUAL_CheckFlags( UINT32 base, UINT32 size, BYTE flags )
|
||||
{
|
||||
static BOOL32 VIRTUAL_CheckFlags(
|
||||
UINT32 base, /* [in] Starting address */
|
||||
UINT32 size, /* [in] Size in bytes */
|
||||
BYTE flags /* [in] Flags to check for */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 page;
|
||||
|
||||
|
@ -444,10 +476,10 @@ BOOL32 VIRTUAL_Init(void)
|
|||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI VirtualAlloc(
|
||||
LPVOID addr, /* Address of region to reserve or commit */
|
||||
DWORD size, /* Size of region */
|
||||
DWORD type, /* Type of allocation */
|
||||
DWORD protect /* Type of access protection */
|
||||
LPVOID addr, /* [in] Address of region to reserve or commit */
|
||||
DWORD size, /* [in] Size of region */
|
||||
DWORD type, /* [in] Type of allocation */
|
||||
DWORD protect /* [in] Type of access protection */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 base, ptr, view_size;
|
||||
|
@ -568,9 +600,9 @@ LPVOID WINAPI VirtualAlloc(
|
|||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI VirtualFree(
|
||||
LPVOID addr, /* Address of region of committed pages */
|
||||
DWORD size, /* Size of region */
|
||||
DWORD type /* Type of operation */
|
||||
LPVOID addr, /* [in] Address of region of committed pages */
|
||||
DWORD size, /* [in] Size of region */
|
||||
DWORD type /* [in] Type of operation */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 base;
|
||||
|
@ -612,7 +644,6 @@ BOOL32 WINAPI VirtualFree(
|
|||
}
|
||||
|
||||
/* Decommit the pages */
|
||||
|
||||
return VIRTUAL_SetProt( view, base, size, 0 );
|
||||
}
|
||||
|
||||
|
@ -629,8 +660,8 @@ BOOL32 WINAPI VirtualFree(
|
|||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI VirtualLock(
|
||||
LPVOID addr, /* Address of first byte of range to lock */
|
||||
DWORD size /* Number of bytes in range to lock */
|
||||
LPVOID addr, /* [in] Address of first byte of range to lock */
|
||||
DWORD size /* [in] Number of bytes in range to lock */
|
||||
) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -648,8 +679,8 @@ BOOL32 WINAPI VirtualLock(
|
|||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI VirtualUnlock(
|
||||
LPVOID addr, /* Address of first byte of range */
|
||||
DWORD size /* Number of bytes in range */
|
||||
LPVOID addr, /* [in] Address of first byte of range */
|
||||
DWORD size /* [in] Number of bytes in range */
|
||||
) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -664,10 +695,10 @@ BOOL32 WINAPI VirtualUnlock(
|
|||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI VirtualProtect(
|
||||
LPVOID addr, /* Address of region of committed pages */
|
||||
DWORD size, /* Size of region */
|
||||
DWORD new_prot, /* Desired access protection */
|
||||
LPDWORD old_prot /* Address of variable to get old protection */
|
||||
LPVOID addr, /* [in] Address of region of committed pages */
|
||||
DWORD size, /* [in] Size of region */
|
||||
DWORD new_prot, /* [in] Desired access protection */
|
||||
LPDWORD old_prot /* [out] Address of variable to get old protection */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 base, i;
|
||||
|
@ -716,11 +747,11 @@ BOOL32 WINAPI VirtualProtect(
|
|||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI VirtualProtectEx(
|
||||
HANDLE32 handle, /* Handle of process */
|
||||
LPVOID addr, /* Address of region of committed pages */
|
||||
DWORD size, /* Size of region */
|
||||
DWORD new_prot, /* Desired access protection */
|
||||
LPDWORD old_prot /* Address of variable to get old protection */
|
||||
HANDLE32 handle, /* [in] Handle of process */
|
||||
LPVOID addr, /* [in] Address of region of committed pages */
|
||||
DWORD size, /* [in] Size of region */
|
||||
DWORD new_prot, /* [in] Desired access protection */
|
||||
LPDWORD old_prot /* [out] Address of variable to get old protection */
|
||||
) {
|
||||
BOOL32 ret = FALSE;
|
||||
|
||||
|
@ -745,9 +776,9 @@ BOOL32 WINAPI VirtualProtectEx(
|
|||
* Number of bytes returned in information buffer
|
||||
*/
|
||||
DWORD WINAPI VirtualQuery(
|
||||
LPCVOID addr, /* Address of region */
|
||||
LPMEMORY_BASIC_INFORMATION info, /* Address of info buffer */
|
||||
DWORD len /* Size of buffer */
|
||||
LPCVOID addr, /* [in] Address of region */
|
||||
LPMEMORY_BASIC_INFORMATION info, /* [out] Address of info buffer */
|
||||
DWORD len /* [in] Size of buffer */
|
||||
) {
|
||||
FILE_VIEW *view = VIRTUAL_FirstView;
|
||||
UINT32 base = ROUND_ADDR( addr );
|
||||
|
@ -814,10 +845,10 @@ DWORD WINAPI VirtualQuery(
|
|||
* Number of bytes returned in information buffer
|
||||
*/
|
||||
DWORD WINAPI VirtualQueryEx(
|
||||
HANDLE32 handle, /* Handle of process */
|
||||
LPCVOID addr, /* Address of region */
|
||||
LPMEMORY_BASIC_INFORMATION info, /* Address of info buffer */
|
||||
DWORD len /* Size of buffer */
|
||||
HANDLE32 handle, /* [in] Handle of process */
|
||||
LPCVOID addr, /* [in] Address of region */
|
||||
LPMEMORY_BASIC_INFORMATION info, /* [out] Address of info buffer */
|
||||
DWORD len /* [in] Size of buffer */
|
||||
) {
|
||||
DWORD ret = len;
|
||||
|
||||
|
@ -858,8 +889,8 @@ BOOL32 WINAPI IsBadReadPtr32(
|
|||
* TRUE: Otherwise
|
||||
*/
|
||||
BOOL32 WINAPI IsBadWritePtr32(
|
||||
LPVOID ptr, /* address of memory block */
|
||||
UINT32 size /* size of block */
|
||||
LPVOID ptr, /* [in] Address of memory block */
|
||||
UINT32 size /* [in] Size of block in bytes */
|
||||
) {
|
||||
return !VIRTUAL_CheckFlags( (UINT32)ptr, size,
|
||||
VPROT_WRITE | VPROT_COMMITTED );
|
||||
|
@ -868,27 +899,42 @@ BOOL32 WINAPI IsBadWritePtr32(
|
|||
|
||||
/***********************************************************************
|
||||
* IsBadHugeReadPtr32 (KERNEL32.352)
|
||||
* RETURNS
|
||||
* FALSE: Process has read access to entire block
|
||||
* TRUE: Otherwise
|
||||
*/
|
||||
BOOL32 WINAPI IsBadHugeReadPtr32( LPCVOID ptr, UINT32 size )
|
||||
{
|
||||
BOOL32 WINAPI IsBadHugeReadPtr32(
|
||||
LPCVOID ptr, /* [in] Address of memory block */
|
||||
UINT32 size /* [in] Size of block */
|
||||
) {
|
||||
return IsBadReadPtr32( ptr, size );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsBadHugeWritePtr32 (KERNEL32.353)
|
||||
* RETURNS
|
||||
* FALSE: Process has write access to entire block
|
||||
* TRUE: Otherwise
|
||||
*/
|
||||
BOOL32 WINAPI IsBadHugeWritePtr32( LPVOID ptr, UINT32 size )
|
||||
{
|
||||
BOOL32 WINAPI IsBadHugeWritePtr32(
|
||||
LPVOID ptr, /* [in] Address of memory block */
|
||||
UINT32 size /* [in] Size of block */
|
||||
) {
|
||||
return IsBadWritePtr32( ptr, size );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsBadCodePtr32 (KERNEL32.351)
|
||||
*
|
||||
* RETURNS
|
||||
* FALSE: Process has read access to specified memory
|
||||
* TRUE: Otherwise
|
||||
*/
|
||||
BOOL32 WINAPI IsBadCodePtr32( FARPROC32 ptr )
|
||||
{
|
||||
BOOL32 WINAPI IsBadCodePtr32(
|
||||
FARPROC32 ptr /* [in] Address of function */
|
||||
) {
|
||||
return !VIRTUAL_CheckFlags( (UINT32)ptr, 1, VPROT_EXEC | VPROT_COMMITTED );
|
||||
}
|
||||
|
||||
|
@ -901,8 +947,8 @@ BOOL32 WINAPI IsBadCodePtr32( FARPROC32 ptr )
|
|||
* TRUE: Else
|
||||
*/
|
||||
BOOL32 WINAPI IsBadStringPtr32A(
|
||||
LPCSTR str, /* Address of string */
|
||||
UINT32 max /* Maximum size of string */
|
||||
LPCSTR str, /* [in] Address of string */
|
||||
UINT32 max /* [in] Maximum size of string */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 page, count;
|
||||
|
@ -929,15 +975,10 @@ BOOL32 WINAPI IsBadStringPtr32A(
|
|||
|
||||
/***********************************************************************
|
||||
* IsBadStringPtr32W (KERNEL32.356)
|
||||
*
|
||||
* RETURNS
|
||||
* FALSE: Read access to all bytes in string
|
||||
* TRUE: Else
|
||||
* See IsBadStringPtr32A
|
||||
*/
|
||||
BOOL32 WINAPI IsBadStringPtr32W(
|
||||
LPCWSTR str, /* Address of string */
|
||||
UINT32 max /* Maximum size of string */
|
||||
) {
|
||||
BOOL32 WINAPI IsBadStringPtr32W( LPCWSTR str, UINT32 max )
|
||||
{
|
||||
FILE_VIEW *view;
|
||||
UINT32 page, count;
|
||||
|
||||
|
@ -966,17 +1007,17 @@ BOOL32 WINAPI IsBadStringPtr32W(
|
|||
* Creates a named or unnamed file-mapping object for the specified file
|
||||
*
|
||||
* RETURNS
|
||||
* Handle of the file-mapping object
|
||||
* 0: Mapping object did not exist
|
||||
* Handle: Success
|
||||
* 0: Mapping object does not exist
|
||||
* NULL: Failure
|
||||
*/
|
||||
HANDLE32 WINAPI CreateFileMapping32A(
|
||||
HFILE32 hFile, /* Handle of file to map */
|
||||
LPSECURITY_ATTRIBUTES attr, /* Optional security attributes */
|
||||
DWORD protect, /* Protection for mapping object */
|
||||
DWORD size_high, /* High-order 32 bits of object size */
|
||||
DWORD size_low, /* Low-order 32 bits of object size */
|
||||
LPCSTR name /* Name of file-mapping object */
|
||||
HFILE32 hFile, /* [in] Handle of file to map */
|
||||
LPSECURITY_ATTRIBUTES attr, /* [in] Optional security attributes */
|
||||
DWORD protect, /* [in] Protection for mapping object */
|
||||
DWORD size_high, /* [in] High-order 32 bits of object size */
|
||||
DWORD size_low, /* [in] Low-order 32 bits of object size */
|
||||
LPCSTR name /* [in] Name of file-mapping object */
|
||||
) {
|
||||
FILE_MAPPING *mapping = NULL;
|
||||
HANDLE32 handle;
|
||||
|
@ -1084,10 +1125,11 @@ error:
|
|||
|
||||
/***********************************************************************
|
||||
* CreateFileMapping32W (KERNEL32.47)
|
||||
* See CreateFileMapping32A
|
||||
*/
|
||||
HANDLE32 WINAPI CreateFileMapping32W(HFILE32 hFile, LPSECURITY_ATTRIBUTES attr,
|
||||
DWORD protect, DWORD size_high,
|
||||
DWORD size_low, LPCWSTR name )
|
||||
HANDLE32 WINAPI CreateFileMapping32W( HFILE32 hFile, LPSECURITY_ATTRIBUTES attr,
|
||||
DWORD protect, DWORD size_high,
|
||||
DWORD size_low, LPCWSTR name )
|
||||
{
|
||||
LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
|
||||
HANDLE32 ret = CreateFileMapping32A( hFile, attr, protect,
|
||||
|
@ -1099,16 +1141,16 @@ HANDLE32 WINAPI CreateFileMapping32W(HFILE32 hFile, LPSECURITY_ATTRIBUTES attr,
|
|||
|
||||
/***********************************************************************
|
||||
* OpenFileMapping32A (KERNEL32.397)
|
||||
* Opens a named file-mapping object
|
||||
* Opens a named file-mapping object.
|
||||
*
|
||||
* RETURNS
|
||||
* Open handle to specified file-mapping object
|
||||
* Handle: Success
|
||||
* NULL: Failure
|
||||
*/
|
||||
HANDLE32 WINAPI OpenFileMapping32A(
|
||||
DWORD access, /* Access mode */
|
||||
BOOL32 inherit, /* Inherit flag */
|
||||
LPCSTR name /* Name of file-mapping object */
|
||||
DWORD access, /* [in] Access mode */
|
||||
BOOL32 inherit, /* [in] Inherit flag */
|
||||
LPCSTR name /* [in] Name of file-mapping object */
|
||||
) {
|
||||
HANDLE32 handle = 0;
|
||||
K32OBJ *obj;
|
||||
|
@ -1125,6 +1167,7 @@ HANDLE32 WINAPI OpenFileMapping32A(
|
|||
|
||||
/***********************************************************************
|
||||
* OpenFileMapping32W (KERNEL32.398)
|
||||
* See OpenFileMapping32A
|
||||
*/
|
||||
HANDLE32 WINAPI OpenFileMapping32W( DWORD access, BOOL32 inherit, LPCWSTR name)
|
||||
{
|
||||
|
@ -1160,11 +1203,11 @@ static void VIRTUAL_DestroyMapping( K32OBJ *ptr )
|
|||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI MapViewOfFile(
|
||||
HANDLE32 mapping, /* File-mapping object to map */
|
||||
DWORD access, /* Access mode */
|
||||
DWORD offset_high, /* High-order 32 bits of file offset */
|
||||
DWORD offset_low, /* Low-order 32 bits of file offset */
|
||||
DWORD count /* Number of bytes to map */
|
||||
HANDLE32 mapping, /* [in] File-mapping object to map */
|
||||
DWORD access, /* [in] Access mode */
|
||||
DWORD offset_high, /* [in] High-order 32 bits of file offset */
|
||||
DWORD offset_low, /* [in] Low-order 32 bits of file offset */
|
||||
DWORD count /* [in] Number of bytes to map */
|
||||
) {
|
||||
return MapViewOfFileEx( mapping, access, offset_high,
|
||||
offset_low, count, NULL );
|
||||
|
@ -1180,12 +1223,12 @@ LPVOID WINAPI MapViewOfFile(
|
|||
* NULL: Failure
|
||||
*/
|
||||
LPVOID WINAPI MapViewOfFileEx(
|
||||
HANDLE32 handle, /* File-mapping object to map */
|
||||
DWORD access, /* Access mode */
|
||||
DWORD offset_high, /* High-order 32 bits of file offset */
|
||||
DWORD offset_low, /* Low-order 32 bits of file offset */
|
||||
DWORD count, /* Number of bytes to map */
|
||||
LPVOID addr /* Suggested starting address for mapped view */
|
||||
HANDLE32 handle, /* [in] File-mapping object to map */
|
||||
DWORD access, /* [in] Access mode */
|
||||
DWORD offset_high, /* [in] High-order 32 bits of file offset */
|
||||
DWORD offset_low, /* [in] Low-order 32 bits of file offset */
|
||||
DWORD count, /* [in] Number of bytes to map */
|
||||
LPVOID addr /* [in] Suggested starting address for mapped view */
|
||||
) {
|
||||
FILE_MAPPING *mapping;
|
||||
FILE_VIEW *view;
|
||||
|
@ -1278,8 +1321,8 @@ error:
|
|||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI FlushViewOfFile(
|
||||
LPCVOID base, /* Start address of byte range to flush */
|
||||
DWORD cbFlush /* Number of bytes in range */
|
||||
LPCVOID base, /* [in] Start address of byte range to flush */
|
||||
DWORD cbFlush /* [in] Number of bytes in range */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 addr = ROUND_ADDR( base );
|
||||
|
@ -1298,11 +1341,21 @@ BOOL32 WINAPI FlushViewOfFile(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* UnmapViewOfFile (KERNEL32.540)
|
||||
* Unmaps a mapped view of a file.
|
||||
*
|
||||
* NOTES
|
||||
* Should addr be an LPCVOID?
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE: Success
|
||||
* FALSE: Failure
|
||||
*/
|
||||
BOOL32 WINAPI UnmapViewOfFile( LPVOID addr )
|
||||
{
|
||||
BOOL32 WINAPI UnmapViewOfFile(
|
||||
LPVOID addr /* [in] Address where mapped view begins */
|
||||
) {
|
||||
FILE_VIEW *view;
|
||||
UINT32 base = ROUND_ADDR( addr );
|
||||
if (!(view = VIRTUAL_FindView( base )) || (base != view->base))
|
||||
|
|
|
@ -1156,7 +1156,7 @@ BOOL16 WINAPI PrintDlg16( SEGPTR printdlg )
|
|||
*/
|
||||
BOOL32 WINAPI PrintDlg32A( LPPRINTDLG32A printdlg )
|
||||
{
|
||||
fprintf( stdnimp, "PrintDlg32A: empty stub\n" );
|
||||
FIXME(commdlg, "empty stub\n" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ BOOL32 WINAPI PrintDlg32A( LPPRINTDLG32A printdlg )
|
|||
*/
|
||||
BOOL32 WINAPI PrintDlg32W( LPPRINTDLG32W printdlg )
|
||||
{
|
||||
fprintf( stdnimp, "PrintDlg32A: empty stub\n" );
|
||||
FIXME(commdlg, "empty stub\n" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3231,7 +3231,10 @@ GET_XXX_FILENAME(GetSaveFileName)
|
|||
/***********************************************************************
|
||||
* ChooseFontA (COMDLG32.3)
|
||||
*/
|
||||
DWORD WINAPI ChooseFont32A(CHOOSEFONT pChoosefont)
|
||||
DWORD WINAPI ChooseFont32A(PCHOOSEFONT32A pChoosefont)
|
||||
{
|
||||
FIXME(commdlg,"empty stub!\n");
|
||||
|
||||
CommDlgLastError = CDERR_DIALOGFAILURE;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ void __cdecl CRTDLL__local_unwind2( CONTEXT *context )
|
|||
DWORD *args = (DWORD *)ESP_reg(context);
|
||||
PEXCEPTION_FRAME endframe = (PEXCEPTION_FRAME)args[1];
|
||||
DWORD nr = args[2];
|
||||
fprintf(stderr,"(%p,%ld)\n",endframe,nr);
|
||||
TRACE(crtdll,"(%p,%ld)\n",endframe,nr);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
@ -1111,7 +1111,7 @@ LPSTR __cdecl CRTDLL_setlocale(INT32 category,LPCSTR locale)
|
|||
case CRTDLL_LC_TIME: categorystr="LC_TIME";break;
|
||||
default: categorystr = "UNKNOWN?";break;
|
||||
}
|
||||
fprintf(stderr,"CRTDLL_setlocale(%s,%s),stub!\n",categorystr,locale);
|
||||
FIXME(crtdll,"(%s,%s),stub!\n",categorystr,locale);
|
||||
return "C";
|
||||
}
|
||||
|
||||
|
@ -1348,8 +1348,7 @@ INT32 __cdecl CRTDLL__setmode( INT32 fh,INT32 mode)
|
|||
*/
|
||||
INT32 __cdecl CRTDLL_atexit(LPVOID x)
|
||||
{
|
||||
/* FIXME */
|
||||
fprintf(stdnimp,"CRTDLL.atexit(%p), STUB.\n",x);
|
||||
FIXME(crtdll,"(%p), STUB.\n",x);
|
||||
return 0; /* successful */
|
||||
}
|
||||
|
||||
|
|
1391
misc/imagelist.c
1391
misc/imagelist.c
File diff suppressed because it is too large
Load Diff
|
@ -327,7 +327,7 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
if (!strcmp( argv[i], "-display" )) display_name = argv[i+1];
|
||||
if (!strcmp( argv[i], "-v" ) || !strcmp( argv[i], "-version" ))
|
||||
{
|
||||
printf( "%s\n", WINE_RELEASE_INFO );
|
||||
MSG( "%s\n", WINE_RELEASE_INFO );
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
@ -683,6 +683,9 @@ BOOL32 WINAPI SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
|
|||
*(BOOL32 *) lpvParam = FALSE;
|
||||
break;
|
||||
|
||||
case SPI_GETDRAGFULLWINDOWS:
|
||||
*(BOOL32 *) lpvParam = FALSE;
|
||||
|
||||
case SPI_GETGRIDGRANULARITY:
|
||||
*(INT32*)lpvParam=GetProfileInt32A("desktop","GridGranularity",1);
|
||||
break;
|
||||
|
@ -1067,5 +1070,5 @@ BOOL32 WINAPI SystemParametersInfo32W( UINT32 uAction, UINT32 uParam,
|
|||
*/
|
||||
void WINAPI FileCDR(FARPROC16 x)
|
||||
{
|
||||
printf("FileCDR(%8x)\n", (int) x);
|
||||
FIXME(file,"(%8x): stub\n", (int) x);
|
||||
}
|
||||
|
|
10
misc/mpr.c
10
misc/mpr.c
|
@ -14,9 +14,8 @@ DWORD WINAPI WNetGetCachedPassword(
|
|||
LPWORD pcbPassword,
|
||||
BYTE nType
|
||||
) {
|
||||
fprintf(stdnimp,"WNetGetCachedPassword(%s,%d,%p,%d,%d)\n",
|
||||
pbResource,cbResource,pbPassword,*pcbPassword,nType
|
||||
);
|
||||
FIXME(mpr,"(%s,%d,%p,%d,%d): stub\n",
|
||||
pbResource,cbResource,pbPassword,*pcbPassword,nType);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -24,9 +23,6 @@ DWORD WINAPI MultinetGetConnectionPerformance32A(
|
|||
LPNETRESOURCE32A lpNetResource,
|
||||
LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
|
||||
) {
|
||||
fprintf(stdnimp,"MultinetGetConnectionPerformance(%p,%p)\n",
|
||||
lpNetResource,
|
||||
lpNetConnectInfoStruct
|
||||
);
|
||||
FIXME(mpr,"(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct);
|
||||
return 1;
|
||||
}
|
||||
|
|
117
misc/network.c
117
misc/network.c
|
@ -9,14 +9,14 @@
|
|||
#include "winerror.h"
|
||||
#include "drive.h"
|
||||
#include "wnet.h"
|
||||
#include "debug.h"
|
||||
|
||||
/**************************************************************************
|
||||
* WNetErrorText [USER.499]
|
||||
*/
|
||||
int WINAPI WNetErrorText(WORD nError,LPSTR lpszText,WORD cbText)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetErrorText(%x,%p,%x)\n",
|
||||
nError,lpszText,cbText);
|
||||
FIXME(wnet, "(%x,%p,%x): stub\n",nError,lpszText,cbText);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,8 @@ int WINAPI WNetErrorText(WORD nError,LPSTR lpszText,WORD cbText)
|
|||
*/
|
||||
int WINAPI WNetOpenJob(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetOpenJob('%s','%s',%x,%p)\n",
|
||||
szQueue,szJobTitle,nCopies,pfh);
|
||||
FIXME(wnet, "('%s','%s',%x,%p): stub\n",
|
||||
szQueue,szJobTitle,nCopies,pfh);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,7 @@ int WINAPI WNetOpenJob(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
|
|||
*/
|
||||
int WINAPI WNetCloseJob(WORD fh,LPWORD pidJob,LPSTR szQueue)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetCloseJob(%x,%p,'%s')\n",
|
||||
fh,pidJob,szQueue);
|
||||
FIXME(wnet, "(%x,%p,'%s'): stub\n",fh,pidJob,szQueue);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -45,8 +44,7 @@ int WINAPI WNetCloseJob(WORD fh,LPWORD pidJob,LPSTR szQueue)
|
|||
*/
|
||||
int WINAPI WNetAbortJob(LPSTR szQueue,WORD wJobId)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetAbortJob('%s',%x)\n",
|
||||
szQueue,wJobId);
|
||||
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -55,8 +53,7 @@ int WINAPI WNetAbortJob(LPSTR szQueue,WORD wJobId)
|
|||
*/
|
||||
int WINAPI WNetHoldJob(LPSTR szQueue,WORD wJobId)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetHoldJob('%s',%x)\n",
|
||||
szQueue,wJobId);
|
||||
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -65,8 +62,7 @@ int WINAPI WNetHoldJob(LPSTR szQueue,WORD wJobId)
|
|||
*/
|
||||
int WINAPI WNetReleaseJob(LPSTR szQueue,WORD wJobId)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetReleaseJob('%s',%x)\n",
|
||||
szQueue,wJobId);
|
||||
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -75,8 +71,7 @@ int WINAPI WNetReleaseJob(LPSTR szQueue,WORD wJobId)
|
|||
*/
|
||||
int WINAPI WNetCancelJob(LPSTR szQueue,WORD wJobId)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetCancelJob('%s',%x)\n",
|
||||
szQueue,wJobId);
|
||||
FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -85,8 +80,7 @@ int WINAPI WNetCancelJob(LPSTR szQueue,WORD wJobId)
|
|||
*/
|
||||
int WINAPI WNetSetJobCopies(LPSTR szQueue,WORD wJobId,WORD nCopies)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetSetJobCopies('%s',%x,%x)\n",
|
||||
szQueue,wJobId,nCopies);
|
||||
FIXME(wnet, "('%s',%x,%x): stub\n",szQueue,wJobId,nCopies);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -95,8 +89,7 @@ int WINAPI WNetSetJobCopies(LPSTR szQueue,WORD wJobId,WORD nCopies)
|
|||
*/
|
||||
int WINAPI WNetWatchQueue(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetWatchQueue(%04x,'%s','%s',%x)\n",
|
||||
hWnd,szLocal,szUser,nQueue);
|
||||
FIXME(wnet, "(%04x,'%s','%s',%x): stub\n",hWnd,szLocal,szUser,nQueue);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -105,7 +98,7 @@ int WINAPI WNetWatchQueue(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
|
|||
*/
|
||||
int WINAPI WNetUnwatchQueue(LPSTR szQueue)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetUnwatchQueue('%s')\n", szQueue);
|
||||
FIXME(wnet, "('%s'): stub\n", szQueue);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -114,8 +107,7 @@ int WINAPI WNetUnwatchQueue(LPSTR szQueue)
|
|||
*/
|
||||
int WINAPI WNetLockQueueData(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetLockQueueData('%s','%s',%p)\n",
|
||||
szQueue,szUser,lplpQueueStruct);
|
||||
FIXME(wnet, "('%s','%s',%p): stub\n",szQueue,szUser,lplpQueueStruct);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -124,7 +116,7 @@ int WINAPI WNetLockQueueData(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
|
|||
*/
|
||||
int WINAPI WNetUnlockQueueData(LPSTR szQueue)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetUnlockQueueData('%s')\n",szQueue);
|
||||
FIXME(wnet, "('%s'): stub\n",szQueue);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -170,10 +162,11 @@ int WINAPI WNetGetCaps(WORD capability)
|
|||
switch (capability) {
|
||||
case WNNC_SPEC_VERSION:
|
||||
{
|
||||
return 0x30a; /* WfW 3.11 (and apparently other 3.1x) */
|
||||
return 0x30a; /* WfW 3.11(and apparently other 3.1x) */
|
||||
}
|
||||
case WNNC_NET_TYPE:
|
||||
/* hi byte = network type, lo byte = network vendor (Netware = 0x03) [15 types] */
|
||||
/* hi byte = network type,
|
||||
lo byte = network vendor (Netware = 0x03) [15 types] */
|
||||
return WNNC_NET_MultiNet | WNNC_SUBNET_WinWorkgroups;
|
||||
|
||||
case WNNC_DRIVER_VERSION:
|
||||
|
@ -219,7 +212,8 @@ int WINAPI WNetGetCaps(WORD capability)
|
|||
return WNNC_ERR_GetError|WNNC_ERR_GetErrorText;
|
||||
|
||||
case WNNC_PRINTMGREXT:
|
||||
/* returns the Print Manager version in major and minor format if Print Manager functions are available */
|
||||
/* returns the Print Manager version in major and
|
||||
minor format if Print Manager functions are available */
|
||||
return 0x30e; /* printman version of WfW 3.11 */
|
||||
|
||||
case 0xffff:
|
||||
|
@ -238,7 +232,7 @@ int WINAPI WNetGetCaps(WORD capability)
|
|||
*/
|
||||
int WINAPI WNetDeviceMode(HWND16 hWndOwner)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetDeviceMode(%04x)\n",hWndOwner);
|
||||
FIXME(wnet, "(%04x): stub\n",hWndOwner);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -247,8 +241,7 @@ int WINAPI WNetDeviceMode(HWND16 hWndOwner)
|
|||
*/
|
||||
int WINAPI WNetBrowseDialog(HWND16 hParent,WORD nType,LPSTR szPath)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetBrowseDialog(%04x,%x,'%s')\n",
|
||||
hParent,nType,szPath);
|
||||
FIXME(wnet, "(%04x,%x,'%s'): stub\n",hParent,nType,szPath);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -257,8 +250,7 @@ int WINAPI WNetBrowseDialog(HWND16 hParent,WORD nType,LPSTR szPath)
|
|||
*/
|
||||
UINT16 WINAPI WNetGetUser(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetUser(%p, %p, %p);\n",
|
||||
lpLocalName, lpUserName, lpSize);
|
||||
FIXME(wnet, "(%p, %p, %p): stub\n", lpLocalName, lpUserName, lpSize);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -268,8 +260,8 @@ UINT16 WINAPI WNetGetUser(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
|
|||
UINT16 WINAPI WNetAddConnection(LPSTR lpNetPath, LPSTR lpPassWord,
|
||||
LPSTR lpLocalName)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetAddConnection('%s', %p, '%s');\n",
|
||||
lpNetPath, lpPassWord, lpLocalName);
|
||||
FIXME(wnet, "('%s', %p, '%s'): stub\n",
|
||||
lpNetPath,lpPassWord,lpLocalName);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -279,8 +271,7 @@ UINT16 WINAPI WNetAddConnection(LPSTR lpNetPath, LPSTR lpPassWord,
|
|||
*/
|
||||
UINT16 WINAPI WNetCancelConnection(LPSTR lpName, BOOL16 bForce)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetCancelConnection('%s', %04X);\n",
|
||||
lpName, bForce);
|
||||
FIXME(wnet, "('%s', %04X): stub\n", lpName, bForce);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -289,7 +280,7 @@ UINT16 WINAPI WNetCancelConnection(LPSTR lpName, BOOL16 bForce)
|
|||
*/
|
||||
int WINAPI WNetGetError(LPWORD nError)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetError(%p)\n",nError);
|
||||
FIXME(wnet, "(%p): stub\n",nError);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -298,8 +289,7 @@ int WINAPI WNetGetError(LPWORD nError)
|
|||
*/
|
||||
int WINAPI WNetGetErrorText(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetErrorText(%x,%p,%p)\n",
|
||||
nError,lpBuffer,nBufferSize);
|
||||
FIXME(wnet, "(%x,%p,%p): stub\n",nError,lpBuffer,nBufferSize);
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
|
||||
|
@ -308,8 +298,7 @@ int WINAPI WNetGetErrorText(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
|
|||
*/
|
||||
int WINAPI WNetRestoreConnection(HWND16 hwndOwner,LPSTR lpszDevice)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetRestoreConnection(%04x,'%s')\n",
|
||||
hwndOwner,lpszDevice);
|
||||
FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszDevice);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -318,8 +307,7 @@ int WINAPI WNetRestoreConnection(HWND16 hwndOwner,LPSTR lpszDevice)
|
|||
*/
|
||||
int WINAPI WNetWriteJob(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetWriteJob(%04x,%p,%p)\n",
|
||||
hJob,lpData,lpcbData);
|
||||
FIXME(wnet, "(%04x,%p,%p): stub\n",hJob,lpData,lpcbData);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -328,7 +316,7 @@ int WINAPI WNetWriteJob(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
|
|||
*/
|
||||
UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetConnectDialog(%04x, %4X)\n", hWndParent, iType);
|
||||
FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType);
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -337,8 +325,7 @@ UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
|
|||
*/
|
||||
int WINAPI WNetDisconnectDialog(HWND16 hwndOwner, WORD iType)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetDisconnectDialog(%04x,%x)\n",
|
||||
hwndOwner,iType);
|
||||
FIXME(wnet, "(%04x,%x): stub\n",hwndOwner,iType);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -347,8 +334,7 @@ int WINAPI WNetDisconnectDialog(HWND16 hwndOwner, WORD iType)
|
|||
*/
|
||||
UINT16 WINAPI WNetConnectionDialog(HWND16 hWndParent, WORD iType)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetConnectionDialog(%04x, %4X)\n",
|
||||
hWndParent, iType);
|
||||
FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType);
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -357,8 +343,7 @@ UINT16 WINAPI WNetConnectionDialog(HWND16 hWndParent, WORD iType)
|
|||
*/
|
||||
int WINAPI WNetViewQueueDialog(HWND16 hwndOwner,LPSTR lpszQueue)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetViewQueueDialog(%04x,'%s')\n",
|
||||
hwndOwner,lpszQueue);
|
||||
FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszQueue);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -368,8 +353,8 @@ int WINAPI WNetViewQueueDialog(HWND16 hwndOwner,LPSTR lpszQueue)
|
|||
int WINAPI WNetPropertyDialog(HWND16 hwndParent,WORD iButton,
|
||||
WORD nPropSel,LPSTR lpszName,WORD nType)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetPropertyDialog(%04x,%x,%x,'%s',%x)\n",
|
||||
hwndParent,iButton,nPropSel,lpszName,nType);
|
||||
FIXME(wnet, "(%04x,%x,%x,'%s',%x): stub\n",
|
||||
hwndParent,iButton,nPropSel,lpszName,nType);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -378,8 +363,7 @@ int WINAPI WNetPropertyDialog(HWND16 hwndParent,WORD iButton,
|
|||
*/
|
||||
int WINAPI WNetGetDirectoryType(LPSTR lpName,void *lpType)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetDirectoryType('%s',%p)\n",
|
||||
lpName,lpType);
|
||||
FIXME(wnet, "('%s',%p): stub\n",lpName,lpType);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -388,8 +372,7 @@ int WINAPI WNetGetDirectoryType(LPSTR lpName,void *lpType)
|
|||
*/
|
||||
int WINAPI WNetDirectoryNotify(HWND16 hwndOwner,void *lpDir,WORD wOper)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetDirectoryNotify(%04x,%p,%x)\n",
|
||||
hwndOwner,lpDir,wOper);
|
||||
FIXME(wnet, "(%04x,%p,%x): stub\n",hwndOwner,lpDir,wOper);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -399,8 +382,8 @@ int WINAPI WNetDirectoryNotify(HWND16 hwndOwner,void *lpDir,WORD wOper)
|
|||
int WINAPI WNetGetPropertyText(HWND16 hwndParent,WORD iButton,WORD nPropSel,
|
||||
LPSTR lpszName,WORD nType)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetGetPropertyText(%04x,%x,%x,'%s',%x)\n",
|
||||
hwndParent,iButton,nPropSel,lpszName,nType);
|
||||
FIXME(wnet, "(%04x,%x,%x,'%s',%x): stub\n",
|
||||
hwndParent,iButton,nPropSel,lpszName,nType);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -410,8 +393,8 @@ int WINAPI WNetGetPropertyText(HWND16 hwndParent,WORD iButton,WORD nPropSel,
|
|||
UINT16 WINAPI WNetAddConnection2(LPSTR lpNetPath, LPSTR lpPassWord,
|
||||
LPSTR lpLocalName, LPSTR lpUserName)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetAddConnection2('%s', %p, '%s', '%s');\n",
|
||||
lpNetPath, lpPassWord, lpLocalName, lpUserName);
|
||||
FIXME(wnet, "('%s', %p, '%s', '%s'): stub\n",
|
||||
lpNetPath, lpPassWord, lpLocalName, lpUserName);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -420,7 +403,7 @@ UINT16 WINAPI WNetAddConnection2(LPSTR lpNetPath, LPSTR lpPassWord,
|
|||
*/
|
||||
UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetCloseEnum(%04x);\n", hEnum);
|
||||
FIXME(wnet, "(%04x): stub\n", hEnum);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -430,8 +413,8 @@ UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
|
|||
UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
|
||||
DWORD *lpCount, LPVOID lpBuf)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetEnumResource(%04x, %08lX, %p, %p);\n",
|
||||
hEnum, cRequ, lpCount, lpBuf);
|
||||
FIXME(wnet, "(%04x, %08lX, %p, %p): stub\n",
|
||||
hEnum, cRequ, lpCount, lpBuf);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -441,8 +424,8 @@ UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
|
|||
UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType,
|
||||
LPNETRESOURCE16 lpNet, HANDLE16 *lphEnum)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetOpenEnum(%08lX, %08lX, %p, %p);\n",
|
||||
dwScope, dwType, lpNet, lphEnum);
|
||||
FIXME(wnet, "(%08lX, %08lX, %p, %p): stub\n",
|
||||
dwScope, dwType, lpNet, lphEnum);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -452,8 +435,8 @@ UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType,
|
|||
UINT32 WINAPI WNetOpenEnum32A(DWORD dwScope, DWORD dwType,
|
||||
LPNETRESOURCE32A lpNet, HANDLE32 *lphEnum)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetOpenEnumA(%08lX, %08lX, %p, %p);\n",
|
||||
dwScope, dwType, lpNet, lphEnum);
|
||||
FIXME(wnet, "(%08lX, %08lX, %p, %p): stub\n",
|
||||
dwScope, dwType, lpNet, lphEnum);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
|
@ -473,8 +456,6 @@ DWORD WINAPI
|
|||
WNetGetResourceInformation32A(
|
||||
LPNETRESOURCE32A netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
|
||||
) {
|
||||
fprintf(stderr,"WNetGetResourceInformationA(%p,%p,%p,%p),stub!\n",
|
||||
netres,buf,buflen,systemstr
|
||||
);
|
||||
FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
|
11
misc/ntdll.c
11
misc/ntdll.c
|
@ -201,7 +201,7 @@ DWORD /* NTSTATUS */ WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR
|
|||
*/
|
||||
LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x)
|
||||
{
|
||||
fprintf(stdnimp,"RtlNormalizeProcessParams(%p), stub.\n",x);
|
||||
FIXME(ntdll,"(%p), stub.\n",x);
|
||||
return x;
|
||||
}
|
||||
|
||||
|
@ -490,9 +490,7 @@ BOOL32 WINAPI RtlDosPathNameToNtPathName_U(
|
|||
{
|
||||
LPSTR fromA = HEAP_strdupWtoA(GetProcessHeap(),0,from);
|
||||
|
||||
fprintf(stderr,"RtlDosPathNameToNtPathName_U(%s,%p,%08lx,%08lx)\n",
|
||||
fromA,us,x2,x3
|
||||
);
|
||||
FIXME(ntdll,"(%s,%p,%08lx,%08lx)\n",fromA,us,x2,x3);
|
||||
if (us)
|
||||
RtlInitUnicodeString(us,HEAP_strdupW(GetProcessHeap(),0,from));
|
||||
return TRUE;
|
||||
|
@ -503,9 +501,8 @@ BOOL32 WINAPI RtlDosPathNameToNtPathName_U(
|
|||
*/
|
||||
DWORD WINAPI NtOpenFile(DWORD x1,DWORD flags,DWORD x3,DWORD x4,DWORD alignment,DWORD x6)
|
||||
{
|
||||
fprintf(stderr,"NtOpenFile(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx)\n",
|
||||
x1,flags,x3,x4,alignment,x6
|
||||
);
|
||||
FIXME(ntdll,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx)\n",
|
||||
x1,flags,x3,x4,alignment,x6);
|
||||
/* returns file io completion status */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -11,20 +11,20 @@
|
|||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
|
||||
{
|
||||
INT16 retVal;
|
||||
printf("In startdoc16(%p)\n", lpdoc );
|
||||
printf("In StartDoc16 %d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
|
||||
lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
|
||||
lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
|
||||
printf("In StartDoc16 %d %s %s\n",lpdoc->cbSize,
|
||||
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
|
||||
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
|
||||
TRACE(print,"(%p)\n", lpdoc );
|
||||
TRACE(print,"%d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
|
||||
lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
|
||||
lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
|
||||
TRACE(print, "%d %s %s\n",lpdoc->cbSize,
|
||||
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
|
||||
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
|
||||
retVal = Escape16(hdc, STARTDOC, sizeof(DOCINFO16), lpdoc->lpszDocName, 0);
|
||||
printf("Escape16 returned %d\n",retVal);
|
||||
TRACE(print,"Escape16 returned %d\n",retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
|
41
misc/shell.c
41
misc/shell.c
|
@ -23,7 +23,6 @@
|
|||
#include "sysmetrics.h"
|
||||
#include "shlobj.h"
|
||||
#include "debug.h"
|
||||
#include "debugstr.h"
|
||||
#include "winreg.h"
|
||||
|
||||
static const char * const SHELL_People[] =
|
||||
|
@ -1406,12 +1405,6 @@ LRESULT WINAPI ShellHookProc(INT16 code, WPARAM16 wParam, LPARAM lParam)
|
|||
return CallNextHookEx16( WH_SHELL, code, wParam, lParam );
|
||||
}
|
||||
|
||||
LRESULT WINAPI FUNC004(INT16 code, WPARAM16 wParam, /*LPARAM*/WORD lParam)
|
||||
{
|
||||
FIXME(reg,"(%d,%d,%d),STUB!\n",code,wParam,lParam);
|
||||
return ShellHookProc(code,wParam,(DWORD)lParam);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* RegisterShellHook [SHELL.102]
|
||||
*/
|
||||
|
@ -1460,9 +1453,8 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
|
|||
SHFILEINFO32A *psfi, UINT32 sizeofpsfi,
|
||||
UINT32 flags )
|
||||
{
|
||||
fprintf(stdnimp,"SHGetFileInfo32A(%s,0x%08lx,%p,%d,0x%08x)\n",
|
||||
path,dwFileAttributes,psfi,sizeofpsfi,flags
|
||||
);
|
||||
FIXME(shell,"(%s,0x%08lx,%p,%d,0x%08x): stub\n",
|
||||
path,dwFileAttributes,psfi,sizeofpsfi,flags);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1471,7 +1463,7 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
|
|||
*/
|
||||
UINT32 WINAPI SHAppBarMessage32(DWORD msg, PAPPBARDATA data)
|
||||
{
|
||||
fprintf(stdnimp,"SHAppBarMessage32(0x%08lx,%p)\n", msg, data);
|
||||
FIXME(shell,"(0x%08lx,%p): stub\n", msg, data);
|
||||
#if 0
|
||||
switch (msg) {
|
||||
case ABM_ACTIVATE:
|
||||
|
@ -1549,8 +1541,7 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
|
|||
void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
|
||||
{
|
||||
TRACE(exec, "(%08x, %p, \"%s\", %08lx)\n",
|
||||
hwnd, code ? code : "(null)",
|
||||
cmd ? cmd : "(null)", arg4);
|
||||
hwnd, code ? code : "(null)", cmd ? cmd : "(null)", arg4);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -1558,7 +1549,7 @@ void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
|
|||
|
||||
void WINAPI FreeIconList( DWORD dw )
|
||||
{
|
||||
fprintf( stdnimp, "FreeIconList: empty stub\n" );
|
||||
FIXME(reg, "empty stub\n" );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -1574,7 +1565,7 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
|
|||
|
||||
WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
|
||||
WINE_StringFromCLSID((LPCLSID)iid,xiid);
|
||||
fprintf(stderr,"SHELL32_DllGetClassObject(%s,%s,%p)\n",xclsid,xiid,ppv);
|
||||
TRACE(shell,"(%s,%s,%p)\n",xclsid,xiid,ppv);
|
||||
|
||||
*ppv = NULL;
|
||||
/* SDK example code looks like this:
|
||||
|
@ -1595,13 +1586,13 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
|
|||
*/
|
||||
|
||||
if (!memcmp(rclsid,&CLSID_ShellDesktop,sizeof(CLSID_ShellDesktop))) {
|
||||
fprintf(stderr," requested CLSID_ShellDesktop, creating it.\n");
|
||||
TRACE(shell," requested CLSID_ShellDesktop, creating it.\n");
|
||||
*ppv = IShellFolder_Constructor();
|
||||
/* FIXME: Initialize this folder to be the shell desktop folder */
|
||||
FIXME(shell,"Initialize this folder to be the shell desktop folder\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf (stdnimp, " -> clsid not found. returning E_OUTOFMEMORY.\n");
|
||||
FIXME(shell, " -> clsid not found. returning E_OUTOFMEMORY.\n");
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
@ -1633,7 +1624,7 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) {
|
|||
* heap (ProcessHeap).
|
||||
*/
|
||||
DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) {
|
||||
fprintf(stderr,"SHGetMalloc()\n");
|
||||
TRACE(shell,"(%p)\n", lpmal);
|
||||
return CoGetMalloc32(0,lpmal);
|
||||
}
|
||||
|
||||
|
@ -1644,11 +1635,9 @@ DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) {
|
|||
* nFolder is a CSIDL_xxxxx.
|
||||
*/
|
||||
HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl) {
|
||||
fprintf(stderr,"SHGetSpecialFolderLocation(%04x,%d,%p),stub!\n",
|
||||
hwndOwner,nFolder,ppidl
|
||||
);
|
||||
FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl);
|
||||
*ppidl = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,2*sizeof(ITEMIDLIST));
|
||||
/* FIXME: we return only the empty ITEMIDLIST currently. */
|
||||
FIXME(shell, "we return only the empty ITEMIDLIST currently.\n");
|
||||
(*ppidl)->mkid.cb = 0;
|
||||
return NOERROR;
|
||||
}
|
||||
|
@ -1658,8 +1647,12 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
|
|||
* returns the path from a passed PIDL.
|
||||
*/
|
||||
BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath) {
|
||||
fprintf(stderr,"SHGetPathFromIDList(%p,%p),stub!\n",pidl,pszPath);
|
||||
FIXME(shell,"(%p,%p),stub!\n",pidl,pszPath);
|
||||
lstrcpy32A(pszPath,"E:\\"); /* FIXME */
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ void WINAPI SHELL32_119(LPVOID x) {
|
|||
* unknown
|
||||
*/
|
||||
void WINAPI SHELL32_175(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
|
||||
fprintf(stdnimp,"SHELL32_175(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub\n",
|
||||
fprintf(stderr,"SHELL32_175(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub\n",
|
||||
x1,x2,x3,x4
|
||||
);
|
||||
}
|
||||
|
|
67
misc/sound.c
67
misc/sound.c
|
@ -6,98 +6,99 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "debug.h"
|
||||
|
||||
INT16 WINAPI OpenSound16(void)
|
||||
{
|
||||
printf("OpenSound16()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
void WINAPI OpenSound32(void)
|
||||
{
|
||||
printf("OpenSound32()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
}
|
||||
|
||||
void WINAPI CloseSound(void)
|
||||
{
|
||||
printf("CloseSound()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
}
|
||||
|
||||
INT16 WINAPI SetVoiceQueueSize16(INT16 nVoice, INT16 nBytes)
|
||||
{
|
||||
printf("SetVoiceQueueSize16 (%d,%d)\n",nVoice,nBytes);
|
||||
FIXME(sound, "(%d,%d): stub\n",nVoice,nBytes);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetVoiceQueueSize32(DWORD nVoice, DWORD nBytes)
|
||||
{
|
||||
printf("SetVoiceQueueSize32 (%ld,%ld)\n",nVoice,nBytes);
|
||||
FIXME(sound, "(%ld,%ld): stub\n",nVoice,nBytes);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SetVoiceNote16(INT16 nVoice, INT16 nValue, INT16 nLength,
|
||||
INT16 nCdots)
|
||||
{
|
||||
printf("SetVoiceNote16 (%d,%d,%d,%d)\n",nVoice,nValue,nLength,nCdots);
|
||||
FIXME(sound, "(%d,%d,%d,%d): stub\n",nVoice,nValue,nLength,nCdots);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetVoiceNote32(DWORD nVoice, DWORD nValue, DWORD nLength,
|
||||
DWORD nCdots)
|
||||
{
|
||||
printf("SetVoiceNote32 (%ld,%ld,%ld,%ld)\n",nVoice,nValue,nLength,nCdots);
|
||||
FIXME(sound, "(%ld,%ld,%ld,%ld): stub\n",nVoice,nValue,nLength,nCdots);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SetVoiceAccent16(INT16 nVoice, INT16 nTempo, INT16 nVolume,
|
||||
INT16 nMode, INT16 nPitch)
|
||||
{
|
||||
printf("SetVoiceAccent16(%d,%d,%d,%d,%d)\n", nVoice, nTempo,
|
||||
nVolume, nMode, nPitch);
|
||||
FIXME(sound, "(%d,%d,%d,%d,%d): stub\n", nVoice, nTempo,
|
||||
nVolume, nMode, nPitch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetVoiceAccent32(DWORD nVoice, DWORD nTempo, DWORD nVolume,
|
||||
DWORD nMode, DWORD nPitch)
|
||||
{
|
||||
printf("SetVoiceAccent32(%ld,%ld,%ld,%ld,%ld)\n", nVoice, nTempo,
|
||||
nVolume, nMode, nPitch);
|
||||
FIXME(sound, "(%ld,%ld,%ld,%ld,%ld): stub\n", nVoice, nTempo,
|
||||
nVolume, nMode, nPitch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SetVoiceEnvelope16(INT16 nVoice, INT16 nShape, INT16 nRepeat)
|
||||
{
|
||||
printf("SetVoiceEnvelope16(%d,%d,%d)\n",nVoice,nShape,nRepeat);
|
||||
FIXME(sound, "(%d,%d,%d): stub\n",nVoice,nShape,nRepeat);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetVoiceEnvelope32(DWORD nVoice, DWORD nShape, DWORD nRepeat)
|
||||
{
|
||||
printf("SetVoiceEnvelope32(%ld,%ld,%ld)\n",nVoice,nShape,nRepeat);
|
||||
FIXME(sound, "(%ld,%ld,%ld): stub\n",nVoice,nShape,nRepeat);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SetSoundNoise16(INT16 nSource, INT16 nDuration)
|
||||
{
|
||||
printf("SetSoundNoise16(%d,%d)\n",nSource,nDuration);
|
||||
FIXME(sound, "(%d,%d): stub\n",nSource,nDuration);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetSoundNoise32(DWORD nSource, DWORD nDuration)
|
||||
{
|
||||
printf("SetSoundNoise32(%ld,%ld)\n",nSource,nDuration);
|
||||
FIXME(sound, "(%ld,%ld): stub\n",nSource,nDuration);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SetVoiceSound16(INT16 nVoice, DWORD lFrequency, INT16 nDuration)
|
||||
{
|
||||
printf("SetVoiceSound16(%d, %ld, %d)\n",nVoice,lFrequency, nDuration);
|
||||
FIXME(sound, "(%d, %ld, %d): stub\n",nVoice,lFrequency, nDuration);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetVoiceSound32(DWORD nVoice, DWORD lFrequency, DWORD nDuration)
|
||||
{
|
||||
printf("SetVoiceSound32(%ld, %ld, %ld)\n",nVoice,lFrequency, nDuration);
|
||||
FIXME(sound, "(%ld, %ld, %ld): stub\n",nVoice,lFrequency, nDuration);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -113,77 +114,81 @@ INT16 WINAPI StopSound16(void)
|
|||
|
||||
INT16 WINAPI WaitSoundState16(INT16 x)
|
||||
{
|
||||
fprintf(stderr, "WaitSoundState16(%d)\n", x);
|
||||
FIXME(sound, "(%d): stub\n", x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI WaitSoundState32(DWORD x)
|
||||
{
|
||||
fprintf(stderr, "WaitSoundState32(%ld)\n", x);
|
||||
FIXME(sound, "(%ld): stub\n", x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SyncAllVoices16(void)
|
||||
{
|
||||
fprintf(stderr, "SyncAllVoices16()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SyncAllVoices32(void)
|
||||
{
|
||||
fprintf(stderr, "SyncAllVoices32()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI CountVoiceNotes16(INT16 x)
|
||||
{
|
||||
fprintf(stderr, "CountVoiceNotes16(%d)\n", x);
|
||||
FIXME(sound, "(%d): stub\n", x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI CountVoiceNotes32(DWORD x)
|
||||
{
|
||||
fprintf(stderr, "CountVoiceNotes32(%ld)\n", x);
|
||||
FIXME(sound, "(%ld): stub\n", x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LPINT16 WINAPI GetThresholdEvent16(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdEvent16()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LPDWORD WINAPI GetThresholdEvent32(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdEvent32()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INT16 WINAPI GetThresholdStatus16(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdStatus16()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI GetThresholdStatus32(void)
|
||||
{
|
||||
fprintf(stderr, "GetThresholdStatus32()\n");
|
||||
FIXME(sound, "(void): stub\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT16 WINAPI SetVoiceThreshold16(INT16 a, INT16 b)
|
||||
{
|
||||
fprintf(stderr, "SetVoiceThreshold16(%d,%d)\n", a, b);
|
||||
return 0;
|
||||
FIXME(sound, "(%d,%d): stub\n", a, b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI SetVoiceThreshold32(DWORD a, DWORD b)
|
||||
{
|
||||
fprintf(stderr, "SetVoiceThreshold32(%ld,%ld)\n", a, b);
|
||||
FIXME(sound, "(%ld,%ld): stub\n", a, b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WINAPI DoBeep(void)
|
||||
{
|
||||
fprintf(stderr, "BEEP!\n");
|
||||
FIXME(sound, "(void): stub!\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "winbase.h"
|
||||
#include "process.h"
|
||||
#include "options.h"
|
||||
#include "debug.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -98,11 +99,11 @@ void VERSION_ParseVersion( char *arg )
|
|||
return;
|
||||
}
|
||||
}
|
||||
fprintf( stderr, "Invalid winver value '%s' specified.\n", arg );
|
||||
fprintf( stderr, "Valid versions are:" );
|
||||
MSG("Invalid winver value '%s' specified.\n", arg );
|
||||
MSG("Valid versions are:" );
|
||||
for (i = 0; i < NB_VERSIONS; i++)
|
||||
fprintf( stderr, " '%s'%c", VersionNames[i],
|
||||
(i == NB_VERSIONS - 1) ? '\n' : ',' );
|
||||
MSG(" '%s'%c", VersionNames[i],
|
||||
(i == NB_VERSIONS - 1) ? '\n' : ',' );
|
||||
}
|
||||
|
||||
|
||||
|
@ -134,9 +135,9 @@ static VERSION VERSION_GetVersion(void)
|
|||
/* NT 3.51 */
|
||||
if (peheader->OptionalHeader.MinorSubsystemVersion == 51) return NT351;
|
||||
}
|
||||
fprintf(stderr,"VERSION_GetVersion: unknown subsystem version: %04x.%04x, please report.\n",
|
||||
peheader->OptionalHeader.MajorSubsystemVersion,
|
||||
peheader->OptionalHeader.MinorSubsystemVersion );
|
||||
ERR(ver,"unknown subsystem version: %04x.%04x, please report.\n",
|
||||
peheader->OptionalHeader.MajorSubsystemVersion,
|
||||
peheader->OptionalHeader.MinorSubsystemVersion );
|
||||
return defaultVersion;
|
||||
}
|
||||
|
||||
|
@ -169,7 +170,7 @@ BOOL32 WINAPI GetVersionEx32A(OSVERSIONINFO32A *v)
|
|||
VERSION ver = VERSION_GetVersion();
|
||||
if (v->dwOSVersionInfoSize != sizeof(OSVERSIONINFO32A))
|
||||
{
|
||||
fprintf(stderr,"wrong OSVERSIONINFO size from app");
|
||||
WARN(ver,"wrong OSVERSIONINFO size from app");
|
||||
return FALSE;
|
||||
}
|
||||
v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
|
||||
|
@ -189,7 +190,7 @@ BOOL32 WINAPI GetVersionEx32W(OSVERSIONINFO32W *v)
|
|||
VERSION ver = VERSION_GetVersion();
|
||||
if (v->dwOSVersionInfoSize!=sizeof(OSVERSIONINFO32W))
|
||||
{
|
||||
fprintf(stderr,"wrong OSVERSIONINFO size from app");
|
||||
WARN(ver,"wrong OSVERSIONINFO size from app");
|
||||
return FALSE;
|
||||
}
|
||||
v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
|
||||
|
@ -228,7 +229,7 @@ DWORD WINAPI GetWinFlags(void)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unknown mode set? This shouldn't happen. Check GetWinFlags()!\n");
|
||||
ERR(ver, "Unknown mode set? This shouldn't happen. Check GetWinFlags()!\n");
|
||||
break;
|
||||
}
|
||||
if (si.wProcessorLevel >= 4) result |= WF_HASCPUID;
|
||||
|
@ -245,8 +246,8 @@ DWORD WINAPI GetWinFlags(void)
|
|||
*/
|
||||
BOOL16 WINAPI GetWinDebugInfo(WINDEBUGINFO *lpwdi, UINT16 flags)
|
||||
{
|
||||
printf("GetWinDebugInfo(%8lx,%d) stub returning 0\n",
|
||||
(unsigned long)lpwdi, flags);
|
||||
FIXME(ver, "(%8lx,%d): stub returning 0\n",
|
||||
(unsigned long)lpwdi, flags);
|
||||
/* 0 means not in debugging mode/version */
|
||||
/* Can this type of debugging be used in wine ? */
|
||||
/* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
|
||||
|
@ -259,7 +260,7 @@ BOOL16 WINAPI GetWinDebugInfo(WINDEBUGINFO *lpwdi, UINT16 flags)
|
|||
*/
|
||||
BOOL16 WINAPI SetWinDebugInfo(WINDEBUGINFO *lpwdi)
|
||||
{
|
||||
printf("SetWinDebugInfo(%8lx) stub returning 0\n", (unsigned long)lpwdi);
|
||||
FIXME(ver, "(%8lx): stub returning 0\n", (unsigned long)lpwdi);
|
||||
/* 0 means not in debugging mode/version */
|
||||
/* Can this type of debugging be used in wine ? */
|
||||
/* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
|
||||
|
@ -296,5 +297,6 @@ BOOL16 WINAPI DiagQuery()
|
|||
*/
|
||||
void WINAPI DiagOutput(LPCSTR str)
|
||||
{
|
||||
fprintf(stderr,"DIAGOUTPUT:%s\n",str);
|
||||
/* FIXME */
|
||||
DPRINTF("DIAGOUTPUT:%s\n",str);
|
||||
}
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
#include "windows.h"
|
||||
#include "w32sys.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWin32sInfo (W32SYS.12)
|
||||
* RETURNS
|
||||
* 0 on success, 1 on failure
|
||||
*/
|
||||
WORD WINAPI GetWin32sInfo( LPWIN32SINFO lpInfo)
|
||||
{
|
||||
WORD WINAPI GetWin32sInfo(
|
||||
LPWIN32SINFO lpInfo /* [out] Win32S special information */
|
||||
) {
|
||||
lpInfo->bMajor = 1;
|
||||
lpInfo->bMinor = 3;
|
||||
lpInfo->wBuildNumber = 0;
|
||||
|
@ -21,3 +23,15 @@ WORD WINAPI GetWin32sInfo( LPWIN32SINFO lpInfo)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetPEResourceTable (W32SYS.7)
|
||||
* retrieves the resourcetable from the passed filedescriptor
|
||||
* RETURNS
|
||||
* dunno what.
|
||||
*/
|
||||
WORD WINAPI GetPEResourceTable(
|
||||
HFILE16 hf /* [in] filedescriptor to opened executeable */
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "module.h"
|
||||
|
||||
/***********************************************************************
|
||||
* WinNotify (WINDEBUG.1)
|
||||
* WinNotify (WINDEBUG.3)
|
||||
* written without _any_ docu
|
||||
*/
|
||||
void WinNotify(CONTEXT *context)
|
||||
|
|
|
@ -1704,7 +1704,7 @@ HANDLE32 WINAPI WSAAsyncGetHostByAddr32(HWND32 hWnd, UINT32 uMsg, LPCSTR addr,
|
|||
|
||||
if( pwsi )
|
||||
return __WSAsyncDBQuery(pwsi, hWnd, uMsg, type, addr, len,
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_HOSTBYADDR | WSMSG_ASYNC_WIN32);
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_HOSTBYADDR | WSMSG_WIN32_AOP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1738,7 +1738,7 @@ HANDLE32 WINAPI WSAAsyncGetHostByName32(HWND32 hWnd, UINT32 uMsg, LPCSTR name,
|
|||
(name)?name:NULL_STRING, (int)buflen );
|
||||
if( pwsi )
|
||||
return __WSAsyncDBQuery(pwsi, hWnd, uMsg, 0, name, 0,
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_HOSTBYNAME | WSMSG_ASYNC_WIN32);
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_HOSTBYNAME | WSMSG_WIN32_AOP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1773,7 +1773,7 @@ HANDLE32 WINAPI WSAAsyncGetProtoByName32(HWND32 hWnd, UINT32 uMsg, LPCSTR name,
|
|||
|
||||
if( pwsi )
|
||||
return __WSAsyncDBQuery(pwsi, hWnd, uMsg, 0, name, 0,
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_PROTOBYNAME | WSMSG_ASYNC_WIN32);
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_PROTOBYNAME | WSMSG_WIN32_AOP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1808,7 +1808,7 @@ HANDLE32 WINAPI WSAAsyncGetProtoByNumber32(HWND32 hWnd, UINT32 uMsg, INT32 numbe
|
|||
|
||||
if( pwsi )
|
||||
return __WSAsyncDBQuery(pwsi, hWnd, uMsg, number, NULL, 0,
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_PROTOBYNUM | WSMSG_ASYNC_WIN32);
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_PROTOBYNUM | WSMSG_WIN32_AOP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1853,7 +1853,7 @@ HANDLE32 WINAPI WSAAsyncGetServByName32(HWND32 hWnd, UINT32 uMsg, LPCSTR name,
|
|||
|
||||
if( i )
|
||||
return __WSAsyncDBQuery(pwsi, hWnd, uMsg, 0, pwsi->buffer, 0,
|
||||
pwsi->buffer + i, (void*)sbuf, buflen, WSMSG_ASYNC_SERVBYNAME | WSMSG_ASYNC_WIN32);
|
||||
pwsi->buffer + i, (void*)sbuf, buflen, WSMSG_ASYNC_SERVBYNAME | WSMSG_WIN32_AOP);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1898,7 +1898,7 @@ HANDLE32 WINAPI WSAAsyncGetServByPort32(HWND32 hWnd, UINT32 uMsg, INT32 port,
|
|||
|
||||
if( i )
|
||||
return __WSAsyncDBQuery(pwsi, hWnd, uMsg, port, pwsi->buffer, 0,
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_SERVBYPORT | WSMSG_ASYNC_WIN32);
|
||||
NULL, (void*)sbuf, buflen, WSMSG_ASYNC_SERVBYPORT | WSMSG_WIN32_AOP);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -2377,13 +2377,12 @@ DWORD WINAPI WsControl(DWORD protocoll,DWORD action,
|
|||
char type= *(unsigned char*)(inbuf+15); /* 0x2: don't fragment*/
|
||||
#endif
|
||||
|
||||
fprintf(stdnimp,"WsControl(ICMP_ECHO) to 0x%08x stub \n",
|
||||
addr);
|
||||
FIXME(winsock,"(ICMP_ECHO) to 0x%08x stub \n", addr);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
fprintf(stdnimp,"WsControl(%lx,%lx,%p,%p,%p,%p) stub\n",
|
||||
protocoll,action,inbuf,inbuflen,outbuf,outbuflen);
|
||||
FIXME(winsock,"(%lx,%lx,%p,%p,%p,%p) stub\n",
|
||||
protocoll,action,inbuf,inbuflen,outbuf,outbuflen);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -2392,8 +2391,8 @@ DWORD WINAPI WsControl(DWORD protocoll,DWORD action,
|
|||
*/
|
||||
void WINAPI WS_s_perror(LPCSTR message)
|
||||
{
|
||||
fprintf(stdnimp,"s_perror %s stub\n",message);
|
||||
return;
|
||||
FIXME(winsock,"(%s): stub\n",message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2607,6 +2606,7 @@ UINT16 wsaErrno(void)
|
|||
case ENETUNREACH: return WSAENETUNREACH;
|
||||
case ENETRESET: return WSAENETRESET;
|
||||
case ECONNABORTED: return WSAECONNABORTED;
|
||||
case EPIPE:
|
||||
case ECONNRESET: return WSAECONNRESET;
|
||||
case ENOBUFS: return WSAENOBUFS;
|
||||
case EISCONN: return WSAEISCONN;
|
||||
|
|
|
@ -43,8 +43,6 @@ extern int h_errno;
|
|||
#define FASYNC FIOASYNC
|
||||
#endif
|
||||
|
||||
#define __WS_ASYNC_DEBUG 0
|
||||
|
||||
typedef struct /* async DNS op control struct */
|
||||
{
|
||||
ws_async_op* ws_aop;
|
||||
|
@ -135,7 +133,7 @@ void WINSOCK_cancel_task_aops(HTASK16 hTask, void (*__opfree)(void*))
|
|||
{
|
||||
/* SIGIO safe, hTask == 0 cancels all outstanding async ops */
|
||||
|
||||
int num = 0;
|
||||
int num = 0, num_dead = 0;
|
||||
ws_async_op* p, *next;
|
||||
|
||||
TRACE(winsock," cancelling async DNS requests... \n");
|
||||
|
@ -149,13 +147,16 @@ void WINSOCK_cancel_task_aops(HTASK16 hTask, void (*__opfree)(void*))
|
|||
next = p->next;
|
||||
if(!hTask || !hWndTask || (hTask == hWndTask))
|
||||
{
|
||||
num++;
|
||||
if( p->flags & WSMSG_DEAD_AOP )
|
||||
num_dead++;
|
||||
|
||||
WINSOCK_cancel_async_op(p);
|
||||
if( __opfree ) __opfree(p);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
SIGNAL_MaskAsyncEvents( FALSE );
|
||||
TRACE(winsock," -> %i total\n", num );
|
||||
TRACE(winsock," -> %i total (%i active)\n", num, num - num_dead );
|
||||
}
|
||||
|
||||
void WINSOCK_link_async_op(ws_async_op* p_aop)
|
||||
|
@ -278,11 +279,11 @@ static int aop_control(ws_async_op* p_aop, int flag )
|
|||
{
|
||||
if( (int)LOWORD(lLength) <= p_aop->buflen )
|
||||
{
|
||||
char* buffer = (p_aop->flags & WSMSG_ASYNC_WIN32)
|
||||
char* buffer = (p_aop->flags & WSMSG_WIN32_AOP)
|
||||
? p_aop->b.lin_base : (char*)PTR_SEG_TO_LIN(p_aop->b.seg_base);
|
||||
|
||||
read(p_aop->fd[0], buffer, LOWORD(lLength));
|
||||
switch( p_aop->flags )
|
||||
switch( p_aop->flags & WSMSG_ASYNC_RQMASK )
|
||||
{
|
||||
case WSMSG_ASYNC_HOSTBYNAME:
|
||||
case WSMSG_ASYNC_HOSTBYADDR:
|
||||
|
@ -301,10 +302,10 @@ static int aop_control(ws_async_op* p_aop, int flag )
|
|||
else lLength = ((UINT32)LOWORD(lLength)) | ((unsigned)WSAENOBUFS << 16);
|
||||
} /* failure */
|
||||
|
||||
#if __WS_ASYNC_DEBUG
|
||||
printf("DNS aop completed: hWnd [%04x], uMsg [%04x], aop [%04x], event [%08x]\n",
|
||||
p_aop->hWnd, p_aop->uMsg, __ws_gethandle(p_aop), (LPARAM)lLength);
|
||||
#endif
|
||||
/* was a __WS_ASYNC_DEBUG statement */
|
||||
TRACE(winsock, "DNS aop completed: hWnd [%04x], uMsg [%04x], "
|
||||
"aop [%04x], event [%08lx]\n",
|
||||
p_aop->hWnd, p_aop->uMsg, __ws_gethandle(p_aop), (LPARAM)lLength);
|
||||
|
||||
/* FIXME: update num_async_rq */
|
||||
EVENT_DeleteIO( p_aop->fd[0], EVENT_IO_READ );
|
||||
|
@ -366,7 +367,7 @@ HANDLE16 __WSAsyncDBQuery(LPWSINFO pwsi, HWND32 hWnd, UINT32 uMsg, INT32 type, L
|
|||
/* child process */
|
||||
|
||||
close(async_ctl.ws_aop->fd[0]); /* read endpoint */
|
||||
switch( flag )
|
||||
switch( flag & WSMSG_ASYNC_RQMASK )
|
||||
{
|
||||
case WSMSG_ASYNC_HOSTBYADDR:
|
||||
case WSMSG_ASYNC_HOSTBYNAME:
|
||||
|
@ -403,9 +404,9 @@ static int _async_notify()
|
|||
kill(getppid(), SIGIO); /* simulate async I/O */
|
||||
#endif
|
||||
|
||||
#if __WS_ASYNC_DEBUG
|
||||
printf("handler - notify aop [%d, buf %d]\n", async_ctl.ilength, async_ctl.ws_aop->buflen);
|
||||
#endif
|
||||
/* was a __WS_ASYNC_DEBUG statement */
|
||||
TRACE(winsock, "handler - notify aop [%d, buf %d]\n",
|
||||
async_ctl.ilength, async_ctl.ws_aop->buflen);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -421,9 +422,9 @@ static void _async_fail()
|
|||
kill(getppid(), SIGIO); /* simulate async I/O */
|
||||
#endif
|
||||
|
||||
#if __WS_ASYNC_DEBUG
|
||||
printf("handler - failed aop [%d, buf %d]\n", async_ctl.ilength, async_ctl.ws_aop->buflen);
|
||||
#endif
|
||||
/* was a __WS_ASYNC_DEBUG statement */
|
||||
TRACE(winsock, "handler - failed aop [%d, buf %d]\n",
|
||||
async_ctl.ilength, async_ctl.ws_aop->buflen);
|
||||
}
|
||||
|
||||
void dump_ws_hostent_offset(struct ws_hostent* wshe)
|
||||
|
@ -432,16 +433,16 @@ void dump_ws_hostent_offset(struct ws_hostent* wshe)
|
|||
char* base = (char*)wshe;
|
||||
unsigned* ptr;
|
||||
|
||||
printf("h_name = %08x\t[%s]\n", (unsigned)wshe->h_name, base + (unsigned)wshe->h_name);
|
||||
printf("h_aliases = %08x\t[%08x]\n", (unsigned)wshe->h_aliases,
|
||||
(unsigned)(base + (unsigned)wshe->h_aliases));
|
||||
DUMP("h_name = %08x\t[%s]\n",
|
||||
(unsigned)wshe->h_name, base + (unsigned)wshe->h_name);
|
||||
DUMP("h_aliases = %08x\t[%08x]\n",
|
||||
(unsigned)wshe->h_aliases, (unsigned)(base+(unsigned)wshe->h_aliases));
|
||||
ptr = (unsigned*)(base + (unsigned)wshe->h_aliases);
|
||||
for(i = 0; ptr[i]; i++ )
|
||||
{
|
||||
printf("%i - %08x ", i + 1, ptr[i]);
|
||||
printf(" [%s]\n", ((char*)base) + ptr[i]);
|
||||
DUMP("%i - %08x [%s]\n", i + 1, ptr[i], ((char*)base) + ptr[i]);
|
||||
}
|
||||
printf("h_length = %i\n", wshe->h_length);
|
||||
DUMP("h_length = %i\n", wshe->h_length);
|
||||
}
|
||||
|
||||
void WS_do_async_gethost(LPWSINFO pwsi, unsigned flag )
|
||||
|
@ -460,7 +461,7 @@ void WS_do_async_gethost(LPWSINFO pwsi, unsigned flag )
|
|||
|
||||
if( p_he ) /* convert to the Winsock format with internal pointers as offsets */
|
||||
size = WS_dup_he(pwsi, p_he, WS_DUP_OFFSET |
|
||||
((flag & WSMSG_ASYNC_WIN32) ? WS_DUP_LINEAR : WS_DUP_SEGPTR) );
|
||||
((flag & WSMSG_WIN32_AOP) ? WS_DUP_LINEAR : WS_DUP_SEGPTR) );
|
||||
if( size )
|
||||
{
|
||||
async_ctl.buffer = pwsi->buffer;
|
||||
|
@ -484,7 +485,7 @@ void WS_do_async_getproto(LPWSINFO pwsi, unsigned flag )
|
|||
|
||||
if( p_pe ) /* convert to the Winsock format with internal pointers as offsets */
|
||||
size = WS_dup_pe(pwsi, p_pe, WS_DUP_OFFSET |
|
||||
((flag & WSMSG_ASYNC_WIN32) ? WS_DUP_LINEAR : WS_DUP_SEGPTR) );
|
||||
((flag & WSMSG_WIN32_AOP) ? WS_DUP_LINEAR : WS_DUP_SEGPTR) );
|
||||
if( size )
|
||||
{
|
||||
async_ctl.buffer = pwsi->buffer;
|
||||
|
@ -506,7 +507,7 @@ void WS_do_async_getserv(LPWSINFO pwsi, unsigned flag )
|
|||
|
||||
if( p_se ) /* convert to the Winsock format with internal pointers as offsets */
|
||||
size = WS_dup_se(pwsi, p_se, WS_DUP_OFFSET |
|
||||
((flag & WSMSG_ASYNC_WIN32) ? WS_DUP_LINEAR : WS_DUP_SEGPTR) );
|
||||
((flag & WSMSG_WIN32_AOP) ? WS_DUP_LINEAR : WS_DUP_SEGPTR) );
|
||||
if( size )
|
||||
{
|
||||
async_ctl.buffer = pwsi->buffer;
|
||||
|
@ -518,14 +519,14 @@ void WS_do_async_getserv(LPWSINFO pwsi, unsigned flag )
|
|||
|
||||
/* ----------------------------------- helper functions -
|
||||
*
|
||||
* Raw results from pipe contain internal pointers stored as
|
||||
* Raw results from the pipe contain internal pointers stored as
|
||||
* offsets relative to the beginning of the buffer and we need
|
||||
* to apply a fixup before passing them to applications.
|
||||
*
|
||||
* NOTE: It is possible to exploit the fact that fork() doesn't
|
||||
* change the buffer address by storing fixed up pointers right
|
||||
* in the handler. However, this will get in the way if we ever
|
||||
* get around to implementing DNS helper daemon a-la Netscape.
|
||||
* get around to implementing DNS helper daemon a-la Netscape 4.x.
|
||||
*/
|
||||
|
||||
void fixup_wshe(struct ws_hostent* p_wshe, void* base)
|
||||
|
|
57
msdos/dpmi.c
57
msdos/dpmi.c
|
@ -213,14 +213,12 @@ static void INT_DoRealModeInt( CONTEXT *context )
|
|||
}
|
||||
|
||||
if (EFL_reg(context)&1)
|
||||
fprintf(stdnimp,
|
||||
"RealModeInt %02x: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||
" ESI=%08lx EDI=%08lx DS=%04lx ES=%04lx\n",
|
||||
BL_reg(context), EAX_reg(&realmode_ctx),
|
||||
EBX_reg(&realmode_ctx), ECX_reg(&realmode_ctx),
|
||||
EDX_reg(&realmode_ctx), ESI_reg(&realmode_ctx),
|
||||
EDI_reg(&realmode_ctx), DS_reg(&realmode_ctx),
|
||||
ES_reg(&realmode_ctx) );
|
||||
FIXME(int31,"%02x: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n",
|
||||
BL_reg(context), EAX_reg(&realmode_ctx), EBX_reg(&realmode_ctx),
|
||||
ECX_reg(&realmode_ctx), EDX_reg(&realmode_ctx));
|
||||
FIXME(int31," ESI=%08lx EDI=%08lx DS=%04lx ES=%04lx\n",
|
||||
ESI_reg(&realmode_ctx), EDI_reg(&realmode_ctx),
|
||||
DS_reg(&realmode_ctx), ES_reg(&realmode_ctx) );
|
||||
INT_SetRealModeContext( call, &realmode_ctx );
|
||||
}
|
||||
|
||||
|
@ -359,17 +357,12 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
|||
SET_CFLAG(context);
|
||||
break;
|
||||
case 0x0200: /* get real mode interrupt vector */
|
||||
fprintf(stdnimp,
|
||||
"int31: get realmode interupt vector(0x%02x) unimplemented.\n",
|
||||
BL_reg(context)
|
||||
);
|
||||
FIXME(int31,"get realmode interupt vector(0x%02x) unimplemented.\n",
|
||||
BL_reg(context));
|
||||
SET_CFLAG(context);
|
||||
break;
|
||||
case 0x0201: /* set real mode interrupt vector */
|
||||
fprintf(stdnimp,
|
||||
"int31: set realmode interupt vector(0x%02x,0x%04x:0x%04x) unimplemented\n",
|
||||
BL_reg(context),CX_reg(context),DX_reg(context)
|
||||
);
|
||||
FIXME(int31, "set realmode interupt vector(0x%02x,0x%04x:0x%04x) unimplemented\n", BL_reg(context),CX_reg(context),DX_reg(context));
|
||||
SET_CFLAG(context);
|
||||
break;
|
||||
case 0x0204: /* Get protected mode interrupt vector */
|
||||
|
@ -391,11 +384,10 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
|||
case 0x0301: /* Call real mode procedure with far return */
|
||||
{
|
||||
REALMODECALL *p = (REALMODECALL *)PTR_SEG_OFF_TO_LIN( ES_reg(context), DI_reg(context) );
|
||||
fprintf(stdnimp,
|
||||
"RealModeCall: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||
" ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n",
|
||||
p->eax, p->ebx, p->ecx, p->edx,
|
||||
p->esi, p->edi, p->es, p->ds, p->cs, p->ip );
|
||||
FIXME(int31, "RealModeCall: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n",
|
||||
p->eax, p->ebx, p->ecx, p->edx);
|
||||
FIXME(int31, " ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n",
|
||||
p->esi, p->edi, p->es, p->ds, p->cs, p->ip );
|
||||
SET_CFLAG(context);
|
||||
}
|
||||
break;
|
||||
|
@ -403,11 +395,8 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
|||
case 0x0302: /* Call real mode procedure with interrupt return */
|
||||
{
|
||||
REALMODECALL *p = (REALMODECALL *)PTR_SEG_OFF_TO_LIN( ES_reg(context), DI_reg(context) );
|
||||
fprintf(stdnimp,
|
||||
"RealModeCallIret: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||
" ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n",
|
||||
p->eax, p->ebx, p->ecx, p->edx,
|
||||
p->esi, p->edi, p->es, p->ds, p->cs, p->ip );
|
||||
FIXME(int31, "RealModeCallIret: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n", p->eax, p->ebx, p->ecx, p->edx);
|
||||
FIXME(int31, " ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n", p->esi, p->edi, p->es, p->ds, p->cs, p->ip );
|
||||
SET_CFLAG(context);
|
||||
}
|
||||
break;
|
||||
|
@ -415,22 +404,18 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
|||
case 0x0303: /* Allocate Real Mode Callback Address */
|
||||
{
|
||||
REALMODECALL *p = (REALMODECALL *)PTR_SEG_OFF_TO_LIN( ES_reg(context), DI_reg(context) );
|
||||
fprintf(stdnimp,
|
||||
"AllocRMCB: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||
" ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n"
|
||||
" Function to call: %04x:%04x\n",
|
||||
p->eax, p->ebx, p->ecx, p->edx,
|
||||
p->esi, p->edi, p->es, p->ds, p->cs, p->ip,
|
||||
(WORD)DS_reg(context), SI_reg(context) );
|
||||
FIXME(int31, "AllocRMCB: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n", p->eax, p->ebx, p->ecx, p->edx);
|
||||
FIXME(int31, " ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n", p->esi, p->edi, p->es, p->ds, p->cs, p->ip);
|
||||
FIXME(int31, " Function to call: %04x:%04x\n",
|
||||
(WORD)DS_reg(context), SI_reg(context) );
|
||||
SET_CFLAG(context);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0304: /* Free Real Mode Callback Address */
|
||||
{
|
||||
fprintf(stdnimp,
|
||||
"FreeRMCB: callback address: %04x:%04x\n",
|
||||
CX_reg(context), DX_reg(context));
|
||||
FIXME(int31, "FreeRMCB: callback address: %04x:%04x\n",
|
||||
CX_reg(context), DX_reg(context));
|
||||
SET_CFLAG(context);
|
||||
}
|
||||
break;
|
||||
|
|
226
msdos/int21.c
226
msdos/int21.c
|
@ -209,7 +209,8 @@ static void ioctlGetDeviceInfo( CONTEXT *context )
|
|||
TRACE(int21, "(%d)\n", BX_reg(context));
|
||||
|
||||
curr_drive = DRIVE_GetCurrentDrive();
|
||||
DX_reg(context) = 0x0140 + curr_drive + ((curr_drive > 1) ? 0x0800 : 0); /* no floppy */
|
||||
DX_reg(context) = 0x0140 + curr_drive + ((curr_drive > 1) ? 0x0800 : 0);
|
||||
/* no floppy */
|
||||
/* bits 0-5 are current drive
|
||||
* bit 6 - file has NOT been written..FIXME: correct?
|
||||
* bit 8 - generate int24 if no diskspace on write/ read past end of file
|
||||
|
@ -305,6 +306,22 @@ static void INT21_GetSystemTime( CONTEXT *context )
|
|||
DX_reg(context) = (systime.wSecond << 8) | (systime.wMilliseconds / 10);
|
||||
}
|
||||
|
||||
/* Many calls translate a drive argument like this:
|
||||
drive number (00h = default, 01h = A:, etc)
|
||||
*/
|
||||
static char drivestring[]="default";
|
||||
|
||||
char *INT21_DriveName(int drive)
|
||||
{
|
||||
|
||||
if(drive >0)
|
||||
{
|
||||
drivestring[0]= (unsigned char)drive + '@';
|
||||
drivestring[1]=':';
|
||||
drivestring[2]=0;
|
||||
}
|
||||
return drivestring;
|
||||
}
|
||||
static BOOL32 INT21_CreateFile( CONTEXT *context )
|
||||
{
|
||||
AX_reg(context) = _lcreat16( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
|
@ -356,7 +373,7 @@ static void OpenExistingFile( CONTEXT *context )
|
|||
int result,retries=sharing_retries;
|
||||
{
|
||||
#if defined(__svr4__) || defined(_SCO_DS)
|
||||
printf("Should call flock and needs porting to lockf\n");
|
||||
ERR(int21, "Should call flock and needs porting to lockf\n");
|
||||
result = 0;
|
||||
retries = 0;
|
||||
#else
|
||||
|
@ -760,12 +777,12 @@ static int INT21_FindNextFCB( CONTEXT *context )
|
|||
|
||||
static void DeleteFileFCB( CONTEXT *context )
|
||||
{
|
||||
fprintf( stderr, "DeleteFileFCB: not implemented yet\n" );
|
||||
FIXME(int21, "(%p): not implemented yet\n", context);
|
||||
}
|
||||
|
||||
static void RenameFileFCB( CONTEXT *context )
|
||||
{
|
||||
fprintf( stderr, "RenameFileFCB: not implemented yet\n" );
|
||||
FIXME(int21, "(%p): not implemented yet\n", context);
|
||||
}
|
||||
|
||||
|
||||
|
@ -776,6 +793,10 @@ static void fLock( CONTEXT * context )
|
|||
switch ( AX_reg(context) & 0xff )
|
||||
{
|
||||
case 0x00: /* LOCK */
|
||||
TRACE(int21,"lock handle %d offset %ld length %ld\n",
|
||||
BX_reg(context),
|
||||
MAKELONG(DX_reg(context),CX_reg(context)),
|
||||
MAKELONG(DI_reg(context),SI_reg(context))) ;
|
||||
if (!LockFile(BX_reg(context),
|
||||
MAKELONG(DX_reg(context),CX_reg(context)), 0,
|
||||
MAKELONG(DI_reg(context),SI_reg(context)), 0)) {
|
||||
|
@ -785,6 +806,10 @@ static void fLock( CONTEXT * context )
|
|||
break;
|
||||
|
||||
case 0x01: /* UNLOCK */
|
||||
TRACE(int21,"unlock handle %d offset %ld length %ld\n",
|
||||
BX_reg(context),
|
||||
MAKELONG(DX_reg(context),CX_reg(context)),
|
||||
MAKELONG(DI_reg(context),SI_reg(context))) ;
|
||||
if (!UnlockFile(BX_reg(context),
|
||||
MAKELONG(DX_reg(context),CX_reg(context)), 0,
|
||||
MAKELONG(DI_reg(context),SI_reg(context)), 0)) {
|
||||
|
@ -866,15 +891,17 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
{
|
||||
BOOL32 bSetDOSExtendedError = FALSE;
|
||||
|
||||
TRACE(int21, "AX=%04x BX=%04x CX=%04x DX=%04x "
|
||||
/* TRACE(int21, "AX=%04x BX=%04x CX=%04x DX=%04x "
|
||||
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08lx\n",
|
||||
AX_reg(context), BX_reg(context), CX_reg(context),
|
||||
DX_reg(context), SI_reg(context), DI_reg(context),
|
||||
(WORD)DS_reg(context), (WORD)ES_reg(context),
|
||||
EFL_reg(context) );
|
||||
|
||||
*/
|
||||
if (AH_reg(context) == 0x59) /* Get extended error info */
|
||||
{
|
||||
TRACE(int21, "GET EXTENDED ERROR code 0x%02x class 0x%02x action 0x%02x locus %02x\n",
|
||||
DOS_ExtendedError, DOS_ErrorClass, DOS_ErrorAction, DOS_ErrorLocus);
|
||||
AX_reg(context) = DOS_ExtendedError;
|
||||
BH_reg(context) = DOS_ErrorClass;
|
||||
BL_reg(context) = DOS_ErrorAction;
|
||||
|
@ -888,6 +915,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch(AH_reg(context))
|
||||
{
|
||||
case 0x00: /* TERMINATE PROGRAM */
|
||||
TRACE(int21,"TERMINATE PROGRAM\n");
|
||||
TASK_KillCurrentTask( 0 );
|
||||
break;
|
||||
|
||||
|
@ -920,9 +948,13 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
"SWITCHAR" - SET SWITCH CHARACTER
|
||||
"AVAILDEV" - SPECIFY \DEV\ PREFIX USE */
|
||||
case 0x54: /* GET VERIFY FLAG */
|
||||
case 0x48: /* ALLOCATE MEMORY */
|
||||
case 0x49: /* FREE MEMORY */
|
||||
case 0x4a: /* RESIZE MEMORY BLOCK */
|
||||
INT_BARF( context, 0x21 );
|
||||
break;
|
||||
case 0x2e: /* SET VERIFY FLAG */
|
||||
TRACE(int21,"SET VERIFY FLAG ignored\n");
|
||||
/* we cannot change the behaviour anyway, so just ignore it */
|
||||
break;
|
||||
|
||||
|
@ -939,15 +971,19 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x0d: /* DISK BUFFER FLUSH */
|
||||
TRACE(int21,"DISK BUFFER FLUSH ignored\n");
|
||||
RESET_CFLAG(context); /* dos 6+ only */
|
||||
break;
|
||||
|
||||
case 0x0e: /* SELECT DEFAULT DRIVE */
|
||||
TRACE(int21,"SELECT DEFAULT DRIVE %d\n", DL_reg(context));
|
||||
DRIVE_SetCurrentDrive( DL_reg(context) );
|
||||
AL_reg(context) = MAX_DOS_DRIVES;
|
||||
break;
|
||||
|
||||
case 0x11: /* FIND FIRST MATCHING FILE USING FCB */
|
||||
TRACE(int21,"FIND FIRST MATCHING FILE USING FCB %p\n",
|
||||
PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context)));
|
||||
if (!INT21_FindFirstFCB(context))
|
||||
{
|
||||
AL_reg(context) = 0xff;
|
||||
|
@ -1003,8 +1039,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x2b: /* SET SYSTEM DATE */
|
||||
fprintf( stdnimp, "SetSystemDate(%02d/%02d/%04d): not allowed\n",
|
||||
DL_reg(context), DH_reg(context), CX_reg(context) );
|
||||
FIXME(int21, "SetSystemDate(%02d/%02d/%04d): not allowed\n",
|
||||
DL_reg(context), DH_reg(context), CX_reg(context) );
|
||||
AL_reg(context) = 0; /* Let's pretend we succeeded */
|
||||
break;
|
||||
|
||||
|
@ -1013,13 +1049,14 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x2d: /* SET SYSTEM TIME */
|
||||
fprintf( stdnimp, "SetSystemTime(%02d:%02d:%02d.%02d): not allowed\n",
|
||||
CH_reg(context), CL_reg(context),
|
||||
DH_reg(context), DL_reg(context) );
|
||||
FIXME(int21, "SetSystemTime(%02d:%02d:%02d.%02d): not allowed\n",
|
||||
CH_reg(context), CL_reg(context),
|
||||
DH_reg(context), DL_reg(context) );
|
||||
AL_reg(context) = 0; /* Let's pretend we succeeded */
|
||||
break;
|
||||
|
||||
case 0x2f: /* GET DISK TRANSFER AREA ADDRESS */
|
||||
TRACE(int21,"GET DISK TRANSFER AREA ADDRESS\n");
|
||||
{
|
||||
TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() );
|
||||
ES_reg(context) = SELECTOROF( pTask->dta );
|
||||
|
@ -1028,6 +1065,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x30: /* GET DOS VERSION */
|
||||
TRACE(int21,"GET DOS VERSION %s requested\n",
|
||||
(AL_reg(context) == 0x00)?"OEM number":"version flag");
|
||||
AX_reg(context) = (HIWORD(GetVersion16()) >> 8) |
|
||||
(HIWORD(GetVersion16()) << 8);
|
||||
BX_reg(context) = 0x0012; /* 0x123456 is Wine's serial # */
|
||||
|
@ -1035,10 +1074,13 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x31: /* TERMINATE AND STAY RESIDENT */
|
||||
TRACE(int21,"TERMINATE AND STAY RESIDENT stub\n");
|
||||
INT_BARF( context, 0x21 );
|
||||
break;
|
||||
|
||||
case 0x32: /* GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE */
|
||||
TRACE(int21,"GET DOS DRIVE PARAMETER BLOCK FOR DRIVE %s\n",
|
||||
INT21_DriveName( DL_reg(context)));
|
||||
GetDrivePB(context, DOS_GET_DRIVE( DL_reg(context) ) );
|
||||
break;
|
||||
|
||||
|
@ -1046,22 +1088,27 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch (AL_reg(context))
|
||||
{
|
||||
case 0x00: /* GET CURRENT EXTENDED BREAK STATE */
|
||||
TRACE(int21,"GET CURRENT EXTENDED BREAK STATE stub\n");
|
||||
DL_reg(context) = 0;
|
||||
break;
|
||||
|
||||
case 0x01: /* SET EXTENDED BREAK STATE */
|
||||
TRACE(int21,"SET CURRENT EXTENDED BREAK STATE stub\n");
|
||||
break;
|
||||
|
||||
case 0x02: /* GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE*/
|
||||
TRACE(int21,"GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE stub\n");
|
||||
DL_reg(context) = 0;
|
||||
break;
|
||||
|
||||
case 0x05: /* GET BOOT DRIVE */
|
||||
TRACE(int21,"GET BOOT DRIVE\n");
|
||||
DL_reg(context) = 3;
|
||||
/* c: is Wine's bootdrive (a: is 1)*/
|
||||
break;
|
||||
|
||||
case 0x06: /* GET TRUE VERSION NUMBER */
|
||||
TRACE(int21,"GET TRUE VERSION NUMBER\n");
|
||||
BX_reg(context) = (HIWORD(GetVersion16() >> 8)) |
|
||||
(HIWORD(GetVersion16() << 8));
|
||||
DX_reg(context) = 0x00;
|
||||
|
@ -1074,12 +1121,14 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x34: /* GET ADDRESS OF INDOS FLAG */
|
||||
TRACE(int21,"GET ADDRESS OF INDOS FLAG\n");
|
||||
if (!heap) INT21_CreateHeap();
|
||||
ES_reg(context) = DosHeapHandle;
|
||||
BX_reg(context) = (int)&heap->InDosFlag - (int)heap;
|
||||
break;
|
||||
|
||||
case 0x35: /* GET INTERRUPT VECTOR */
|
||||
TRACE(int21,"GET INTERRUPT VECTOR 0x%02x\n",AL_reg(context));
|
||||
{
|
||||
FARPROC16 addr = INT_GetHandler( AL_reg(context) );
|
||||
ES_reg(context) = SELECTOROF(addr);
|
||||
|
@ -1088,43 +1137,60 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x36: /* GET FREE DISK SPACE */
|
||||
TRACE(int21,"GET FREE DISK SPACE FOR DRIVE %s\n",
|
||||
INT21_DriveName( DL_reg(context)));
|
||||
if (!INT21_GetFreeDiskSpace(context)) AX_reg(context) = 0xffff;
|
||||
break;
|
||||
|
||||
case 0x38: /* GET COUNTRY-SPECIFIC INFORMATION */
|
||||
TRACE(int21,"GET COUNTRY-SPECIFIC INFORMATION for country 0x%02x\n",
|
||||
AL_reg(context));
|
||||
AX_reg(context) = 0x02; /* no country support available */
|
||||
SET_CFLAG(context);
|
||||
break;
|
||||
|
||||
case 0x39: /* "MKDIR" - CREATE SUBDIRECTORY */
|
||||
TRACE(int21,"MKDIR %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
bSetDOSExtendedError = (!CreateDirectory16( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) ), NULL));
|
||||
break;
|
||||
|
||||
case 0x3a: /* "RMDIR" - REMOVE SUBDIRECTORY */
|
||||
TRACE(int21,"RMDIR %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
bSetDOSExtendedError = (!RemoveDirectory16( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) )));
|
||||
break;
|
||||
|
||||
case 0x3b: /* "CHDIR" - SET CURRENT DIRECTORY */
|
||||
TRACE(int21,"CHDIR %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
bSetDOSExtendedError = !INT21_ChangeDir(context);
|
||||
break;
|
||||
|
||||
case 0x3c: /* "CREAT" - CREATE OR TRUNCATE FILE */
|
||||
TRACE(int21,"CREAT flag 0x%02x %s\n",CX_reg(context),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
AX_reg(context) = _lcreat16( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) ), CX_reg(context) );
|
||||
bSetDOSExtendedError = (AX_reg(context) == (WORD)HFILE_ERROR16);
|
||||
break;
|
||||
|
||||
case 0x3d: /* "OPEN" - OPEN EXISTING FILE */
|
||||
TRACE(int21,"OPEN mode 0x%02x %s\n",AL_reg(context),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
OpenExistingFile(context);
|
||||
break;
|
||||
|
||||
case 0x3e: /* "CLOSE" - CLOSE FILE */
|
||||
TRACE(int21,"CLOSE handle %d\n",BX_reg(context));
|
||||
bSetDOSExtendedError = ((AX_reg(context) = _lclose16( BX_reg(context) )) != 0);
|
||||
break;
|
||||
|
||||
case 0x3f: /* "READ" - READ FROM FILE OR DEVICE */
|
||||
TRACE(int21,"READ from %d to %ld for %d byte\n",BX_reg(context),
|
||||
PTR_SEG_OFF_TO_SEGPTR( DS_reg(context),DX_reg(context)),CX_reg(context) );
|
||||
{
|
||||
LONG result = WIN16_hread( BX_reg(context),
|
||||
PTR_SEG_OFF_TO_SEGPTR( DS_reg(context),
|
||||
|
@ -1136,6 +1202,9 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x40: /* "WRITE" - WRITE TO FILE OR DEVICE */
|
||||
TRACE(int21,"WRITE from %ld to handle %d for %d byte\n",
|
||||
PTR_SEG_OFF_TO_SEGPTR( DS_reg(context),DX_reg(context)),
|
||||
BX_reg(context),CX_reg(context) );
|
||||
{
|
||||
LONG result = _hwrite16( BX_reg(context),
|
||||
PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
|
@ -1147,11 +1216,17 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x41: /* "UNLINK" - DELETE FILE */
|
||||
TRACE(int21,"UNLINK%s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
bSetDOSExtendedError = (!DeleteFile32A( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) )));
|
||||
break;
|
||||
|
||||
case 0x42: /* "LSEEK" - SET CURRENT FILE POSITION */
|
||||
TRACE(int21,"LSEEK handle %d offset %ld from %s\n",
|
||||
BX_reg(context), MAKELONG(DX_reg(context),CX_reg(context)),
|
||||
(AL_reg(context)==0)?"start of file":(AL_reg(context)==1)?
|
||||
"current file position":"end of file");
|
||||
{
|
||||
LONG status = _llseek16( BX_reg(context),
|
||||
MAKELONG(DX_reg(context),CX_reg(context)),
|
||||
|
@ -1169,6 +1244,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch (AL_reg(context))
|
||||
{
|
||||
case 0x00:
|
||||
TRACE(int21,"GET FILE ATTRIBUTES for %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
AX_reg(context) = (WORD)GetFileAttributes32A(
|
||||
PTR_SEG_OFF_TO_LIN(DS_reg(context),
|
||||
DX_reg(context)));
|
||||
|
@ -1177,11 +1254,16 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x01:
|
||||
TRACE(int21,"SET FILE ATTRIBUTES 0x%02x for %s\n", CX_reg(context),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
bSetDOSExtendedError =
|
||||
(!SetFileAttributes32A( PTR_SEG_OFF_TO_LIN(DS_reg(context),
|
||||
DX_reg(context)),
|
||||
CX_reg(context) ));
|
||||
break;
|
||||
case 0x02:
|
||||
TRACE(int21,"GET COMPRESSED FILE SIZE for %s stub\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1196,17 +1278,18 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
case 0x05:{ /* IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL */
|
||||
BYTE *dataptr = PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context));
|
||||
int i;
|
||||
int drive = DOS_GET_DRIVE(BL_reg(context));
|
||||
|
||||
fprintf(stdnimp,"program tried to write to block device control channel of drive %d:\n",drive);
|
||||
for (i=0;i<CX_reg(context);i++)
|
||||
FIXME(int21,"program tried to write to block device control channel of drive %d:\n",drive);
|
||||
/* for (i=0;i<CX_reg(context);i++)
|
||||
fprintf(stdnimp,"%02x ",dataptr[i]);
|
||||
fprintf(stdnimp,"\n");
|
||||
fprintf(stdnimp,"\n");*/
|
||||
AX_reg(context)=CX_reg(context);
|
||||
break;
|
||||
}
|
||||
case 0x08: /* Check if drive is removable. */
|
||||
TRACE(int21,"IOCTL - CHECK IF BLOCK DEVICE REMOVABLE for drive %s\n",
|
||||
INT21_DriveName( BL_reg(context)));
|
||||
switch(GetDriveType16( DOS_GET_DRIVE( BL_reg(context) )))
|
||||
{
|
||||
case DRIVE_CANNOTDETERMINE:
|
||||
|
@ -1224,6 +1307,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x09: /* CHECK IF BLOCK DEVICE REMOTE */
|
||||
TRACE(int21,"IOCTL - CHECK IF BLOCK DEVICE REMOTE for drive %s\n",
|
||||
INT21_DriveName( BL_reg(context)));
|
||||
switch(GetDriveType16( DOS_GET_DRIVE( BL_reg(context) )))
|
||||
{
|
||||
case DRIVE_CANNOTDETERMINE:
|
||||
|
@ -1241,6 +1326,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x0a: /* check if handle (BX) is remote */
|
||||
TRACE(int21,"IOCTL - CHECK IF HANDLE %d IS REMOTE\n",BX_reg(context));
|
||||
/* returns DX, bit 15 set if remote, bit 14 set if date/time
|
||||
* not set on close
|
||||
*/
|
||||
|
@ -1248,6 +1334,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x0b: /* SET SHARING RETRY COUNT */
|
||||
TRACE(int21,"IOCTL - SET SHARING RETRY COUNT pause %d retries %d\n",
|
||||
CX_reg(context), DX_reg(context));
|
||||
if (!CX_reg(context))
|
||||
{
|
||||
AX_reg(context) = 1;
|
||||
|
@ -1261,16 +1349,22 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x0d:
|
||||
TRACE(int21,"IOCTL - GENERIC BLOCK DEVICE REQUEST %s\n",
|
||||
INT21_DriveName( BL_reg(context)));
|
||||
bSetDOSExtendedError = ioctlGenericBlkDevReq(context);
|
||||
break;
|
||||
|
||||
case 0x0e: /* get logical drive mapping */
|
||||
TRACE(int21,"IOCTL - GET LOGICAL DRIVE MAP for drive %s\n",
|
||||
INT21_DriveName( BL_reg(context)));
|
||||
AL_reg(context) = 0; /* drive has no mapping - FIXME: may be wrong*/
|
||||
break;
|
||||
|
||||
case 0x0F: /* Set logical drive mapping */
|
||||
{
|
||||
int drive;
|
||||
TRACE(int21,"IOCTL - SET LOGICAL DRIVE MAP for drive %s\n",
|
||||
INT21_DriveName( BL_reg(context)));
|
||||
drive = DOS_GET_DRIVE ( BL_reg(context) );
|
||||
if ( ! DRIVE_SetLogicalMapping ( drive, drive+1 ) )
|
||||
{
|
||||
|
@ -1287,24 +1381,25 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x45: /* "DUP" - DUPLICATE FILE HANDLE */
|
||||
TRACE(int21,"DUP - DUPLICATE FILE HANDLE %d\n",BX_reg(context));
|
||||
bSetDOSExtendedError = ((AX_reg(context) = FILE_Dup(BX_reg(context))) == (WORD)HFILE_ERROR16);
|
||||
break;
|
||||
|
||||
case 0x46: /* "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE */
|
||||
TRACE(int21,"FORCEDUP - FORCE DUPLICATE FILE HANDLE %d to %d\n",
|
||||
BX_reg(context),CX_reg(context));
|
||||
bSetDOSExtendedError = (FILE_Dup2( BX_reg(context), CX_reg(context) ) == HFILE_ERROR32);
|
||||
break;
|
||||
|
||||
case 0x47: /* "CWD" - GET CURRENT DIRECTORY */
|
||||
TRACE(int21,"CWD - GET CURRENT DIRECTORY for drive %s\n",
|
||||
INT21_DriveName( DL_reg(context)));
|
||||
bSetDOSExtendedError = !INT21_GetCurrentDirectory(context);
|
||||
break;
|
||||
|
||||
case 0x48: /* ALLOCATE MEMORY */
|
||||
case 0x49: /* FREE MEMORY */
|
||||
case 0x4a: /* RESIZE MEMORY BLOCK */
|
||||
INT_BARF( context, 0x21 );
|
||||
break;
|
||||
|
||||
case 0x4b: /* "EXEC" - LOAD AND/OR EXECUTE PROGRAM */
|
||||
TRACE(int21,"EXEC %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context),DX_reg(context) ));
|
||||
AX_reg(context) = WinExec16( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) ),
|
||||
SW_NORMAL );
|
||||
|
@ -1312,18 +1407,23 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x4c: /* "EXIT" - TERMINATE WITH RETURN CODE */
|
||||
TRACE(int21,"EXIT with return code %d\n",AL_reg(context));
|
||||
TASK_KillCurrentTask( AL_reg(context) );
|
||||
break;
|
||||
|
||||
case 0x4d: /* GET RETURN CODE */
|
||||
TRACE(int21,"GET RETURN CODE (ERRORLEVEL)\n");
|
||||
AX_reg(context) = 0; /* normal exit */
|
||||
break;
|
||||
|
||||
case 0x4e: /* "FINDFIRST" - FIND FIRST MATCHING FILE */
|
||||
TRACE(int21,"FINDFIRST mask 0x%04x spec %s\n",CX_reg(context),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
if (!INT21_FindFirst(context)) break;
|
||||
/* fall through */
|
||||
|
||||
case 0x4f: /* "FINDNEXT" - FIND NEXT MATCHING FILE */
|
||||
TRACE(int21,"FINDNEXT\n");
|
||||
if (!INT21_FindNext(context))
|
||||
{
|
||||
DOS_ERROR( ER_NoMoreFiles, EC_MediaError, SA_Abort, EL_Disk );
|
||||
|
@ -1334,13 +1434,20 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x51: /* GET PSP ADDRESS */
|
||||
TRACE(int21,"GET CURRENT PROCESS ID (GET PSP ADDRESS)\n");
|
||||
/* FIXME: should we return the original DOS PSP upon */
|
||||
/* Windows startup ? */
|
||||
BX_reg(context) = GetCurrentPDB();
|
||||
break;
|
||||
case 0x62: /* GET PSP ADDRESS */
|
||||
TRACE(int21,"GET CURRENT PSP ADDRESS\n");
|
||||
/* FIXME: should we return the original DOS PSP upon */
|
||||
/* Windows startup ? */
|
||||
BX_reg(context) = GetCurrentPDB();
|
||||
break;
|
||||
|
||||
case 0x52: /* "SYSVARS" - GET LIST OF LISTS */
|
||||
TRACE(int21,"SYSVARS - GET LIST OF LISTS\n");
|
||||
{
|
||||
SEGPTR lol;
|
||||
lol = INT21_GetListOfLists();
|
||||
|
@ -1350,6 +1457,9 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x56: /* "RENAME" - RENAME FILE */
|
||||
TRACE(int21,"RENAME %s to %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context)),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN(ES_reg(context),DI_reg(context)));
|
||||
bSetDOSExtendedError =
|
||||
(!MoveFile32A( PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context)),
|
||||
PTR_SEG_OFF_TO_LIN(ES_reg(context),DI_reg(context))));
|
||||
|
@ -1361,6 +1471,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
case 0x00: /* Get */
|
||||
{
|
||||
FILETIME filetime;
|
||||
TRACE(int21,"GET FILE DATE AND TIME for handle %d\n",
|
||||
BX_reg(context));
|
||||
if (!GetFileTime( BX_reg(context), NULL, NULL, &filetime ))
|
||||
bSetDOSExtendedError = TRUE;
|
||||
else FileTimeToDosDateTime( &filetime, &DX_reg(context),
|
||||
|
@ -1371,6 +1483,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
case 0x01: /* Set */
|
||||
{
|
||||
FILETIME filetime;
|
||||
TRACE(int21,"SET FILE DATE AND TIME for handle %d\n",
|
||||
BX_reg(context));
|
||||
DosDateTimeToFileTime( DX_reg(context), CX_reg(context),
|
||||
&filetime );
|
||||
bSetDOSExtendedError =
|
||||
|
@ -1381,6 +1495,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x58: /* GET OR SET MEMORY/UMB ALLOCATION STRATEGY */
|
||||
TRACE(int21,"GET OR SET MEMORY/UMB ALLOCATION STRATEGY subfunction %d\n",
|
||||
AL_reg(context));
|
||||
switch (AL_reg(context))
|
||||
{
|
||||
case 0x00:
|
||||
|
@ -1397,10 +1513,13 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x5a: /* CREATE TEMPORARY FILE */
|
||||
TRACE(int21,"CREATE TEMPORARY FILE\n");
|
||||
bSetDOSExtendedError = !INT21_CreateTempFile(context);
|
||||
break;
|
||||
|
||||
case 0x5b: /* CREATE NEW FILE */
|
||||
TRACE(int21,"CREATE NEW FILE 0x%02x for %s\n", CX_reg(context),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
bSetDOSExtendedError = ((AX_reg(context) =
|
||||
_lcreat_uniq( PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context)), 0 ))
|
||||
== (WORD)HFILE_ERROR16);
|
||||
|
@ -1408,6 +1527,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
|
||||
case 0x5d: /* NETWORK */
|
||||
case 0x5e:
|
||||
TRACE(int21,"Network function AX=%04x\n",AX_reg(context));
|
||||
/* network software not installed */
|
||||
DOS_ERROR( ER_NoNetwork, EC_NotFound, SA_Abort, EL_Network );
|
||||
bSetDOSExtendedError = TRUE;
|
||||
|
@ -1417,6 +1537,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch (AL_reg(context))
|
||||
{
|
||||
case 0x07: /* ENABLE DRIVE */
|
||||
TRACE(int21,"ENABLE DRIVE %c:\n",(DL_reg(context)+'A'));
|
||||
if (!DRIVE_Enable( DL_reg(context) ))
|
||||
{
|
||||
DOS_ERROR( ER_InvalidDrive, EC_MediaError, SA_Abort, EL_Disk );
|
||||
|
@ -1425,6 +1546,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x08: /* DISABLE DRIVE */
|
||||
TRACE(int21,"DISABLE DRIVE %c:\n",(DL_reg(context)+'A'));
|
||||
if (!DRIVE_Disable( DL_reg(context) ))
|
||||
{
|
||||
DOS_ERROR( ER_InvalidDrive, EC_MediaError, SA_Abort, EL_Disk );
|
||||
|
@ -1434,6 +1556,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
|
||||
default:
|
||||
/* network software not installed */
|
||||
TRACE(int21,"NETWORK function AX=%04x not implemented\n",AX_reg(context));
|
||||
DOS_ERROR( ER_NoNetwork, EC_NotFound, SA_Abort, EL_Network );
|
||||
bSetDOSExtendedError = TRUE;
|
||||
break;
|
||||
|
@ -1441,6 +1564,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x60: /* "TRUENAME" - CANONICALIZE FILENAME OR PATH */
|
||||
TRACE(int21,"TRUENAME %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN(DS_reg(context),SI_reg(context)));
|
||||
{
|
||||
if (!GetFullPathName32A( PTR_SEG_OFF_TO_LIN(DS_reg(context),
|
||||
SI_reg(context)), 128,
|
||||
|
@ -1460,20 +1585,25 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
|
||||
case 0x65:{/* GET EXTENDED COUNTRY INFORMATION */
|
||||
extern WORD WINE_LanguageId;
|
||||
BYTE *dataptr=PTR_SEG_OFF_TO_LIN(ES_reg(context),DI_reg(context));;
|
||||
BYTE *dataptr=PTR_SEG_OFF_TO_LIN(ES_reg(context),DI_reg(context));
|
||||
TRACE(int21,"GET EXTENDED COUNTRY INFORMATION code page %d country %d\n",
|
||||
BX_reg(context), DX_reg(context));
|
||||
switch (AL_reg(context)) {
|
||||
case 0x01:
|
||||
TRACE(int21,"\tget general internationalization info\n");
|
||||
dataptr[0] = 0x1;
|
||||
*(WORD*)(dataptr+1) = 41;
|
||||
*(WORD*)(dataptr+3) = WINE_LanguageId;
|
||||
*(WORD*)(dataptr+5) = CodePage;
|
||||
break;
|
||||
case 0x06:
|
||||
TRACE(int21,"\tget pointer to collating sequence table\n");
|
||||
dataptr[0] = 0x06;
|
||||
*(DWORD*)(dataptr+1) = MAKELONG(DOSMEM_CollateTable & 0xFFFF,DOSMEM_AllocSelector(DOSMEM_CollateTable>>16));
|
||||
CX_reg(context) = 258;/*FIXME: size of table?*/
|
||||
break;
|
||||
default:
|
||||
TRACE(int21,"\tunimplemented function %d\n",AL_reg(context));
|
||||
INT_BARF( context, 0x21 );
|
||||
SET_CFLAG(context);
|
||||
break;
|
||||
|
@ -1484,10 +1614,13 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch (AL_reg(context))
|
||||
{
|
||||
case 0x01:
|
||||
TRACE(int21,"GET GLOBAL CODE PAGE TABLE\n");
|
||||
DX_reg(context) = BX_reg(context) = CodePage;
|
||||
RESET_CFLAG(context);
|
||||
break;
|
||||
case 0x02:
|
||||
TRACE(int21,"SET GLOBAL CODE PAGE TABLE active page %d system page %d\n",
|
||||
BX_reg(context),DX_reg(context));
|
||||
CodePage = BX_reg(context);
|
||||
RESET_CFLAG(context);
|
||||
break;
|
||||
|
@ -1495,12 +1628,14 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x67: /* SET HANDLE COUNT */
|
||||
TRACE(int21,"SET HANDLE COUNT to %d\n",BX_reg(context) );
|
||||
SetHandleCount16( BX_reg(context) );
|
||||
if (DOS_ExtendedError) bSetDOSExtendedError = TRUE;
|
||||
break;
|
||||
|
||||
case 0x68: /* "FFLUSH" - COMMIT FILE */
|
||||
case 0x6a: /* COMMIT FILE */
|
||||
TRACE(int21,"FFLUSH/COMMIT handle %d\n",BX_reg(context));
|
||||
bSetDOSExtendedError = (!FlushFileBuffers( BX_reg(context) ));
|
||||
break;
|
||||
|
||||
|
@ -1508,11 +1643,15 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch (AL_reg(context))
|
||||
{
|
||||
case 0x00:
|
||||
TRACE(int21,"GET DISK SERIAL NUMBER for drive %s\n",
|
||||
INT21_DriveName(BL_reg(context)));
|
||||
if (!INT21_GetDiskSerialNumber(context)) bSetDOSExtendedError = TRUE;
|
||||
else AX_reg(context) = 0;
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
TRACE(int21,"SET DISK SERIAL NUMBER for drive %s\n",
|
||||
INT21_DriveName(BL_reg(context)));
|
||||
if (!INT21_SetDiskSerialNumber(context)) bSetDOSExtendedError = TRUE;
|
||||
else AX_reg(context) = 1;
|
||||
break;
|
||||
|
@ -1520,6 +1659,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
break;
|
||||
|
||||
case 0x6C: /* Extended Open/Create*/
|
||||
TRACE(int21,"EXTENDED OPEN/CREATE %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DI_reg(context)));
|
||||
bSetDOSExtendedError = INT21_ExtendedOpenCreateFile(context);
|
||||
break;
|
||||
|
||||
|
@ -1527,33 +1668,40 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
switch(AL_reg(context))
|
||||
{
|
||||
case 0x39: /* Create directory */
|
||||
TRACE(int21,"LONG FILENAME - MAKE DIRECTORY %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context),DX_reg(context)));
|
||||
bSetDOSExtendedError = (!CreateDirectory32A(
|
||||
PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) ), NULL));
|
||||
break;
|
||||
case 0x3a: /* Remove directory */
|
||||
TRACE(int21,"LONG FILENAME - REMOVE DIRECTORY %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context),DX_reg(context)));
|
||||
bSetDOSExtendedError = (!RemoveDirectory32A(
|
||||
PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) )));
|
||||
break;
|
||||
case 0x43: /* Get/Set file attributes */
|
||||
TRACE(int21,"LONG FILENAME -EXTENDED GET/SET FILE ATTRIBUTES %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context),DX_reg(context)));
|
||||
switch (BL_reg(context))
|
||||
{
|
||||
case 0x00: /* Get file attributes */
|
||||
TRACE(int21,"\tretrieve attributes\n");
|
||||
CX_reg(context) = (WORD)GetFileAttributes32A(
|
||||
PTR_SEG_OFF_TO_LIN(DS_reg(context),
|
||||
DX_reg(context)));
|
||||
if (CX_reg(context) == 0xffff) bSetDOSExtendedError = TRUE;
|
||||
break;
|
||||
case 0x01:
|
||||
TRACE(int21,"\tset attributes 0x%04x\n",CX_reg(context));
|
||||
bSetDOSExtendedError = (!SetFileAttributes32A(
|
||||
PTR_SEG_OFF_TO_LIN(DS_reg(context),
|
||||
DX_reg(context)),
|
||||
CX_reg(context) ) );
|
||||
break;
|
||||
default:
|
||||
fprintf( stderr,
|
||||
"Unimplemented int21 long file name function:\n");
|
||||
FIXME(int21, "Unimplemented long file name function:\n");
|
||||
INT_BARF( context, 0x21 );
|
||||
SET_CFLAG(context);
|
||||
AL_reg(context) = 0;
|
||||
|
@ -1561,10 +1709,14 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
}
|
||||
break;
|
||||
case 0x47: /* Get current directory */
|
||||
TRACE(int21," LONG FILENAME - GET CURRENT DIRECTORY for drive %s\n",
|
||||
INT21_DriveName(DL_reg(context)));
|
||||
bSetDOSExtendedError = !INT21_GetCurrentDirectory(context);
|
||||
break;
|
||||
|
||||
case 0x4e: /* Find first file */
|
||||
TRACE(int21," LONG FILENAME - FIND FIRST MATCHING FILE for %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context)));
|
||||
/* FIXME: use attributes in CX */
|
||||
if ((AX_reg(context) = FindFirstFile16(
|
||||
PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context)),
|
||||
|
@ -1574,15 +1726,21 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
bSetDOSExtendedError = TRUE;
|
||||
break;
|
||||
case 0x4f: /* Find next file */
|
||||
TRACE(int21,"LONG FILENAME - FIND NEXT MATCHING FILE for handle %d\n",
|
||||
BX_reg(context));
|
||||
if (!FindNextFile16( BX_reg(context),
|
||||
(WIN32_FIND_DATA32A *)PTR_SEG_OFF_TO_LIN(ES_reg(context),
|
||||
DI_reg(context))))
|
||||
bSetDOSExtendedError = TRUE;
|
||||
break;
|
||||
case 0xa1: /* Find close */
|
||||
TRACE(int21,"LONG FILENAME - FINDCLOSE for handle %d\n",
|
||||
BX_reg(context));
|
||||
bSetDOSExtendedError = (!FindClose16( BX_reg(context) ));
|
||||
break;
|
||||
case 0xa0:
|
||||
TRACE(int21,"LONG FILENAME - GET VOLUME INFORMATION for drive %s stub\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context),DX_reg(context)));
|
||||
break;
|
||||
case 0x60:
|
||||
switch(CL_reg(context))
|
||||
|
@ -1597,8 +1755,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
else AX_reg(context) = 0;
|
||||
break;
|
||||
default:
|
||||
fprintf( stderr,
|
||||
"Unimplemented int21 long file name function:\n");
|
||||
FIXME(int21, "Unimplemented long file name function:\n");
|
||||
INT_BARF( context, 0x21 );
|
||||
SET_CFLAG(context);
|
||||
AL_reg(context) = 0;
|
||||
|
@ -1606,11 +1763,15 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
}
|
||||
break;
|
||||
case 0x6c: /* Create or open file */
|
||||
TRACE(int21,"LONG FILENAME - CREATE OR OPEN FILE %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), SI_reg(context)));
|
||||
/* translate Dos 7 action to Dos 6 action */
|
||||
bSetDOSExtendedError = INT21_ExtendedOpenCreateFile(context);
|
||||
break;
|
||||
|
||||
case 0x3b: /* Change directory */
|
||||
TRACE(int21,"LONG FILENAME - CHANGE DIRECTORY %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
if (!SetCurrentDirectory32A(PTR_SEG_OFF_TO_LIN(
|
||||
DS_reg(context),
|
||||
DX_reg(context)
|
||||
|
@ -1621,6 +1782,8 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
}
|
||||
break;
|
||||
case 0x41: /* Delete file */
|
||||
TRACE(int21,"LONG FILENAME - DELETE FILE %s\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)));
|
||||
if (!DeleteFile32A(PTR_SEG_OFF_TO_LIN(
|
||||
DS_reg(context),
|
||||
DX_reg(context))
|
||||
|
@ -1630,8 +1793,11 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
}
|
||||
break;
|
||||
case 0x56: /* Move (rename) file */
|
||||
TRACE(int21,"LONG FILENAME - RENAME FILE %s to %s stub\n",
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context)),
|
||||
(LPCSTR)PTR_SEG_OFF_TO_LIN( ES_reg(context), DI_reg(context)));
|
||||
default:
|
||||
fprintf( stderr, "Unimplemented int21 long file name function:\n");
|
||||
FIXME(int21, "Unimplemented long file name function:\n");
|
||||
INT_BARF( context, 0x21 );
|
||||
SET_CFLAG(context);
|
||||
AL_reg(context) = 0;
|
||||
|
@ -1665,6 +1831,10 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
SET_CFLAG(context);
|
||||
}
|
||||
|
||||
if ((EFL_reg(context) & 0x0001))
|
||||
TRACE(int21, "failed, errorcode 0x%02x class 0x%02x action 0x%02x locus %02x\n",
|
||||
DOS_ExtendedError, DOS_ErrorClass, DOS_ErrorAction, DOS_ErrorLocus);
|
||||
|
||||
TRACE(int21, "returning: AX=%04x BX=%04x CX=%04x DX=%04x "
|
||||
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08lx\n",
|
||||
AX_reg(context), BX_reg(context), CX_reg(context),
|
||||
|
@ -1675,6 +1845,6 @@ void WINAPI DOS3Call( CONTEXT *context )
|
|||
|
||||
FARPROC16 WINAPI GetSetKernelDOSProc(FARPROC16 DosProc)
|
||||
{
|
||||
fprintf(stderr, "GetSetKernelDOSProc(DosProc: %08x);\n", (UINT32)DosProc);
|
||||
FIXME(int21, "(DosProc=%08x);\n", (UINT32)DosProc);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ void WINAPI NetBIOSCall( CONTEXT *context )
|
|||
{
|
||||
BYTE* ptr;
|
||||
ptr = (BYTE*) PTR_SEG_OFF_TO_LIN(ES_reg(context),BX_reg(context));
|
||||
fprintf(stdnimp,"NetBIOSCall: command code %02x (ignored)\n",*ptr);
|
||||
FIXME(int,"(%p): command code %02x (ignored)\n",context, *ptr);
|
||||
AL_reg(context) = *(ptr+0x01) = 0xFB; /* NetBIOS emulator not found */
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ MODULE = multimedia
|
|||
C_SRCS = \
|
||||
audio.c \
|
||||
dsound.c \
|
||||
init.c \
|
||||
joystick.c \
|
||||
mcianim.c \
|
||||
mcicda.c \
|
||||
|
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* Initialization procedures for multimedia
|
||||
*
|
||||
* Copyright 1998 Luiz Otavio L. Zorzella
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "windows.h"
|
||||
#include "multimedia.h"
|
||||
#include "mmsystem.h"
|
||||
#include "xmalloc.h"
|
||||
#include "debug.h"
|
||||
|
||||
#if defined (__HAS_SOUNDCARD_H__)
|
||||
|
||||
extern int MODM_NUMDEVS;
|
||||
extern LPMIDIOUTCAPS16 midiDevices[MAX_MIDIOUTDRV];
|
||||
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
* unixToWindowsDeviceType [internal]
|
||||
*
|
||||
* return the Windows equivalent to a Unix Device Type
|
||||
*
|
||||
*/
|
||||
#if defined (__HAS_SOUNDCARD_H__)
|
||||
int unixToWindowsDeviceType(int type)
|
||||
{
|
||||
/* MOD_MIDIPORT output port
|
||||
* MOD_SYNTH generic internal synth
|
||||
* MOD_SQSYNTH square wave internal synth
|
||||
* MOD_FMSYNTH FM internal synth
|
||||
* MOD_MAPPER MIDI mapper
|
||||
*/
|
||||
|
||||
/* FIXME Is this really the correct equivalence from UNIX to Windows Sound type */
|
||||
|
||||
switch (type) {
|
||||
case SYNTH_TYPE_FM: return MOD_FMSYNTH;
|
||||
case SYNTH_TYPE_SAMPLE: return MOD_SYNTH;
|
||||
case SYNTH_TYPE_MIDI: return MOD_MIDIPORT;
|
||||
default:
|
||||
ERR(midi, "Cannot determine the type of this midi device. Assuming FM Synth\n");
|
||||
return MOD_FMSYNTH;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
* MultimediaInit [internal]
|
||||
*
|
||||
* Initializes the MIDI devices information variables
|
||||
*
|
||||
*/
|
||||
BOOL32 MULTIMEDIA_Init (void)
|
||||
{
|
||||
#if defined (__HAS_SOUNDCARD_H__)
|
||||
int i, status, numsynthdevs, nummididevs;
|
||||
struct synth_info sinfo;
|
||||
struct midi_info minfo;
|
||||
int fd; /* file descriptor for MIDI_DEV */
|
||||
LPMIDIOUTCAPS16 tmplpCaps = NULL;
|
||||
|
||||
TRACE (midi, "Initializing the MIDI variables.\n");
|
||||
/* try to open device */
|
||||
fd = open(MIDI_DEV, O_WRONLY);
|
||||
if (fd == -1) {
|
||||
TRACE (midi, "No soundcards founds: unable to open `%s'.\n", MIDI_DEV);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* find how many Synth devices are there in the system */
|
||||
status = ioctl(fd, SNDCTL_SEQ_NRSYNTHS, &numsynthdevs);
|
||||
|
||||
if (numsynthdevs > MAX_MIDIOUTDRV) {
|
||||
ERR (midi, "MAX_MIDIOUTDRV was enough for the number of devices. Some FM devices will not be available.\n");
|
||||
numsynthdevs = MAX_MIDIOUTDRV;
|
||||
}
|
||||
|
||||
if (status == -1) {
|
||||
ERR (midi, "ioctl failed.\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < numsynthdevs ; i++) {
|
||||
sinfo.device = i;
|
||||
status = ioctl(fd, SNDCTL_SYNTH_INFO, &sinfo);
|
||||
if (status == -1) {
|
||||
ERR(midi, "ioctl failed.\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
tmplpCaps = xmalloc (sizeof (MIDIOUTCAPS16));
|
||||
/* We also have the information sinfo.synth_subtype, not used here
|
||||
*/
|
||||
|
||||
/* Manufac ID. We do not have access to this with soundcard.h
|
||||
* Does not seem to be a problem, because in mmsystem.h only
|
||||
* Microsoft's ID is listed.
|
||||
*/
|
||||
tmplpCaps->wMid = 0x00FF;
|
||||
tmplpCaps->wPid = 0x0001; /* FIXME Product ID */
|
||||
tmplpCaps->vDriverVersion = 0x001; /* Product Version. We simply say "1" */
|
||||
strcpy(tmplpCaps->szPname, sinfo.name);
|
||||
|
||||
tmplpCaps->wTechnology = unixToWindowsDeviceType (sinfo.synth_type);
|
||||
tmplpCaps->wVoices = sinfo.nr_voices;
|
||||
|
||||
/* FIXME Is it possible to know the maximum
|
||||
* number of simultaneous notes of a soundcard ?
|
||||
* I beleive we don't have this information, but
|
||||
* it's probably equal or more than wVoices
|
||||
*/
|
||||
tmplpCaps->wNotes = sinfo.nr_voices;
|
||||
|
||||
/* FIXME Do we have this information?
|
||||
* Assuming the soundcards can handle
|
||||
* MIDICAPS_VOLUME and MIDICAPS_LRVOLUME but
|
||||
* not MIDICAPS_CACHE.
|
||||
*/
|
||||
tmplpCaps->dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
|
||||
|
||||
midiDevices[i] = tmplpCaps;
|
||||
|
||||
TRACE(midi,"techn = %d voices=%d notes = %d support = %ld\n",tmplpCaps->wTechnology,tmplpCaps->wVoices,tmplpCaps->wNotes,tmplpCaps->dwSupport);
|
||||
}
|
||||
|
||||
/* find how many MIDI devices are there in the system */
|
||||
status = ioctl(fd, SNDCTL_SEQ_NRMIDIS, &nummididevs);
|
||||
if (status == -1) {
|
||||
ERR(midi, "ioctl failed.\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (numsynthdevs + nummididevs > MAX_MIDIOUTDRV) {
|
||||
ERR(midi, "MAX_MIDIOUTDRV was enough for the number of devices. Some MIDI devices will not be available.\n");
|
||||
nummididevs = MAX_MIDIOUTDRV - numsynthdevs;
|
||||
}
|
||||
|
||||
/* windows does not seem to diferentiate Synth from MIDI devices */
|
||||
MODM_NUMDEVS = numsynthdevs + nummididevs;
|
||||
|
||||
for (i = 0 ; i < nummididevs ; i++) {
|
||||
minfo.device = i;
|
||||
status = ioctl(fd, SNDCTL_MIDI_INFO, &minfo);
|
||||
if (status == -1) {
|
||||
ERR(midi, "ioctl failed.\n");
|
||||
return TRUE;
|
||||
}
|
||||
/* This whole part is somewhat obscure to me. I'll keep trying to dig
|
||||
info about it. If you happen to know, please tell us. The very descritive
|
||||
minfo.dev_type was not used here.
|
||||
*/
|
||||
tmplpCaps->wMid = 0x00FF; /* Manufac ID. We do not have access to this with soundcard.h
|
||||
Does not seem to be a problem, because in mmsystem.h only
|
||||
Microsoft's ID is listed */
|
||||
tmplpCaps->wPid = 0x0001; /* FIXME Product ID */
|
||||
tmplpCaps->vDriverVersion = 0x001; /* Product Version. We simply say "1" */
|
||||
strcpy(tmplpCaps->szPname, minfo.name);
|
||||
|
||||
tmplpCaps->wTechnology = MOD_MIDIPORT; /* FIXME Is this right? */
|
||||
tmplpCaps->wVoices = 16; /* Does it make any difference? */
|
||||
tmplpCaps->wNotes = 16; /* Does it make any difference? */
|
||||
tmplpCaps->dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME; /* FIXME Does it make any difference? */
|
||||
|
||||
midiDevices[numsynthdevs + i] = tmplpCaps;
|
||||
|
||||
TRACE(midi,"techn = %d voices=%d notes = %d support = %ld\n",tmplpCaps->wTechnology,tmplpCaps->wVoices,tmplpCaps->wNotes,tmplpCaps->dwSupport);
|
||||
}
|
||||
|
||||
/* close file and exit */
|
||||
close(fd);
|
||||
|
||||
#endif /* __HAS_SOUNDCARD_H__ */
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
|
@ -542,8 +542,7 @@ static DWORD ANIM_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms
|
|||
static DWORD ANIM_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#if defined(linux) || defined(__FreeBSD__)
|
||||
TRACE(mcianim,"(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
TRACE(mcianim,"(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
/*
|
||||
printf("ANIM_mciSet // dwTimeFormat=%08lX\n", lpParms->dwTimeFormat);
|
||||
|
|
|
@ -933,8 +933,7 @@ static DWORD CDAUDIO_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpPa
|
|||
static DWORD CDAUDIO_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#if defined(linux) || defined(__FreeBSD__)
|
||||
TRACE(cdaudio,"(%04X, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
TRACE(cdaudio,"(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
/*
|
||||
printf("CDAUDIO_mciSet // dwTimeFormat=%08lX\n", lpParms->dwTimeFormat);
|
||||
|
|
|
@ -129,7 +129,7 @@ _MCISTR_printtf(char *buf,UINT16 uDevType,DWORD timef,DWORD val) {
|
|||
);
|
||||
break;
|
||||
default:
|
||||
fprintf(stdnimp,__FILE__":MCISTR_Status:missing timeformat for %ld, report.\n",timef);
|
||||
FIXME(mci, "missing timeformat for %ld, report.\n",timef);
|
||||
strcpy(buf,"0"); /* hmm */
|
||||
break;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ _MCISTR_convreturn(int type,DWORD dwReturn,LPSTR lpstrReturnString,
|
|||
case MCI_SEQ_SMPTE:_MCI_STR("smpte");break;
|
||||
case MCI_SEQ_FILE:_MCI_STR("file");break;
|
||||
case MCI_SEQ_MIDI:_MCI_STR("midi");break;
|
||||
default:fprintf(stdnimp,__FILE__":MCISTR_Status:missing sequencer mode %ld\n",dwReturn);
|
||||
default:FIXME(mci,"missing sequencer mode %ld\n",dwReturn);
|
||||
}
|
||||
break;
|
||||
case _MCISTR_mode:
|
||||
|
@ -208,7 +208,7 @@ _MCISTR_convreturn(int type,DWORD dwReturn,LPSTR lpstrReturnString,
|
|||
case MCI_FORMAT_MSF:_MCI_STR("msf");break;
|
||||
case MCI_FORMAT_TMSF:_MCI_STR("tmsf");break;
|
||||
default:
|
||||
fprintf(stdnimp,__FILE__":MCISTR_Status:missing timeformat for %d, report.\n",timef);
|
||||
FIXME(mci,"missing timefmt for %d, report.\n",timef);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -233,11 +233,12 @@ _MCISTR_convreturn(int type,DWORD dwReturn,LPSTR lpstrReturnString,
|
|||
case MCI_DEVTYPE_OTHER:_MCI_STR("other");break;
|
||||
case MCI_DEVTYPE_WAVEFORM_AUDIO:_MCI_STR("waveform audio");break;
|
||||
case MCI_DEVTYPE_SEQUENCER:_MCI_STR("sequencer");break;
|
||||
default:fprintf(stdnimp,__FILE__":_MCISTR_convreturn:unknown device type %ld, report.\n",dwReturn);break;
|
||||
default:FIXME(mci,"unknown device type %ld, report.\n",
|
||||
dwReturn);break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fprintf(stdnimp,__FILE__":_MCISTR_convreturn:unknown resulttype %d, report.\n",type);
|
||||
FIXME(mci,"unknown resulttype %d, report.\n",type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -388,7 +389,7 @@ MCISTR_Open(_MCISTR_PROTO_) {
|
|||
} else if (sscanf(keywords[i+1],"%ld",&st)) {
|
||||
pU->animopenParams.dwStyle |= st;
|
||||
} else
|
||||
fprintf(stdnimp,__FILE__":MCISTR_Open:unknown 'style' keyword %s, please report.\n",keywords[i+1]);
|
||||
FIXME(mci,"unknown 'style' keyword %s, please report.\n",keywords[i+1]);
|
||||
i+=2;
|
||||
continue;
|
||||
}
|
||||
|
@ -420,13 +421,14 @@ MCISTR_Open(_MCISTR_PROTO_) {
|
|||
} else if (sscanf(keywords[i+1],"%ld",&st)) {
|
||||
pU->ovlyopenParams.dwStyle |= st;
|
||||
} else
|
||||
fprintf(stdnimp,__FILE__":MCISTR_Open:unknown 'style' keyword %s, please report.\n",keywords[i+1]);
|
||||
FIXME(mci,"unknown 'style' keyword %s, please report.\n",keywords[i+1]);
|
||||
i+=2;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
fprintf(stdnimp,__FILE__":MCISTR_Open:unknown parameter passed %s, please report.\n",keywords[i]);
|
||||
FIXME(mci,"unknown parameter passed %s, please report.\n",
|
||||
keywords[i]);
|
||||
i++;
|
||||
}
|
||||
_MCI_CALL_DRIVER( MCI_OPEN, SEGPTR_GET(pU) );
|
||||
|
@ -619,7 +621,7 @@ MCISTR_Status(_MCISTR_PROTO_) {
|
|||
ITEM1("level",MCI_WAVE_STATUS_LEVEL,_MCISTR_int);
|
||||
break;
|
||||
}
|
||||
fprintf(stdnimp,__FILE__":MCISTR_Status:unknown keyword '%s'\n",keywords[i]);
|
||||
FIXME(mci,"unknown keyword '%s'\n",keywords[i]);
|
||||
i++;
|
||||
}
|
||||
if (!statusParams->dwItem)
|
||||
|
@ -1058,7 +1060,7 @@ MCISTR_Record(_MCISTR_PROTO_) {
|
|||
parsestr="%d:%d:%d:%d";
|
||||
nrargs=4;
|
||||
break;
|
||||
default:fprintf(stdnimp,"mciSendString:PLAY:unknown timeformat %d, please report.\n",timef);
|
||||
default:FIXME(mci,"unknown timeformat %d, please report.\n",timef);
|
||||
parsestr="%d";
|
||||
nrargs=1;
|
||||
break;
|
||||
|
@ -1147,7 +1149,7 @@ MCISTR_Play(_MCISTR_PROTO_) {
|
|||
parsestr="%d:%d:%d:%d";
|
||||
nrargs=4;
|
||||
break;
|
||||
default:fprintf(stdnimp,"mciSendString:PLAY:unknown timeformat %d, please report.\n",timef);
|
||||
default:FIXME(mci,"unknown timeformat %d, please report.\n",timef);
|
||||
parsestr="%d";
|
||||
nrargs=1;
|
||||
break;
|
||||
|
@ -1244,7 +1246,7 @@ MCISTR_Seek(_MCISTR_PROTO_) {
|
|||
parsestr="%d:%d:%d:%d";
|
||||
nrargs=4;
|
||||
break;
|
||||
default:fprintf(stdnimp,"mciSendString:SEEK:unknown timeformat %d, please report.\n",timef);
|
||||
default:FIXME(mci,"unknown timeformat %d, please report.\n",timef);
|
||||
parsestr="%d";
|
||||
nrargs=1;
|
||||
break;
|
||||
|
@ -1529,7 +1531,7 @@ MCISTR_Delete(_MCISTR_PROTO_) {
|
|||
parsestr="%d:%d:%d:%d";
|
||||
nrargs=4;
|
||||
break;
|
||||
default:fprintf(stdnimp,"mciSendString:DELETE:unknown timeformat %d, please report.\n",timef);
|
||||
default:FIXME(mci,"unknown timeformat %d, please report.\n",timef);
|
||||
parsestr="%d";
|
||||
nrargs=1;
|
||||
break;
|
||||
|
@ -2204,9 +2206,8 @@ DWORD WINAPI mciSendString (LPCSTR lpstrCommand, LPSTR lpstrReturnString,
|
|||
free(keywords);free(cmd);
|
||||
return res;
|
||||
}
|
||||
fprintf(stdnimp,"mciSendString('%s', %p, %u, %X) // unimplemented, please report.\n", lpstrCommand,
|
||||
lpstrReturnString, uReturnLength, hwndCallback
|
||||
);
|
||||
FIXME(mci,"('%s', %p, %u, %X): unimplemented, please report.\n",
|
||||
lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback);
|
||||
free(keywords);free(cmd);
|
||||
return MCIERR_MISSING_COMMAND_STRING;
|
||||
}
|
||||
|
|
|
@ -14,74 +14,28 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include "windows.h"
|
||||
#include "ldt.h"
|
||||
#include "multimedia.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
#include "xmalloc.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef linux
|
||||
#include <linux/soundcard.h>
|
||||
#elif __FreeBSD__
|
||||
#include <machine/soundcard.h>
|
||||
#include <sys/errno.h>
|
||||
#endif
|
||||
|
||||
#if defined(linux) || defined(__FreeBSD__)
|
||||
#define MIDI_DEV "/dev/sequencer"
|
||||
|
||||
#ifdef SOUND_VERSION
|
||||
#define IOCTL(a,b,c) ioctl(a,b,&c)
|
||||
#else
|
||||
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
|
||||
#endif
|
||||
|
||||
#define MAX_MIDIINDRV (1)
|
||||
#define MAX_MIDIOUTDRV (1)
|
||||
#define MAX_MCIMIDIDRV (1)
|
||||
|
||||
typedef struct {
|
||||
int unixdev;
|
||||
int state;
|
||||
DWORD bufsize;
|
||||
MIDIOPENDESC midiDesc;
|
||||
WORD wFlags;
|
||||
LPMIDIHDR lpQueueHdr;
|
||||
DWORD dwTotalPlayed;
|
||||
} LINUX_MIDIIN;
|
||||
|
||||
typedef struct {
|
||||
int unixdev;
|
||||
int state;
|
||||
DWORD bufsize;
|
||||
MIDIOPENDESC midiDesc;
|
||||
WORD wFlags;
|
||||
LPMIDIHDR lpQueueHdr;
|
||||
DWORD dwTotalPlayed;
|
||||
} LINUX_MIDIOUT;
|
||||
|
||||
typedef struct {
|
||||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL16 fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
HMMIO16 hFile; /* mmio file handle open as Element */
|
||||
DWORD dwBeginData;
|
||||
DWORD dwTotalLen;
|
||||
WORD wFormat;
|
||||
WORD nTracks;
|
||||
WORD nTempo;
|
||||
MCI_OPEN_PARMS16 openParms;
|
||||
/* MIDIHDR MidiHdr; */
|
||||
HLOCAL16 hMidiHdr;
|
||||
WORD dwStatus;
|
||||
} LINUX_MCIMIDI;
|
||||
#if defined (__HAS_SOUNDCARD_H__)
|
||||
|
||||
static LINUX_MIDIIN MidiInDev[MAX_MIDIINDRV];
|
||||
static LINUX_MIDIOUT MidiOutDev[MAX_MIDIOUTDRV];
|
||||
static LINUX_MCIMIDI MCIMidiDev[MAX_MCIMIDIDRV];
|
||||
|
||||
#endif
|
||||
|
||||
/* this is the total number of MIDI devices found */
|
||||
int MODM_NUMDEVS = 0;
|
||||
|
||||
/* this structure holds pointers with information for each MIDI
|
||||
* device found.
|
||||
*/
|
||||
LPMIDIOUTCAPS16 midiDevices[MAX_MIDIOUTDRV];
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_NotifyClient [internal]
|
||||
|
@ -835,12 +789,13 @@ static DWORD MIDI_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_mciInfo [internal]
|
||||
*/
|
||||
static DWORD MIDI_mciInfo(UINT16 wDevID, DWORD dwFlags, LPMCI_INFO_PARMS16 lpParms)
|
||||
{
|
||||
#if defined(linux) || defined(__FreeBSD__)
|
||||
# if defined(__FreeBSD__) || defined (linux)
|
||||
TRACE(midi, "(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
lpParms->lpstrReturn = NULL;
|
||||
|
@ -1047,35 +1002,42 @@ DWORD midMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* modGetDevCaps [internal]
|
||||
*/
|
||||
static DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPS16 lpCaps, DWORD dwSize)
|
||||
{
|
||||
LPMIDIOUTCAPS16 tmplpCaps;
|
||||
|
||||
TRACE(midi, "(%04X, %p, %08lX);\n", wDevID, lpCaps, dwSize);
|
||||
if (wDevID == (WORD) MIDI_MAPPER) {
|
||||
lpCaps->wMid = 0x00FF; /* Manufac ID */
|
||||
lpCaps->wPid = 0x0001; /* Product ID */
|
||||
lpCaps->vDriverVersion = 0x001; /* Product Version */
|
||||
strcpy(lpCaps->szPname, "Linux MIDIOUT Driver v0.01");
|
||||
/* FIXME
|
||||
Values are the same as I get with Borland TC 4.5
|
||||
strcpy(lpCaps->szPname, "MIDI Maper (not functional yet)");
|
||||
lpCaps->wTechnology = MOD_FMSYNTH; /* FIXME Does it make any difference ? */
|
||||
lpCaps->wVoices = 14; /* FIXME */
|
||||
lpCaps->wNotes = 14; /* FIXME */
|
||||
lpCaps->dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME; /* FIXME Does it make any difference ? */
|
||||
} else {
|
||||
/* FIXME There is a way to do it so easily, but I'm too
|
||||
* sleepy to think and I want to test
|
||||
*/
|
||||
|
||||
lpCaps->wTechnology = MOD_FMSYNTH;
|
||||
lpCaps->wVoices = 14; /* make it ioctl */
|
||||
lpCaps->wNotes = 14; /* make it ioctl */
|
||||
lpCaps->dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
|
||||
TRACE(midi,"techn = %d voices=%d notes = %d support = %ld\n",lpCaps->wTechnology,lpCaps->wVoices,lpCaps->wNotes,lpCaps->dwSupport);
|
||||
|
||||
tmplpCaps = midiDevices [wDevID];
|
||||
lpCaps->wMid = tmplpCaps->wMid;
|
||||
lpCaps->wPid = tmplpCaps->wPid;
|
||||
lpCaps->vDriverVersion = tmplpCaps->vDriverVersion;
|
||||
strcpy(lpCaps->szPname, tmplpCaps->szPname);
|
||||
lpCaps->wTechnology = tmplpCaps->wTechnology;
|
||||
lpCaps->wVoices = tmplpCaps->wVoices;
|
||||
lpCaps->wNotes = tmplpCaps->wNotes;
|
||||
lpCaps->dwSupport = tmplpCaps->dwSupport;
|
||||
}
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* modOpen [internal]
|
||||
*/
|
||||
|
@ -1091,7 +1053,7 @@ static DWORD modOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
|||
}
|
||||
if (wDevID>= MAX_MIDIOUTDRV) {
|
||||
TRACE(midi,"MAX_MIDIOUTDRV reached !\n");
|
||||
return MMSYSERR_ALLOCATED;
|
||||
return MMSYSERR_ALLOCATED; /* FIXME isn't MMSYSERR_BADDEVICEID the right answer ? */
|
||||
}
|
||||
MidiOutDev[wDevID].unixdev = 0;
|
||||
midi = open (MIDI_DEV, O_WRONLY, 0);
|
||||
|
@ -1311,7 +1273,7 @@ DWORD modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
|||
case MODM_GETDEVCAPS:
|
||||
return modGetDevCaps(wDevID,(LPMIDIOUTCAPS16)dwParam1,dwParam2);
|
||||
case MODM_GETNUMDEVS:
|
||||
return 1;
|
||||
return MODM_NUMDEVS;
|
||||
case MODM_GETVOLUME:
|
||||
return 0;
|
||||
case MODM_SETVOLUME:
|
||||
|
|
|
@ -455,8 +455,7 @@ LPMMIOPROC16 WINAPI mmioInstallIOProc16(FOURCC fccIOProc,
|
|||
fccIOProc, pIOProc, dwFlags);
|
||||
|
||||
if (dwFlags & MMIO_GLOBALPROC) {
|
||||
fprintf(stdnimp, "mmioInstallIOProc: global procedures not "
|
||||
"implemented\n");
|
||||
FIXME(mmio, " global procedures not implemented\n");
|
||||
}
|
||||
|
||||
/* just handle the known procedures for now */
|
||||
|
|
|
@ -96,7 +96,8 @@ BOOL32 MMSYSTEM_DevIDValid(UINT16 wDevID) {
|
|||
int WINAPI MMSYSTEM_WEP(HINSTANCE16 hInstance, WORD wDataSeg,
|
||||
WORD cbHeapSize, LPSTR lpCmdLine)
|
||||
{
|
||||
fprintf(stderr, "STUB: Unloading MMSystem DLL ... hInst=%04X \n", hInstance);
|
||||
FIXME(mmsys, "STUB: Unloading MMSystem DLL ... hInst=%04X \n",
|
||||
hInstance);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
@ -122,9 +123,9 @@ MMSYSTEM_MMTIME16to32(LPMMTIME32 mmt32,LPMMTIME16 mmt16) {
|
|||
BOOL32 WINAPI PlaySound32A(LPCSTR pszSound, HMODULE32 hmod, DWORD fdwSound)
|
||||
{
|
||||
TRACE(mmsys, "pszSound='%p' hmod=%04X fdwSound=%08lX\n",
|
||||
pszSound, hmod, fdwSound);
|
||||
pszSound, hmod, fdwSound);
|
||||
if(hmod != 0 || !(fdwSound & SND_FILENAME)) {
|
||||
fprintf(stderr, "PlaySoundA: only disk sound files are supported\n");
|
||||
FIXME(mmsys, "only disk sound files are supported\n");
|
||||
return FALSE;
|
||||
} else
|
||||
return sndPlaySound(pszSound, (UINT16) fdwSound);
|
||||
|
@ -406,7 +407,7 @@ UINT32 WINAPI mixerGetDevCaps32A(UINT32 devid,LPMIXERCAPS32A mixcaps,UINT32 size
|
|||
*/
|
||||
UINT16 WINAPI mixerGetDevCaps16(UINT16 devid,LPMIXERCAPS16 mixcaps,UINT16 size)
|
||||
{
|
||||
fprintf(stderr,"mixerGetDevCaps!\n");
|
||||
FIXME(mmsys,"should this be a fixme?\n");
|
||||
return mixMessage(devid,MXDM_GETDEVCAPS,0L,(DWORD)mixcaps,(DWORD)size);
|
||||
}
|
||||
|
||||
|
@ -419,9 +420,8 @@ DWORD dwInstance,DWORD fdwOpen)
|
|||
HMIXER16 hmix16;
|
||||
UINT32 ret;
|
||||
|
||||
fprintf(stderr,"mixerOpen32(%p,%d,%08lx,%08lx,%08lx)\n",
|
||||
lphmix,uDeviceID,dwCallback,dwInstance,fdwOpen
|
||||
);
|
||||
FIXME(mmsys,"(%p,%d,%08lx,%08lx,%08lx): semi stub?\n",
|
||||
lphmix,uDeviceID,dwCallback,dwInstance,fdwOpen);
|
||||
ret = mixerOpen16(&hmix16,uDeviceID,dwCallback,dwInstance,fdwOpen);
|
||||
if (lphmix) *lphmix = hmix16;
|
||||
return ret;
|
||||
|
@ -438,9 +438,8 @@ DWORD dwInstance,DWORD fdwOpen)
|
|||
BOOL32 mapperflag = (uDeviceID==0);
|
||||
DWORD dwRet;
|
||||
|
||||
fprintf(stderr,"mixerOpen(%p,%d,%08lx,%08lx,%08lx)\n",
|
||||
lphmix,uDeviceID,dwCallback,dwInstance,fdwOpen
|
||||
);
|
||||
TRACE(mmsys,"(%p,%d,%08lx,%08lx,%08lx)\n",
|
||||
lphmix,uDeviceID,dwCallback,dwInstance,fdwOpen);
|
||||
hmix = USER_HEAP_ALLOC(sizeof(MIXEROPENDESC));
|
||||
if (lphmix) *lphmix = hmix;
|
||||
lpmod = (LPMIXEROPENDESC)USER_HEAP_LIN_ADDR(hmix);
|
||||
|
@ -472,7 +471,7 @@ UINT32 WINAPI mixerClose32(HMIXER32 hmix) {
|
|||
UINT16 WINAPI mixerClose16(HMIXER16 hmix) {
|
||||
LPMIXEROPENDESC lpmod;
|
||||
|
||||
fprintf(stderr,"mixerClose(%04x)\n",hmix);
|
||||
FIXME(mmsys,"(%04x): semi-stub?\n",hmix);
|
||||
lpmod = (LPMIXEROPENDESC)USER_HEAP_LIN_ADDR(hmix);
|
||||
return mixMessage(lpmod->uDeviceID,MXDM_CLOSE,lpmod->dwInstance,0L,0L);
|
||||
}
|
||||
|
@ -492,7 +491,7 @@ UINT32 WINAPI mixerGetID32(HMIXEROBJ32 hmix,LPUINT32 lpid,DWORD fdwID) {
|
|||
* mixerGetID
|
||||
*/
|
||||
UINT16 WINAPI mixerGetID16(HMIXEROBJ16 hmix,LPUINT16 lpid,DWORD fdwID) {
|
||||
fprintf(stderr,"mixerGetID(%04x)\n",hmix);
|
||||
FIXME(mmsys,"(%04x): semi-stub\n",hmix);
|
||||
return _get_mixerID_from_handle(hmix,fdwID);
|
||||
}
|
||||
|
||||
|
@ -500,9 +499,7 @@ UINT16 WINAPI mixerGetID16(HMIXEROBJ16 hmix,LPUINT16 lpid,DWORD fdwID) {
|
|||
* mixerGetControlDetailsA [WINMM.99]
|
||||
*/
|
||||
UINT32 mixerGetControlDetails32A(HMIXEROBJ32 hmix,LPMIXERCONTROLDETAILS32 lpmcd,DWORD fdwDetails) {
|
||||
fprintf(stderr,"mixerGetControlDetails(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmcd,fdwDetails
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmcd,fdwDetails);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -510,9 +507,7 @@ UINT32 mixerGetControlDetails32A(HMIXEROBJ32 hmix,LPMIXERCONTROLDETAILS32 lpmcd,
|
|||
* mixerGetControlDetailsW [WINMM.100]
|
||||
*/
|
||||
UINT32 mixerGetControlDetails32W(HMIXEROBJ32 hmix,LPMIXERCONTROLDETAILS32 lpmcd,DWORD fdwDetails) {
|
||||
fprintf(stderr,"mixerGetControlDetails(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmcd,fdwDetails
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n", hmix,lpmcd,fdwDetails);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -520,9 +515,7 @@ UINT32 mixerGetControlDetails32W(HMIXEROBJ32 hmix,LPMIXERCONTROLDETAILS32 lpmcd,
|
|||
* mixerGetControlDetails [MMSYSTEM.808]
|
||||
*/
|
||||
UINT16 mixerGetControlDetails16(HMIXEROBJ16 hmix,LPMIXERCONTROLDETAILS16 lpmcd,DWORD fdwDetails) {
|
||||
fprintf(stderr,"mixerGetControlDetails(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmcd,fdwDetails
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmcd,fdwDetails);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -530,9 +523,7 @@ UINT16 mixerGetControlDetails16(HMIXEROBJ16 hmix,LPMIXERCONTROLDETAILS16 lpmcd,D
|
|||
* mixerGetLineControlsA [WINMM.104]
|
||||
*/
|
||||
UINT32 WINAPI mixerGetLineControls32A(HMIXEROBJ32 hmix,LPMIXERLINECONTROLS32A lpmlc,DWORD fdwControls) {
|
||||
fprintf(stderr,"mixerGetLineControlsA(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmlc,fdwControls
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmlc,fdwControls);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -540,9 +531,7 @@ UINT32 WINAPI mixerGetLineControls32A(HMIXEROBJ32 hmix,LPMIXERLINECONTROLS32A lp
|
|||
* mixerGetLineControlsW [WINMM.105]
|
||||
*/
|
||||
UINT32 WINAPI mixerGetLineControls32W(HMIXEROBJ32 hmix,LPMIXERLINECONTROLS32W lpmlc,DWORD fdwControls) {
|
||||
fprintf(stderr,"mixerGetLineControlsA(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmlc,fdwControls
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmlc,fdwControls);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -550,9 +539,7 @@ UINT32 WINAPI mixerGetLineControls32W(HMIXEROBJ32 hmix,LPMIXERLINECONTROLS32W lp
|
|||
* mixerGetLineControls [MMSYSTEM.807]
|
||||
*/
|
||||
UINT16 WINAPI mixerGetLineControls16(HMIXEROBJ16 hmix,LPMIXERLINECONTROLS16 lpmlc,DWORD fdwControls) {
|
||||
fprintf(stderr,"mixerGetLineControls(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmlc,fdwControls
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmlc,fdwControls);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -564,9 +551,7 @@ UINT32 WINAPI mixerGetLineInfo32A(HMIXEROBJ32 hmix,LPMIXERLINE32A lpml,DWORD fdw
|
|||
UINT32 ret;
|
||||
|
||||
ml16.dwDestination = lpml->dwDestination;
|
||||
fprintf(stderr,"mixerGetLineInfoA(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpml,fdwInfo
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpml,fdwInfo);
|
||||
ret = mixerGetLineInfo16(hmix,&ml16,fdwInfo);
|
||||
lpml->cbStruct = sizeof(*lpml);
|
||||
lpml->dwSource = ml16.dwSource;
|
||||
|
@ -596,9 +581,7 @@ UINT32 WINAPI mixerGetLineInfo32W(HMIXEROBJ32 hmix,LPMIXERLINE32W lpml,DWORD fdw
|
|||
UINT32 ret;
|
||||
|
||||
ml16.dwDestination = lpml->dwDestination;
|
||||
fprintf(stderr,"mixerGetLineInfoW(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpml,fdwInfo
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpml,fdwInfo);
|
||||
ret = mixerGetLineInfo16(hmix,&ml16,fdwInfo);
|
||||
lpml->cbStruct = sizeof(*lpml);
|
||||
lpml->dwSource = ml16.dwSource;
|
||||
|
@ -626,9 +609,8 @@ UINT32 WINAPI mixerGetLineInfo32W(HMIXEROBJ32 hmix,LPMIXERLINE32W lpml,DWORD fdw
|
|||
UINT16 WINAPI mixerGetLineInfo16(HMIXEROBJ16 hmix,LPMIXERLINE16 lpml,DWORD fdwInfo) {
|
||||
UINT16 devid = _get_mixerID_from_handle(hmix,fdwInfo);
|
||||
|
||||
fprintf(stderr,"mixerGetLineInfo16(%04x,%p[line %08lx],%08lx)\n",
|
||||
hmix,lpml,lpml->dwDestination,fdwInfo
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p[line %08lx],%08lx) - semi-stub?\n",
|
||||
hmix,lpml,lpml->dwDestination,fdwInfo);
|
||||
return mixMessage(devid,MXDM_GETLINEINFO,0,(DWORD)lpml,fdwInfo);
|
||||
}
|
||||
|
||||
|
@ -636,9 +618,7 @@ UINT16 WINAPI mixerGetLineInfo16(HMIXEROBJ16 hmix,LPMIXERLINE16 lpml,DWORD fdwIn
|
|||
* mixerSetControlDetails [WINMM.111]
|
||||
*/
|
||||
UINT32 WINAPI mixerSetControlDetails32(HMIXEROBJ32 hmix,LPMIXERCONTROLDETAILS32 lpmcd,DWORD fdwDetails) {
|
||||
fprintf(stderr,"mixerSetControlDetails32(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmcd,fdwDetails
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmcd,fdwDetails);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -646,9 +626,7 @@ UINT32 WINAPI mixerSetControlDetails32(HMIXEROBJ32 hmix,LPMIXERCONTROLDETAILS32
|
|||
* mixerSetControlDetails [MMSYSTEM.809]
|
||||
*/
|
||||
UINT16 WINAPI mixerSetControlDetails16(HMIXEROBJ16 hmix,LPMIXERCONTROLDETAILS16 lpmcd,DWORD fdwDetails) {
|
||||
fprintf(stderr,"mixerSetControlDetails16(%04x,%p,%08lx),stub!\n",
|
||||
hmix,lpmcd,fdwDetails
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%p,%08lx): stub!\n",hmix,lpmcd,fdwDetails);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
|
@ -664,7 +642,8 @@ UINT32 WINAPI mixerMessage32(HMIXER32 hmix,UINT32 uMsg,DWORD dwParam1,DWORD dwPa
|
|||
uDeviceID = lpmod->uDeviceID;
|
||||
else
|
||||
uDeviceID = 0;
|
||||
fprintf(stderr,"mixerMessage(%04lx,%d,%08lx,%08lx)\n",(DWORD)hmix,uMsg,dwParam1,dwParam2);
|
||||
FIXME(mmsys,"(%04lx,%d,%08lx,%08lx): semi-stub?\n",
|
||||
(DWORD)hmix,uMsg,dwParam1,dwParam2);
|
||||
return mixMessage(uDeviceID,uMsg,0L,dwParam1,dwParam2);
|
||||
}
|
||||
|
||||
|
@ -680,7 +659,8 @@ UINT16 WINAPI mixerMessage16(HMIXER16 hmix,UINT16 uMsg,DWORD dwParam1,DWORD dwPa
|
|||
uDeviceID = lpmod->uDeviceID;
|
||||
else
|
||||
uDeviceID = 0;
|
||||
fprintf(stderr,"mixerMessage(%04x,%d,%08lx,%08lx)\n",hmix,uMsg,dwParam1,dwParam2);
|
||||
FIXME(mmsys,"(%04x,%d,%08lx,%08lx) - semi-stub?\n",
|
||||
hmix,uMsg,dwParam1,dwParam2);
|
||||
return mixMessage(uDeviceID,uMsg,0L,dwParam1,dwParam2);
|
||||
}
|
||||
|
||||
|
@ -797,9 +777,8 @@ DWORD WINAPI auxOutMessage32(UINT32 uDeviceID,UINT32 uMessage,DWORD dw1,DWORD dw
|
|||
case AUXDM_GETDEVCAPS:
|
||||
return auxGetDevCaps32A(uDeviceID,(LPAUXCAPS32A)dw1,dw2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled auxMessage32(%04x,%04x,%08lx,%08lx)\n",
|
||||
uDeviceID,uMessage,dw1,dw2
|
||||
);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
uDeviceID,uMessage,dw1,dw2);
|
||||
break;
|
||||
}
|
||||
return auxMessage(uDeviceID,uMessage,0L,dw1,dw2);
|
||||
|
@ -822,9 +801,8 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD
|
|||
case AUXDM_GETDEVCAPS:
|
||||
return auxGetDevCaps16(uDeviceID,(LPAUXCAPS16)PTR_SEG_TO_LIN(dw1),dw2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled auxMessage32(%04x,%04x,%08lx,%08lx)\n",
|
||||
uDeviceID,uMessage,dw1,dw2
|
||||
);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
uDeviceID,uMessage,dw1,dw2);
|
||||
break;
|
||||
}
|
||||
return auxMessage(uDeviceID, uMessage, 0L, dw1, dw2);
|
||||
|
@ -1254,7 +1232,7 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS16 lp16Parms)
|
|||
} else {
|
||||
#if testing16
|
||||
HDRVR16 hdrv;
|
||||
fprintf(stderr,"trying to load driver...\n");
|
||||
TRACE(mmsys,"trying to load driver...\n");
|
||||
hdrv = OpenDriver(str,"mci",NULL);
|
||||
if (hdrv) {
|
||||
HMODULE16 hmod;
|
||||
|
@ -1317,7 +1295,7 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS16 lp16Parms)
|
|||
* mciGetDriverData [MMSYSTEM.708]
|
||||
*/
|
||||
DWORD WINAPI mciGetDriverData16(HDRVR16 hdrv) {
|
||||
fprintf(stderr,"mciGetDriverData(%04x),stub!\n",hdrv);
|
||||
FIXME(mmsys,"(%04x): stub!\n",hdrv);
|
||||
return 0x42;
|
||||
}
|
||||
|
||||
|
@ -1325,7 +1303,7 @@ DWORD WINAPI mciGetDriverData16(HDRVR16 hdrv) {
|
|||
* mciSetDriverData [MMSYSTEM.707]
|
||||
*/
|
||||
DWORD WINAPI mciSetDriverData16(HDRVR16 hdrv,DWORD data) {
|
||||
fprintf(stderr,"mciSetDriverData(%04x,%08lx),stub!\n",hdrv,data);
|
||||
FIXME(mmsys,"(%04x,%08lx): stub!\n",hdrv,data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1436,11 +1414,9 @@ UINT16 mciLoadCommandResource16(HANDLE16 hinst,LPCSTR resname,UINT16 type)
|
|||
LPBYTE lmem;
|
||||
static mcidevtype = 0;
|
||||
|
||||
fprintf(stderr,"mciLoadCommandResource16(%04x,%s,%d),stub!\n",
|
||||
hinst,resname,type
|
||||
);
|
||||
FIXME(mmsys,"(%04x,%s,%d): stub!\n",hinst,resname,type);
|
||||
if (!lstrcmpi32A(resname,"core")) {
|
||||
fprintf(stderr,"mciLoadCommandResource(...,\"core\",...), have to use internal tables... (not there yet)\n");
|
||||
FIXME(mmsys,"(...,\"core\",...), have to use internal tables... (not there yet)\n");
|
||||
return 0;
|
||||
}
|
||||
/* if file exists "resname.mci", then load resource "resname" from it
|
||||
|
@ -1457,22 +1433,22 @@ UINT16 mciLoadCommandResource16(HANDLE16 hinst,LPCSTR resname,UINT16 type)
|
|||
hrsrc = FindResource16(hinst,SEGPTR_GET(segstr),type);
|
||||
SEGPTR_FREE(segstr);
|
||||
if (!hrsrc) {
|
||||
fprintf(stderr,"mciLoadCommandResource:no special commandlist found in resource\n");
|
||||
WARN(mmsys,"no special commandlist found in resource\n");
|
||||
return MCI_NO_COMMAND_TABLE;
|
||||
}
|
||||
hmem = LoadResource16(hinst,hrsrc);
|
||||
if (!hmem) {
|
||||
fprintf(stderr,"mciLoadCommandResource:couldn't load resource??\n");
|
||||
WARN(mmsys,"couldn't load resource??\n");
|
||||
return MCI_NO_COMMAND_TABLE;
|
||||
}
|
||||
xmem = WIN16_LockResource16(hmem);
|
||||
if (!xmem) {
|
||||
fprintf(stderr,"mciLoadCommandResource:couldn't lock resource??\n");
|
||||
WARN(mmsys,"couldn't lock resource??\n");
|
||||
FreeResource16(hmem);
|
||||
return MCI_NO_COMMAND_TABLE;
|
||||
}
|
||||
lmem = PTR_SEG_TO_LIN(xmem);
|
||||
fprintf(stderr,"first resource entry is %s\n",(char*)lmem);
|
||||
TRACE(mmsys,"first resource entry is %s\n",(char*)lmem);
|
||||
/* parse resource, register stuff, return unique id */
|
||||
return ++mcidevtype;
|
||||
}
|
||||
|
@ -1543,16 +1519,15 @@ static const char *_mciCommandToString(UINT16 wMsg)
|
|||
DWORD WINAPI mciSendCommand32A(UINT32 wDevID, UINT32 wMsg, DWORD dwParam1,
|
||||
DWORD dwParam2)
|
||||
{
|
||||
fprintf(stderr,"mciSendCommand32A(%08x,%s,%08lx,%08lx),stub!\n",
|
||||
wDevID,_mciCommandToString(wMsg),dwParam1,dwParam2
|
||||
);
|
||||
FIXME(mmsys,"(%08x,%s,%08lx,%08lx): stub!\n",
|
||||
wDevID,_mciCommandToString(wMsg),dwParam1,dwParam2);
|
||||
switch (wMsg) {
|
||||
case MCI_OPEN: {
|
||||
LPMCI_OPEN_PARMS32A lpmop = (LPMCI_OPEN_PARMS32A)dwParam2;
|
||||
fprintf(stderr," MCI_OPEN(%s,%s,%s)\n",
|
||||
(dwParam1&MCI_OPEN_TYPE) ?lpmop->lpstrDeviceType:"<null>",
|
||||
(dwParam1&MCI_OPEN_ELEMENT)?(HIWORD(lpmop->lpstrElementName)?lpmop->lpstrElementName:"<id>"):"<null>",
|
||||
(dwParam1&MCI_OPEN_ALIAS) ?lpmop->lpstrAlias:"<null>"
|
||||
TRACE(mmsys," MCI_OPEN(%s,%s,%s)\n",
|
||||
(dwParam1&MCI_OPEN_TYPE) ?lpmop->lpstrDeviceType:"<null>",
|
||||
(dwParam1&MCI_OPEN_ELEMENT)?(HIWORD(lpmop->lpstrElementName)?lpmop->lpstrElementName:"<id>"):"<null>",
|
||||
(dwParam1&MCI_OPEN_ALIAS) ?lpmop->lpstrAlias:"<null>"
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
@ -2043,7 +2018,7 @@ UINT16 WINAPI midiOutCachePatches16(HMIDIOUT16 hMidiOut, UINT16 uBank,
|
|||
WORD * lpwPatchArray, UINT16 uFlags)
|
||||
{
|
||||
/* not really necessary to support this */
|
||||
fprintf(stdnimp, "midiOutCachePatches: not supported yet\n");
|
||||
FIXME(mmsys, "not supported yet\n");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -2062,7 +2037,7 @@ UINT32 WINAPI midiOutCacheDrumPatches32(HMIDIOUT32 hMidiOut, UINT32 uPatch,
|
|||
UINT16 WINAPI midiOutCacheDrumPatches16(HMIDIOUT16 hMidiOut, UINT16 uPatch,
|
||||
WORD * lpwKeyArray, UINT16 uFlags)
|
||||
{
|
||||
fprintf(stdnimp, "midiOutCacheDrumPatchesi: not supported yet\n");
|
||||
FIXME(mmsys, "not supported yet\n");
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -2102,7 +2077,7 @@ DWORD WINAPI midiOutMessage32(HMIDIOUT32 hMidiOut, UINT32 uMessage,
|
|||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
switch (uMessage) {
|
||||
case MODM_OPEN:
|
||||
fprintf(stderr,"midiOutMessage32: can't handle MODM_OPEN!\n");
|
||||
FIXME(mmsys,"can't handle MODM_OPEN!\n");
|
||||
return 0;
|
||||
case MODM_GETDEVCAPS:
|
||||
return midiOutGetDevCaps32A(hMidiOut,(LPMIDIOUTCAPS32A)dwParam1,dwParam2);
|
||||
|
@ -2117,9 +2092,8 @@ DWORD WINAPI midiOutMessage32(HMIDIOUT32 hMidiOut, UINT32 uMessage,
|
|||
/* no argument conversion needed */
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"unhandled midiOutMessage32(%04x,%04x,%08lx,%08lx)\n",
|
||||
hMidiOut,uMessage,dwParam1,dwParam2
|
||||
);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
hMidiOut,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return modMessage(0, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -2139,7 +2113,7 @@ DWORD WINAPI midiOutMessage16(HMIDIOUT16 hMidiOut, UINT16 uMessage,
|
|||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
switch (uMessage) {
|
||||
case MODM_OPEN:
|
||||
fprintf(stderr,"midiOutMessage16: can't handle MODM_OPEN!\n");
|
||||
FIXME(mmsys,"can't handle MODM_OPEN!\n");
|
||||
return 0;
|
||||
case MODM_GETNUMDEVS:
|
||||
case MODM_RESET:
|
||||
|
@ -2156,9 +2130,8 @@ DWORD WINAPI midiOutMessage16(HMIDIOUT16 hMidiOut, UINT16 uMessage,
|
|||
case MODM_UNPREPARE:
|
||||
return midiOutUnprepareHeader16(hMidiOut,(LPMIDIHDR)PTR_SEG_TO_LIN(dwParam1),dwParam2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled midiOutMessage16(%04x,%04x,%08lx,%08lx)\n",
|
||||
hMidiOut,uMessage,dwParam1,dwParam2
|
||||
);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
hMidiOut,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return modMessage(0, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -2474,7 +2447,7 @@ DWORD WINAPI midiInMessage32(HMIDIIN32 hMidiIn, UINT32 uMessage,
|
|||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
switch (uMessage) {
|
||||
case MIDM_OPEN:
|
||||
fprintf(stderr,"midiInMessage32: can't handle MIDM_OPEN!\n");
|
||||
FIXME(mmsys,"can't handle MIDM_OPEN!\n");
|
||||
return 0;
|
||||
case MIDM_GETDEVCAPS:
|
||||
return midiInGetDevCaps32A(hMidiIn,(LPMIDIINCAPS32A)dwParam1,dwParam2);
|
||||
|
@ -2492,9 +2465,8 @@ DWORD WINAPI midiInMessage32(HMIDIIN32 hMidiIn, UINT32 uMessage,
|
|||
case MIDM_ADDBUFFER:
|
||||
return midiInAddBuffer32(hMidiIn,(LPMIDIHDR)dwParam1,dwParam2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled midiInMessage32(%04x,%04x,%08lx,%08lx)\n",
|
||||
hMidiIn,uMessage,dwParam1,dwParam2
|
||||
);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
hMidiIn,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return midMessage(0, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -2513,7 +2485,7 @@ DWORD WINAPI midiInMessage16(HMIDIIN16 hMidiIn, UINT16 uMessage,
|
|||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
switch (uMessage) {
|
||||
case MIDM_OPEN:
|
||||
fprintf(stderr,"midiInMessage16: can't handle MIDM_OPEN!\n");
|
||||
WARN(mmsys,"can't handle MIDM_OPEN!\n");
|
||||
return 0;
|
||||
case MIDM_GETDEVCAPS:
|
||||
return midiInGetDevCaps16(hMidiIn,(LPMIDIINCAPS16)PTR_SEG_TO_LIN(dwParam1),dwParam2);
|
||||
|
@ -2531,9 +2503,8 @@ DWORD WINAPI midiInMessage16(HMIDIIN16 hMidiIn, UINT16 uMessage,
|
|||
case MIDM_ADDBUFFER:
|
||||
return midiInAddBuffer16(hMidiIn,(LPMIDIHDR)PTR_SEG_TO_LIN(dwParam1),dwParam2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled midiInMessage16(%04x,%04x,%08lx,%08lx)\n",
|
||||
hMidiIn,uMessage,dwParam1,dwParam2
|
||||
);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
hMidiIn,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return midMessage(0, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -3094,12 +3065,11 @@ DWORD WINAPI waveOutMessage32(HWAVEOUT32 hWaveOut, UINT32 uMessage,
|
|||
/* FIXME: UNICODE/ANSI? */
|
||||
return waveOutGetDevCaps32A(hWaveOut,(LPWAVEOUTCAPS32A)dwParam1,dwParam2);
|
||||
case WODM_OPEN:
|
||||
fprintf(stderr,"waveOutMessage32 can't handle WODM_OPEN, please report.\n");
|
||||
FIXME(mmsys,"can't handle WODM_OPEN, please report.\n");
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"unhandled waveOutMessage32(0x%04x,0x%04x,%08lx,%08lx)\n",
|
||||
hWaveOut,uMessage,dwParam1,dwParam2
|
||||
);
|
||||
ERR(mmsys,"(0x%04x,0x%04x,%08lx,%08lx): unhandled message\n",
|
||||
hWaveOut,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return wodMessage( lpDesc->uDeviceID, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -3143,12 +3113,11 @@ DWORD WINAPI waveOutMessage16(HWAVEOUT16 hWaveOut, UINT16 uMessage,
|
|||
case WODM_WRITE:
|
||||
return waveOutWrite16(hWaveOut,(LPWAVEHDR)PTR_SEG_TO_LIN(dwParam1),dwParam2);
|
||||
case WODM_OPEN:
|
||||
fprintf(stderr,"waveOutMessage16 can't handle WODM_OPEN, please report.\n");
|
||||
FIXME(mmsys,"can't handle WODM_OPEN, please report.\n");
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"unhandled waveOutMessage16(0x%04x,0x%04x,%08lx,%08lx)\n",
|
||||
hWaveOut,uMessage,dwParam1,dwParam2
|
||||
);
|
||||
ERR(mmsys,"(0x%04x,0x%04x,%08lx,%08lx): unhandled message\n",
|
||||
hWaveOut,uMessage,dwParam1,dwParam2);
|
||||
}
|
||||
return wodMessage( lpDesc->uDeviceID, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
}
|
||||
|
@ -3589,13 +3558,13 @@ DWORD WINAPI waveInMessage32(HWAVEIN32 hWaveIn, UINT32 uMessage,
|
|||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
|
||||
fprintf(stderr, "waveInMessage32(%04X, %04X, %08lX, %08lX),FIXME!\n",
|
||||
hWaveIn, uMessage, dwParam1, dwParam2);
|
||||
FIXME(mmsys, "(%04X, %04X, %08lX, %08lX),FIXME!\n",
|
||||
hWaveIn, uMessage, dwParam1, dwParam2);
|
||||
lpDesc = (LPWAVEOPENDESC) USER_HEAP_LIN_ADDR(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
switch (uMessage) {
|
||||
case WIDM_OPEN:
|
||||
fprintf(stderr,"waveInMessage32: cannot handle WIDM_OPEN, please report.\n");
|
||||
FIXME(mmsys, "cannot handle WIDM_OPEN, please report.\n");
|
||||
break;
|
||||
case WIDM_GETNUMDEVS:
|
||||
case WIDM_GETPOS:
|
||||
|
@ -3613,7 +3582,8 @@ DWORD WINAPI waveInMessage32(HWAVEIN32 hWaveIn, UINT32 uMessage,
|
|||
/*FIXME: ANSI/UNICODE */
|
||||
return waveInGetDevCaps32A(hWaveIn,(LPWAVEINCAPS32A)dwParam1,dwParam2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled waveInMessage32(%04x,%04x,%08lx,%08lx)\n",hWaveIn,uMessage,dwParam1,dwParam2);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
hWaveIn,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return widMessage(lpDesc->uDeviceID, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -3627,13 +3597,13 @@ DWORD WINAPI waveInMessage16(HWAVEIN16 hWaveIn, UINT16 uMessage,
|
|||
{
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
|
||||
fprintf(stderr, "waveInMessage(%04X, %04X, %08lX, %08lX),FIXME!\n",
|
||||
hWaveIn, uMessage, dwParam1, dwParam2);
|
||||
FIXME(mmsys, "(%04X, %04X, %08lX, %08lX),FIXME!\n",
|
||||
hWaveIn, uMessage, dwParam1, dwParam2);
|
||||
lpDesc = (LPWAVEOPENDESC) USER_HEAP_LIN_ADDR(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
switch (uMessage) {
|
||||
case WIDM_OPEN:
|
||||
fprintf(stderr,"waveInMessage16: cannot handle WIDM_OPEN, please report.\n");
|
||||
FIXME(mmsys,"cannot handle WIDM_OPEN, please report.\n");
|
||||
break;
|
||||
case WIDM_GETNUMDEVS:
|
||||
case WIDM_CLOSE:
|
||||
|
@ -3654,7 +3624,8 @@ DWORD WINAPI waveInMessage16(HWAVEIN16 hWaveIn, UINT16 uMessage,
|
|||
case WIDM_ADDBUFFER:
|
||||
return waveInAddBuffer16(hWaveIn,(LPWAVEHDR)PTR_SEG_TO_LIN(dwParam1),dwParam2);
|
||||
default:
|
||||
fprintf(stderr,"unhandled waveInMessage16(%04x,%04x,%08lx,%08lx)\n",hWaveIn,uMessage,dwParam1,dwParam2);
|
||||
ERR(mmsys,"(%04x,%04x,%08lx,%08lx): unhandled message\n",
|
||||
hWaveIn,uMessage,dwParam1,dwParam2);
|
||||
break;
|
||||
}
|
||||
return widMessage(lpDesc->uDeviceID, uMessage, lpDesc->dwInstance, dwParam1, dwParam2);
|
||||
|
@ -3716,9 +3687,7 @@ LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverID, HDRVR16 hDriv, WORD wMsg,
|
|||
* mmThreadCreate [MMSYSTEM.1120]
|
||||
*/
|
||||
LRESULT WINAPI mmThreadCreate16(LPVOID x1, LPWORD x2, DWORD x3, DWORD x4) {
|
||||
fprintf(stderr,"mmThreadCreate16(%p,%p,%08lx,%08lx),stub!\n",
|
||||
x1,x2,x3,x4
|
||||
);
|
||||
FIXME(mmsys,"(%p,%p,%08lx,%08lx): stub!\n",x1,x2,x3,x4);
|
||||
*x2 = 0xbabe;
|
||||
return 0;
|
||||
}
|
||||
|
@ -3727,7 +3696,7 @@ LRESULT WINAPI mmThreadCreate16(LPVOID x1, LPWORD x2, DWORD x3, DWORD x4) {
|
|||
* mmThreadGetTask [MMSYSTEM.1125]
|
||||
*/
|
||||
LRESULT WINAPI mmThreadGetTask16(WORD hnd) {
|
||||
fprintf(stderr,"mmThreadGetTask16(%04x),stub!\n",hnd);
|
||||
FIXME(mmsys,"(%04x): stub!\n",hnd);
|
||||
return GetCurrentTask();
|
||||
}
|
||||
|
||||
|
@ -3735,7 +3704,7 @@ LRESULT WINAPI mmThreadGetTask16(WORD hnd) {
|
|||
* mmThreadSignal [MMSYSTEM.1121]
|
||||
*/
|
||||
LRESULT WINAPI mmThreadSignal16(WORD hnd) {
|
||||
fprintf(stderr,"mmThreadSignal16(%04x), stub!\n",hnd);
|
||||
FIXME(mmsys,"(%04x): stub!\n",hnd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3743,7 +3712,7 @@ LRESULT WINAPI mmThreadSignal16(WORD hnd) {
|
|||
* mmTaskCreate [MMSYSTEM.900]
|
||||
*/
|
||||
LRESULT WINAPI mmTaskCreate16(LPWORD lphnd,DWORD x1,DWORD x2) {
|
||||
fprintf(stderr,"mmTaskCreate16(%p,%08lx,%08lx),stub!\n",lphnd,x1,x2);
|
||||
FIXME(mmsys,"(%p,%08lx,%08lx): stub!\n",lphnd,x1,x2);
|
||||
*lphnd = 0xcafe;
|
||||
return 0;
|
||||
}
|
||||
|
@ -3752,7 +3721,7 @@ LRESULT WINAPI mmTaskCreate16(LPWORD lphnd,DWORD x1,DWORD x2) {
|
|||
* mmTaskSignal [MMSYSTEM.903]
|
||||
*/
|
||||
LRESULT WINAPI mmTaskSignal16(HTASK16 ht) {
|
||||
fprintf(stderr,"mmTaskSignal(%04x),stub!\n",ht);
|
||||
FIXME(mmsys,"(%04x): stub!\n",ht);
|
||||
return PostAppMessage16(ht,0x400,0,0);
|
||||
}
|
||||
|
||||
|
@ -3760,7 +3729,7 @@ LRESULT WINAPI mmTaskSignal16(HTASK16 ht) {
|
|||
* mciDriverYield [MMSYSTEM.710]
|
||||
*/
|
||||
LRESULT WINAPI mciDriverYield16(HANDLE16 hnd) {
|
||||
fprintf(stderr,"mciDriverYield16(%04x),stub!\n",hnd);
|
||||
FIXME(mmsys,"(%04x): stub!\n",hnd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue