Release 980614

Sun Jun 15 10:30:35 1998  Andreas Mohr <100.30936@germany.net>

	* [files/dos_fs.c] [files/file.c] [if1632/wprocs.spec]
	  [misc/aspi.c]
	Added support for scanners that need Adaptec's ASPI2DOS.

	* [graphics/env.c] [misc/printerdrv.c] [graphics/win16drv/init.c]
	  [if1632/gdi.spec] [include/gdi.h]
	Enhanced printer support (especially Win95):
	Drv[GS]etPrinterData, [GS]etEnvironment; added AbortProc handling.

	* [misc/tapi32.c] [relay32/tapi32.spec]
	Added some stubs.

	* [configure.in] [graphics/fontengine.c] [include/windows.h]
	  [misc/comm.c] [misc/w32skrnl.c] [misc/win32s16.c]
	Made Wine compile on HP-UX (just for fun ;)

	* [controls/menu.c] [include/windows.h]
	Complete rewrite of EnableMenuItem32.
	Free Agent 32 still doesn't work :(

	* [misc/version.c] [if1632/kernel.spec] [include/winbase.h]
	Implemented GetVersionEx16.

	* [misc/network.c] [if1632/user.spec]
	Fixed arguments of WNetGetPropertyText.

	* [misc/version.c] [relay32/comctl32.spec] [relay32/oleaut32.spec]
	Implemented COMCTL32_DllGetVersion, OaBuildVersion.

	* [win32/file.c]
	Fixed UNC handling of CreateFile32.

Sat Jun 13 22:35:12 1998  Douglas Ridgway  <ridgway@winehq.com>

	* [Makefile.in] [Make.rules.in]
	Added pattern for CVS merge files to 'make clean'

	* [ole/olecli.c] [windows/scroll.c] [windows/grahics.c]
	Add some DC handle unlocking. (When hdc's are always unlocked,
	they can be made moveable.)

	* [documentation/wine.texinfo] 
	Started a Wine Design chapter with discussion of 
	graphics driver model.

Sat Jun 13 11:19:25 1998  David Luyer <luyer@ucs.uwa.edu.au>

	* [misc/main.c] [relay32/relay386.c]
	Added new option -debugmsg +relay=.... or -debugmsg -relay=...

Fri Jun 12 22:56:09 1998  Marcus Meissner <marcus@jet.franken.de>

	* [relay32/snoop.c][relay32/builtin.c][loader/pe_image.c]
	Added inter win32 dll snooping. Use -debugmsg +snoop.
	Number of arguments and string references are autodetected.
	Some small bugfixes in the PE loader.

	* [misc/system.c]
	Disabled SystemTimers. They do not work with the current
	%fs handling in the 32->16 relaycode. (helps labview)

	* [msdos/dpmi.c][msdos/int2f.c][files/drive.c]
	Added a monoton linear increasing memory allocator for DPMI (required
	for LabView, HAFAS, ...)
	mscdex handling in emulated realmode interrupts (for mcicda.drv)
	allocate logical drives only once. (helps Myst)

	* [files/profile.c]
	Handle ^Z as space. Found on CDROMS (helps Myst Installer).

	* [multimedia/mmio.c]
	mmio* partially updated to win32. No funny additions.

	* [windows/driver.c]
	Added win32 driver handling (will be used for win32 multimedia/
	msvideo drivers).

	* [win32/device.c]
	Added device handling (K32OBJ_DEVICE_IOCTL). Implemented 
	VTDAPI.5 (used by win95' WINMM.timeGetTime())

Fri Jun 12 18:01:18 1998 Rein Klazes <rklazes@casema.net>

	* [ole/compobj.c relay32/ole32.spec]
	Add a stub for CoLockObjectExternal32.

	* [objects/clipping.c]
	Fix in IntersectClipRect(), when there is no initial clipping
	region.

	* [graphics/x11drv/graphics.c]
	Corrected several "one-off" errors for the Ellipse, Rectangle
	and RoundRectangle (especially small ones) draw routines. 
	Arc and friends still have to be done.

Fri Jun 12 06:23:19 1998  Matthew Becker <mbecker@glasscity.net>

	* [misc/ntdll.c]
	Fixed some of the parameter counts.

	* [misc/registry.c]
	General cleanup, documentation.
	Standard keys are allowed to be 'closed' and succeed.

	* [misc/shell.c]
	Check for correct return values from Reg* functions.

	* [win32/newfns.c]
	Added stubs for OpenDesktopA, SetThreadDesktop, and
	SetUserObjectInformationA.

Wed Jun 10  20:28:08 1998  James Juran  <jrj120@psu.edu>

	* [debugger/break.c]
	Fixed bug introduced in 980503 that broke the -debug command 
	line option for PE executable files.

	* [configure.in] [include/acconfig.h] [include/debugtools.h]
	  [documentation/debug-msgs]
	Added 'configure' options to compile out debugging messages.
	Use --disable-debug to disable all debugging messages, and
	--disable-trace to just disable TRACE messages.  This results
	in a stripped executable that is 15-20% smaller.  This option
	is very much untested--don't expect it to work.

	* [documentation/debug-msgs] [documentation/debugging]
	Minor updates.

	* [*/*.c]
	Fixed some compile warnings.  This also includes the
	compile_warnings_trivial patch from WineHQ.

Tue Jun 10 22:00:18 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [windows/sysmetrics.c][include/sysmetrics.h]
	Fixed some Win95 values.

	* [windows/nonclient.c][include/windows.h]
	Fixed some Win95 drawing bugs.
	Added extended window style flags (WS_EX_xxx).

	* [misc/printdrv.c][relay32/winspool.spec]
	Added stubs for DeletePrinterDriver32A, DeleteMonitor32A
	and DeletePort32A.

	* [windows/mdi.c][include/windows.h][relay32/user32.spec]
	Added stubs for CascadeWindows and TileWindows.

	* [controls/toolbar.c][include/toolbar.h]
	Fixed a few bugs and implemented new features.

	* [misc/shellord.c][relay32/shell32.spec]
	Added stubs for SHELL32_60, SHELL32_61 and SHELL32_184.

	* [controls/comctl32undoc.c][relay32/comctl32.spec]
	New file comctl32undoc.c. Contains undocumented functions
	of COMCTL32.DLL. These functions are needed to run EXPLORER.EXE
	IEXPLORE.EXE and TASKMAN.EXE.

	* [controls/status.c]
	Added text alignment.

Tue Jun  8 22:00:00 1998  Bertho Stultiens <bertho@akhphd.au.dk>

	* [programs/*/Makefile.in]
	Changed the rules to use wrc as resource compiler but
	passing the source through gcc first for macro expansion.

	* [programs/*/*.rc]
	Added #include "windows.h" for the resource compiler in the
	appropriate files.

	* [tools/wrc/wrc.[ch]] [tools/wrc/writeres.c]
	Added commandline option -A for autoregister code.
	Corrected the underscore problem by checking the proper define
	from config.h.

Sun Jun  7 22:09:29 1998  Pascal Cuoq <pcuoq@ens-lyon.fr>

	* [ole/ole2nls.c] [memory/string.c]
	Improved LCMapString32A, and changed CompareString32A,
	lstrcmp, lstrcmpi to use it.

Sat Jun  6 19:00:50 1998  Martin Strmberg <ams@ludd.luth.se>

	* [include/winnt.h]
	Added typedefs for security and tokens.

Sat Jun  6 12:26:31 1998  Morten Welinder  <terra@diku.dk>

	* [objects/text.c]
	Use debugstr_an in DrawText16.

	* [loader/resource.c]
	Use debugres_w in FindResourceEx32W.  Avoid crashing during
	debug when wm is NULL.

	* [if1632/relay.c]
	In RELAY_DebugCallTo16, send output to the right place and
	avoid side effects in macro arguments.

Wed Jun  3 20:56:03 1998  Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>

	* [controls/scroll.c] [windows/nonclient.c]
	Fix several off by one errors in scrollbar painting.

Tue Jun  2 23:58:59 1998  Insomnia (Stea Greene) <insomnia@core.binghamton.edu>

	* [graphics/dsound.c]
	Rewrote mixer code to handle panning and volume for 16->16, 16->8,
	8->16, and 8->8 bit mixes.  Conforms to DirectX's "logarithmic
	hearing scale" as specified in M$VC docs.  Still does not handle
	mixing of different frequencies (I am still working on that). 
	Tested 16->16 extensively with StarCraft.  Other mixing combinations
	untested but should work fine.  Still kind of a work in progress,
	so be warned.

Tue Jun  2 03:31:33 1998  Alexander V. Lukyanov <lav@long.yar.ru>

	* [tools/wrc/utils.c]
	dup_basename: fix to strip directory.

Mon Jun  1 20:00:00 1998  Juergen Schmied <juergen.schmied@metronet.de>

	* [include/windows.h] [objects/cursoricon.c] [relay32/user32.spec]
	Added stubs LoadCursorFromFileW and LoadCursorFromFileA.
This commit is contained in:
Alexandre Julliard 1998-06-14 15:24:15 +00:00
parent a845b88ead
commit f90efa9cf0
177 changed files with 6035 additions and 1839 deletions

View File

@ -1,14 +1,13 @@
This is release 980601 of Wine, the MS Windows emulator. This is still a
This is release 980614 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-980601: (see ChangeLog for details)
- New resource compiler.
- Toolbar control.
- Partial implementation of CreateDIBSection.
WHAT'S NEW with Wine-980614: (see ChangeLog for details)
- Many drawing fixes.
- Inter-DLL calls snooping.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
@ -17,10 +16,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-980601.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980601.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980601.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980601.tar.gz
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980614.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980614.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980614.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980614.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.

18
BUGS
View File

@ -5,26 +5,27 @@ done something for one of the problems. You are encouraged to
add new entries and, more importantly, remove those for the
bugs you fixed ;-)
------------------------------------------------------------
As of Dec 1997 -
As of Jun 1998 -
General:
* TrueType, .FON rasterizer.
* No thread/process scheduling support in Win32 code.
* Incomplete thread/process scheduling support in Win32 code.
* Very alpha printing code. [john@division.co.uk]
* Very alpha printing code using win16 drivers.
We should add a WINE internal PostScript driver (all other printers
can be supported using ghostscript filters).
* Extremely alpha Win95 interface code.
* No OLE2 and OLE32 support (including OLE2 interfaces etc.).
* No MS Video support (perhaps interface with xanim, don't hold
your breath for this one).
* No MS Video support. [just started, marcus@jet.franken.de]
* COMDLG32 support not complete yet.
* COMDLG32 support not complete yet [bertho@akhphd.au.dk?]
* No COMMCTRL/COMCTL32 support.
* COMMCTRL/COMCTL32 support in progress [ekohl@abo.rhein-zeitung.de].
* No manual pages describing the various Windows calls.
- You can find information about most of the Win32 API calls
@ -38,6 +39,7 @@ Miscellaneous:
* 16-bit Eudora 1.5.2 goes into recursion trying to display
a horizontal scrollbar (SetScrollPos() artifact).
Windows95 telnet.exe and NT 3.51 telnet.exe exhibit the same behaviour.
* mIRC 'commands' menu stays on top and will not refresh.
@ -53,7 +55,7 @@ Miscellaneous:
(probably because of bytes width stuff).
* Netscape displays partially downloaded inline graphics with
wrong offsets.
wrong offsets.
* Text alignment problems in Word and Write (variable pitch fonts).

209
ChangeLog
View File

@ -1,3 +1,212 @@
----------------------------------------------------------------------
Sun Jun 15 10:30:35 1998 Andreas Mohr <100.30936@germany.net>
* [files/dos_fs.c] [files/file.c] [if1632/wprocs.spec]
[misc/aspi.c]
Added support for scanners that need Adaptec's ASPI2DOS.
* [graphics/env.c] [misc/printerdrv.c] [graphics/win16drv/init.c]
[if1632/gdi.spec] [include/gdi.h]
Enhanced printer support (especially Win95):
Drv[GS]etPrinterData, [GS]etEnvironment; added AbortProc handling.
* [misc/tapi32.c] [relay32/tapi32.spec]
Added some stubs.
* [configure.in] [graphics/fontengine.c] [include/windows.h]
[misc/comm.c] [misc/w32skrnl.c] [misc/win32s16.c]
Made Wine compile on HP-UX (just for fun ;)
* [controls/menu.c] [include/windows.h]
Complete rewrite of EnableMenuItem32.
Free Agent 32 still doesn't work :(
* [misc/version.c] [if1632/kernel.spec] [include/winbase.h]
Implemented GetVersionEx16.
* [misc/network.c] [if1632/user.spec]
Fixed arguments of WNetGetPropertyText.
* [misc/version.c] [relay32/comctl32.spec] [relay32/oleaut32.spec]
Implemented COMCTL32_DllGetVersion, OaBuildVersion.
* [win32/file.c]
Fixed UNC handling of CreateFile32.
Sat Jun 13 22:35:12 1998 Douglas Ridgway <ridgway@winehq.com>
* [Makefile.in] [Make.rules.in]
Added pattern for CVS merge files to 'make clean'
* [ole/olecli.c] [windows/scroll.c] [windows/grahics.c]
Add some DC handle unlocking. (When hdc's are always unlocked,
they can be made moveable.)
* [documentation/wine.texinfo]
Started a Wine Design chapter with discussion of
graphics driver model.
Sat Jun 13 11:19:25 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [misc/main.c] [relay32/relay386.c]
Added new option -debugmsg +relay=.... or -debugmsg -relay=...
Fri Jun 12 22:56:09 1998 Marcus Meissner <marcus@jet.franken.de>
* [relay32/snoop.c][relay32/builtin.c][loader/pe_image.c]
Added inter win32 dll snooping. Use -debugmsg +snoop.
Number of arguments and string references are autodetected.
Some small bugfixes in the PE loader.
* [misc/system.c]
Disabled SystemTimers. They do not work with the current
%fs handling in the 32->16 relaycode. (helps labview)
* [msdos/dpmi.c][msdos/int2f.c][files/drive.c]
Added a monoton linear increasing memory allocator for DPMI (required
for LabView, HAFAS, ...)
mscdex handling in emulated realmode interrupts (for mcicda.drv)
allocate logical drives only once. (helps Myst)
* [files/profile.c]
Handle ^Z as space. Found on CDROMS (helps Myst Installer).
* [multimedia/mmio.c]
mmio* partially updated to win32. No funny additions.
* [windows/driver.c]
Added win32 driver handling (will be used for win32 multimedia/
msvideo drivers).
* [win32/device.c]
Added device handling (K32OBJ_DEVICE_IOCTL). Implemented
VTDAPI.5 (used by win95' WINMM.timeGetTime())
Fri Jun 12 18:01:18 1998 Rein Klazes <rklazes@casema.net>
* [ole/compobj.c relay32/ole32.spec]
Add a stub for CoLockObjectExternal32.
* [objects/clipping.c]
Fix in IntersectClipRect(), when there is no initial clipping
region.
* [graphics/x11drv/graphics.c]
Corrected several "one-off" errors for the Ellipse, Rectangle
and RoundRectangle (especially small ones) draw routines.
Arc and friends still have to be done.
Fri Jun 12 06:23:19 1998 Matthew Becker <mbecker@glasscity.net>
* [misc/ntdll.c]
Fixed some of the parameter counts.
* [misc/registry.c]
General cleanup, documentation.
Standard keys are allowed to be 'closed' and succeed.
* [misc/shell.c]
Check for correct return values from Reg* functions.
* [win32/newfns.c]
Added stubs for OpenDesktopA, SetThreadDesktop, and
SetUserObjectInformationA.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/sysmetrics.c][include/sysmetrics.h]
Fixed some Win95 values.
* [windows/nonclient.c][include/windows.h]
Fixed some Win95 drawing bugs.
Added extended window style flags (WS_EX_xxx).
* [misc/printdrv.c][relay32/winspool.spec]
Added stubs for DeletePrinterDriver32A, DeleteMonitor32A
and DeletePort32A.
* [windows/mdi.c][include/windows.h][relay32/user32.spec]
Added stubs for CascadeWindows and TileWindows.
* [controls/toolbar.c][include/toolbar.h]
Fixed a few bugs and implemented new features.
* [misc/shellord.c][relay32/shell32.spec]
Added stubs for SHELL32_60, SHELL32_61 and SHELL32_184.
* [controls/comctl32undoc.c][relay32/comctl32.spec]
New file comctl32undoc.c. Contains undocumented functions
of COMCTL32.DLL. These functions are needed to run EXPLORER.EXE
IEXPLORE.EXE and TASKMAN.EXE.
* [controls/status.c]
Added text alignment.
Tue Jun 8 22:00:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [programs/*/Makefile.in]
Changed the rules to use wrc as resource compiler but
passing the source through gcc first for macro expansion.
* [programs/*/*.rc]
Added #include "windows.h" for the resource compiler in the
appropriate files.
* [tools/wrc/wrc.[ch]] [tools/wrc/writeres.c]
Added commandline option -A for autoregister code.
Corrected the underscore problem by checking the proper define
from config.h.
Sun Jun 7 22:09:29 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c] [memory/string.c]
Improved LCMapString32A, and changed CompareString32A,
lstrcmp, lstrcmpi to use it.
Sat Jun 6 19:00:50 1998 Martin Strömberg <ams@ludd.luth.se>
* [include/winnt.h]
Added typedefs for security and tokens.
Sat Jun 6 12:26:31 1998 Morten Welinder <terra@diku.dk>
* [objects/text.c]
Use debugstr_an in DrawText16.
* [loader/resource.c]
Use debugres_w in FindResourceEx32W. Avoid crashing during
debug when wm is NULL.
* [if1632/relay.c]
In RELAY_DebugCallTo16, send output to the right place and
avoid side effects in macro arguments.
Wed Jun 3 20:56:03 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [controls/scroll.c] [windows/nonclient.c]
Fix several off by one errors in scrollbar painting.
Tue Jun 2 23:58:59 1998 Insomnia (Stea Greene) <insomnia@core.binghamton.edu>
* [graphics/dsound.c]
Rewrote mixer code to handle panning and volume for 16->16, 16->8,
8->16, and 8->8 bit mixes. Conforms to DirectX's "logarithmic
hearing scale" as specified in M$VC docs. Still does not handle
mixing of different frequencies (I am still working on that).
Tested 16->16 extensively with StarCraft. Other mixing combinations
untested but should work fine. Still kind of a work in progress,
so be warned.
Tue Jun 2 03:31:33 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [tools/wrc/utils.c]
dup_basename: fix to strip directory.
Mon Jun 1 20:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [include/windows.h] [objects/cursoricon.c] [relay32/user32.spec]
Added stubs LoadCursorFromFileW and LoadCursorFromFileA.
----------------------------------------------------------------------
Sun May 31 13:40:13 1998 Alexandre Julliard <julliard@lrc.epfl.ch>

View File

@ -155,7 +155,7 @@ depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
clean::
$(RM) *.o \#*\# *~ *% *.bak *.orig *.rej *.flc *-tmp.c y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
$(RM) *.o \#*\# *~ *% .#* *.bak *.orig *.rej *.flc *-tmp.c y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
dummy:

View File

@ -24,7 +24,6 @@ VPATH = @srcdir@
MODULE = none
LIBSUBDIRS = \
rc \
tools \
tools/wrc \
controls \
@ -160,8 +159,8 @@ htmlpages:
clean::
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
for i in include; do (cd $$i; $(RM) *.o \#*\# *~ *% *.bak *.orig *.rej *.flc); done
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
distclean: clean
$(RM) config.* Make.rules include/config.h

320
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,8 @@ dnl **** Command-line arguments ****
dnl Default values
MAIN_TARGET=emu
LIB_TARGET=libwine.a
TRACE_MSGS=yes # the TRACE() macro
DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
AC_ARG_ENABLE(emulator,
[ --disable-emulator build only the Wine library, not the emulator],
@ -28,6 +30,14 @@ dnl AC_ARG_WITH(ipc,
dnl [ --enable-ipc use inter-process communication for DDE],
dnl [if test "$enableval" = "no"; then : ; else OPTIONS="-DCONFIG_IPC"; fi])
AC_ARG_ENABLE(debug,
[ --disable-debug compile out all debugging messages],
[if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
AC_ARG_ENABLE(trace,
[ --disable-trace compile out TRACE messages],
[if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
AC_ARG_WITH(reentrant-x,
[ --without-reentrant-x Compile for use with non-reentrant X libraries])
@ -35,6 +45,17 @@ AC_SUBST(MAIN_TARGET)
AC_SUBST(LIB_TARGET)
AC_SUBST(OPTIONS)
if test "$DEBUG_MSGS" = "no"
then
AC_DEFINE(NO_DEBUG_MSGS)
AC_DEFINE(NO_TRACE_MSGS)
else
if test "$TRACE_MSGS" = "no"
then
AC_DEFINE(NO_TRACE_MSGS)
fi
fi
dnl **** Check for some programs ****
AC_PROG_MAKE_SET
@ -215,7 +236,7 @@ fi
dnl **** Check for functions and header files ****
AC_CHECK_FUNCS(clone getpagesize memmove sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid)
AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h sys/cdio.h sys/filio.h)
AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h)
AC_HEADER_STAT()
AC_C_CONST()
AC_TYPE_SIZE_T()

View File

@ -8,6 +8,7 @@ MODULE = controls
C_SRCS = \
button.c \
combo.c \
comctl32undoc.c \
commctrl.c \
desktop.c \
edit.c \

333
controls/comctl32undoc.c Normal file
View File

@ -0,0 +1,333 @@
/*
* Undocumented functions from COMCTL32.DLL
*
* Copyright 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
*
* NOTES
* All of these functions are UNDOCUMENTED!! And I mean UNDOCUMENTED!!!!
* Do NOT rely on names of undocumented structures and types!!!
* These functions are used by EXPLORER.EXE, IEXPLORE.EXE and
* COMCTL32.DLL (internally).
*
* TODO
* - Fix DSA_InsertItem.
* - Write documentation.
*/
#include <string.h>
#include "windows.h"
#include "heap.h"
#include "debug.h"
typedef struct _DSA_DATA
{
DWORD dwEntryCount;
DWORD dwMaxCount;
DWORD dwInitial;
DWORD dwGrow;
LPSTR *ptrs;
} DSA_DATA, *LPDSA_DATA;
typedef struct _DPA_DATA
{
DWORD dwEntryCount;
DWORD dwMaxCount;
DWORD dwGrow;
LPDWORD ptrs;
} DPA_DATA, *LPDPA_DATA;
DWORD WINAPI Alloc (DWORD);
DWORD WINAPI ReAlloc (DWORD, DWORD);
DWORD WINAPI Free (DWORD);
DWORD WINAPI DSA_Create (DWORD, DWORD);
DWORD WINAPI DPA_Create (DWORD);
DWORD WINAPI DPA_GetPtr (DWORD, DWORD);
DWORD WINAPI DPA_InsertPtr (DWORD, DWORD, DWORD);
LPSTR WINAPI COMCTL32_StrChrA (LPSTR lpString, CHAR cChar);
DWORD WINAPI
Alloc (DWORD dwParam1)
{
DWORD dwPtr;
dwPtr = (DWORD)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, dwParam1);
TRACE (commctrl, "(0x%08lx) ret=0x%08lx\n", dwParam1, dwPtr);
return dwPtr;
}
DWORD WINAPI
ReAlloc (DWORD dwParam1, DWORD dwParam2)
{
DWORD dwPtr;
if (dwParam1 == 0)
dwPtr = (DWORD)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, dwParam2);
else
dwPtr = (DWORD)HeapReAlloc (SystemHeap, HEAP_ZERO_MEMORY,
(LPVOID)dwParam1, dwParam2);
TRACE (commctrl, "(0x%08lx 0x%08lx) ret=0x%08lx\n",
dwParam1, dwParam2, dwPtr);
return dwPtr;
}
DWORD WINAPI
Free (DWORD dwParam1)
{
TRACE (commctrl, "(0x%08lx)\n", dwParam1);
HeapFree (SystemHeap, 0, (LPVOID)dwParam1);
return 0;
}
DWORD WINAPI
DSA_Create (DWORD dwParam1, DWORD dwParam2)
{
LPDSA_DATA dsaPtr;
dsaPtr = (LPDSA_DATA)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, sizeof(DSA_DATA));
dsaPtr->dwInitial = dwParam1;
dsaPtr->dwGrow = dwParam2;
TRACE (commctrl, "(0x%08lx 0x%08lx) ret=0x%08lx\n",
dwParam1, dwParam2, (DWORD)dsaPtr);
return (DWORD)dsaPtr;
}
DWORD WINAPI
DSA_Destroy (DWORD dwParam1)
{
LPDSA_DATA dsaPtr = (LPDSA_DATA)dwParam1;
DWORD i;
TRACE (commctrl, "(0x%08lx):semi-stub!\n", dwParam1);
if (dsaPtr->ptrs) {
for (i = 0; i < dsaPtr->dwEntryCount; i++) {
if (dsaPtr->ptrs[i])
HeapFree (SystemHeap, 0, (LPSTR)dsaPtr->ptrs[i]);
}
}
HeapFree (SystemHeap, 0, dsaPtr);
return 0;
}
DWORD WINAPI
DSA_InsertItem (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
{
LPDSA_DATA dsaPtr = (LPDSA_DATA)dwParam1;
DWORD dwIndex;
INT32 len;
TRACE (commctrl, "(0x%08lx 0x%08lx \"%s\"):semi-stub!\n",
dwParam1, dwParam2, (LPSTR)dwParam3);
if (dsaPtr->ptrs == NULL) {
dsaPtr->ptrs = (LPSTR*)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
dsaPtr->dwInitial * sizeof(LPVOID));
dsaPtr->dwMaxCount = dsaPtr->dwInitial;
dwIndex = 0;
len = lstrlen32A ((LPSTR)dwParam3);
dsaPtr->ptrs[dwIndex] =
(LPSTR)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, len+1);
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
}
else {
TRACE (commctrl, "(0x%08lx 0x%08lx)\n",
dsaPtr->dwEntryCount, dsaPtr->dwMaxCount);
if (dwParam2 >= dsaPtr->dwEntryCount) {
if (dsaPtr->dwEntryCount < dsaPtr->dwMaxCount) {
dwIndex = dsaPtr->dwEntryCount;
len = lstrlen32A ((LPSTR)dwParam3);
dsaPtr->ptrs[dwIndex] =
(LPSTR)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, len+1);
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
}
else {
FIXME (commctrl, "resizing array! stub!\n");
dwIndex = dwParam2;
}
}
else {
FIXME (commctrl, "inserting! stub!\n");
dwIndex = dwParam2;
}
}
dsaPtr->dwEntryCount++;
TRACE (commctrl, "ret=0x%08lx\n", dwIndex);
return (dwIndex);
}
DWORD WINAPI
DSA_GetItemPtr (DWORD dwParam1, DWORD dwParam2)
{
LPDSA_DATA dsaPtr = (LPDSA_DATA)dwParam1;
TRACE (commctrl, "(0x%08lx 0x%08lx)\n", dwParam1, dwParam2);
if (dsaPtr == NULL)
return 0;
if (dsaPtr->ptrs == NULL)
return 0;
if ((dwParam2 < 0) || (dwParam2 >= dsaPtr->dwEntryCount))
return 0;
TRACE (commctrl, "ret=0x%08lx\n", (DWORD)dsaPtr->ptrs[dwParam2]);
return (DWORD)dsaPtr->ptrs[dwParam2];
}
DWORD WINAPI
DSA_DeleteItem (DWORD dwParam1, DWORD dwParam2)
{
LPDSA_DATA dsaPtr = (LPDSA_DATA)dwParam1;
TRACE (commctrl, "(0x%08lx 0x%08lx):semi-stub!\n",
dwParam1, dwParam2);
if (dsaPtr->ptrs) {
if (dsaPtr->dwEntryCount == 1) {
if (dsaPtr->ptrs[dwParam2])
HeapFree (SystemHeap, 0, dsaPtr->ptrs[dwParam2]);
dsaPtr->dwEntryCount--;
}
else {
LPSTR *oldPtrs = dsaPtr->ptrs;
TRACE (commctrl, "complex delete!\n");
if (dsaPtr->ptrs[dwParam2])
HeapFree (SystemHeap, 0, dsaPtr->ptrs[dwParam2]);
dsaPtr->dwEntryCount--;
dsaPtr->ptrs =
(LPSTR*)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
dsaPtr->dwEntryCount * sizeof(LPVOID));
if (dwParam2 > 0) {
memcpy (&dsaPtr->ptrs[0], &oldPtrs[0],
dwParam2 * sizeof(LPSTR));
}
if (dwParam2 < dsaPtr->dwEntryCount) {
memcpy (&dsaPtr->ptrs[dwParam2], &oldPtrs[dwParam2+1],
(dsaPtr->dwEntryCount - dwParam2) * sizeof(LPSTR));
}
HeapFree (SystemHeap, 0, oldPtrs);
}
if (dsaPtr->dwEntryCount == 0) {
HeapFree (SystemHeap, 0, dsaPtr->ptrs);
dsaPtr->ptrs = NULL;
}
}
return 0;
}
DWORD WINAPI
DPA_Create (DWORD dwParam1)
{
LPDPA_DATA dpaPtr;
TRACE (commctrl, "(0x%08lx)\n", dwParam1);
dpaPtr = (LPDPA_DATA)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, sizeof(DPA_DATA));
dpaPtr->dwGrow = dwParam1;
TRACE (commctrl, "ret=0x%08lx\n", (DWORD)dpaPtr);
return (DWORD)dpaPtr;
}
DWORD WINAPI
DPA_GetPtr (DWORD dwParam1, DWORD dwParam2)
{
LPDPA_DATA dpaPtr = (LPDPA_DATA)dwParam1;
TRACE (commctrl, "(0x%08lx 0x%08lx)\n", dwParam1, dwParam2);
if (dpaPtr == NULL)
return 0;
if (dpaPtr->ptrs == NULL)
return 0;
if ((dwParam2 < 0) || (dwParam2 >= dpaPtr->dwEntryCount))
return 0;
TRACE (commctrl, "ret=0x%08lx\n", (DWORD)dpaPtr->ptrs[dwParam2]);
return (DWORD)dpaPtr->ptrs[dwParam2];
}
DWORD WINAPI
DPA_InsertPtr (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
{
LPDPA_DATA dpaPtr = (LPDPA_DATA)dwParam1;
DWORD dwIndex;
TRACE (commctrl, "(0x%08lx 0x%08lx 0x%lx)\n",
dwParam1, dwParam2, dwParam3);
if (dpaPtr->ptrs == NULL) {
dpaPtr->ptrs = (LPDWORD)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
dpaPtr->dwGrow * sizeof(LPVOID));
dpaPtr->dwMaxCount = dpaPtr->dwGrow;
dwIndex = 0;
dpaPtr->ptrs[dwIndex] = dwParam3;
}
else {
FIXME (commctrl, "adding to existing array! stub!\n");
dwIndex = dwParam2;
}
dpaPtr->dwEntryCount++;
return (dwIndex);
}
LPSTR WINAPI
COMCTL32_StrChrA (LPSTR lpString, CHAR cChar)
{
return strchr (lpString, cChar);
}

View File

@ -131,8 +131,8 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
INT32 cCount;
DWORD dwMask;
if (lpInitCtrls == NULL) return (FALSE);
if (lpInitCtrls->dwSize < sizeof(INITCOMMONCONTROLSEX)) return (FALSE);
if (lpInitCtrls == NULL) return FALSE;
if (lpInitCtrls->dwSize < sizeof(INITCOMMONCONTROLSEX)) return FALSE;
for (cCount = 0; cCount <= 31; cCount++) {
dwMask = 1 << cCount;
@ -160,6 +160,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
case ICC_TAB_CLASSES:
TRACE (commctrl, "No tab class implemented!\n");
TRACE (commctrl, "No tooltip class implemented!\n");
UPDOWN_Register ();
break;
case ICC_UPDOWN_CLASS:
@ -178,6 +179,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
TRACE (commctrl, "No animation class implemented!\n");
break;
/* advanced classes - not included in Win95 */
case ICC_DATE_CLASSES:
TRACE (commctrl, "No month calendar class implemented!\n");
TRACE (commctrl, "No date picker class implemented!\n");
@ -211,7 +213,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
}
}
return (TRUE);
return TRUE;
}
@ -242,13 +244,13 @@ MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
}
else {
if (HIWORD(wParam) & MF_POPUP) {
TRACE (commctrl, "Popup menu selected!\n");
FIXME (commctrl, "No popup menu texts!\n");
TRACE (commctrl, "popup menu selected!\n");
FIXME (commctrl, "no popup menu texts!\n");
szStatusText[0] = 0;
}
else {
TRACE (commctrl, "Menu item selected!\n");
TRACE (commctrl, "menu item selected!\n");
if (!LoadString32A (hInst, LOWORD(wParam), szStatusText, 128))
szStatusText[0] = 0;
}
@ -284,7 +286,8 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
if(hwndTB) {
TBADDBITMAP tbab;
SendMessage32A (hwndTB, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
SendMessage32A (hwndTB, TB_BUTTONSTRUCTSIZE,
(WPARAM32)uStructSize, 0);
/* set bitmap and button size */
@ -296,10 +299,10 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
/* add buttons */
SendMessage32A (hwndTB, TB_ADDBUTTONS32A,
(WPARAM32)iNumButtons, (LPARAM)&lpButtons);
(WPARAM32)iNumButtons, (LPARAM)lpButtons);
}
return (hwndTB);
return hwndTB;
}
@ -341,3 +344,39 @@ CreateToolbar (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
iNumButtons, 0, 0, 0, 0, sizeof (OLDTBBUTTON));
}
/***********************************************************************
* GetEffectiveClientRect [COMCTL32.4]
*
*
*
*/
VOID WINAPI
GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
{
RECT32 rcClient, rcCtrl;
HWND32 hwndCtrl;
LPINT32 lpRun;
TRACE (commctrl, "hwnd=0x%08lx lpRect=0x%08lx lpInfo=0x%08lx\n",
(DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
GetClientRect32 (hwnd, &rcClient);
lpRun = lpInfo;
TRACE (commctrl, "*lpRun=0x%08x\n", *lpRun);
while (*lpRun) {
lpRun++;
TRACE (commctrl, "control id 0x%08x\n", *lpRun);
hwndCtrl = GetDlgItem32 (hwnd, *lpRun);
GetWindowRect32 (hwndCtrl, &rcCtrl);
MapWindowPoints32 (NULL, hwnd, (LPPOINT32)&rcCtrl, 2);
SubtractRect32 (&rcClient, &rcClient, &rcCtrl);
lpRun++;
TRACE (commctrl, "*lpRun=0x%08x\n", *lpRun);
}
CopyRect32 (lpRect, &rcClient);
}

View File

@ -2784,7 +2784,7 @@ DWORD WINAPI CheckMenuItem32( HMENU32 hMenu, UINT32 id, UINT32 flags )
/**********************************************************************
* EnableMenuItem16 (USER.155)
*/
BOOL16 WINAPI EnableMenuItem16( HMENU16 hMenu, UINT16 wItemID, UINT16 wFlags )
UINT16 WINAPI EnableMenuItem16( HMENU16 hMenu, UINT16 wItemID, UINT16 wFlags )
{
return EnableMenuItem32( hMenu, wItemID, wFlags );
}
@ -2793,38 +2793,20 @@ BOOL16 WINAPI EnableMenuItem16( HMENU16 hMenu, UINT16 wItemID, UINT16 wFlags )
/**********************************************************************
* EnableMenuItem32 (USER32.170)
*/
BOOL32 WINAPI EnableMenuItem32( HMENU32 hMenu, UINT32 wItemID, UINT32 wFlags )
UINT32 WINAPI EnableMenuItem32( HMENU32 hMenu, UINT32 wItemID, UINT32 wFlags )
{
BOOL32 bRet = FALSE;
MENUITEM *item, *first = NULL;
UINT32 oldflags;
MENUITEM *item;
TRACE(menu,"(%04x, %04X, %04X) !\n",
hMenu, wItemID, wFlags);
while( (item = MENU_FindItem( &hMenu, &wItemID, wFlags )) )
{
if( (wFlags & MF_BYPOSITION) || !(item->fType & MF_POPUP) )
{
/* We can't have MF_GRAYED and MF_DISABLED together */
if (wFlags & MF_GRAYED)
{
item->fState = (item->fState & ~MF_DISABLED) | MF_GRAYED;
}
else if (wFlags & MF_DISABLED)
{
item->fState = (item->fState & ~MF_GRAYED) | MF_DISABLED;
}
else /* MF_ENABLED */
{
item->fState &= ~(MF_GRAYED | MF_DISABLED);
}
bRet = TRUE;
break;
}
if( !first ) first = item;
else if( first == item ) break;
}
return bRet;
if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags )))
return (UINT32)-1;
oldflags = item->fState & (MF_GRAYED | MF_DISABLED);
item->fState ^= (oldflags ^ wFlags) & (MF_GRAYED | MF_DISABLED);
return oldflags;
}

View File

@ -46,6 +46,9 @@ static HBITMAP32 hRgArrowI = 0;
/* Minimum size of the thumb in pixels */
#define SCROLL_MIN_THUMB 6
/* Overlap between arrows and thumb */
#define SCROLL_ARROW_THUMB_OVERLAP 1
/* Delay (in ms) before first repetition when holding the button down */
#define SCROLL_FIRST_DELAY 200
@ -159,18 +162,28 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
switch(nBar)
{
case SB_HORZ:
lprect->left = wndPtr->rectClient.left - wndPtr->rectWindow.left - 1;
lprect->left = wndPtr->rectClient.left - wndPtr->rectWindow.left;
lprect->top = wndPtr->rectClient.bottom - wndPtr->rectWindow.top;
lprect->right = wndPtr->rectClient.right - wndPtr->rectWindow.left +1;
lprect->bottom = lprect->top + SYSMETRICS_CYHSCROLL + 1;
lprect->right = wndPtr->rectClient.right - wndPtr->rectWindow.left;
lprect->bottom = lprect->top + SYSMETRICS_CYHSCROLL;
if(wndPtr->dwStyle & WS_BORDER) {
lprect->left--;
lprect->right++;
} else if(wndPtr->dwStyle & WS_VSCROLL)
lprect->right++;
vertical = FALSE;
break;
case SB_VERT:
lprect->left = wndPtr->rectClient.right - wndPtr->rectWindow.left;
lprect->top = wndPtr->rectClient.top - wndPtr->rectWindow.top - 1;
lprect->right = lprect->left + SYSMETRICS_CXVSCROLL + 1;
lprect->bottom = wndPtr->rectClient.bottom - wndPtr->rectWindow.top +1;
lprect->top = wndPtr->rectClient.top - wndPtr->rectWindow.top;
lprect->right = lprect->left + SYSMETRICS_CXVSCROLL;
lprect->bottom = wndPtr->rectClient.bottom - wndPtr->rectWindow.top;
if(wndPtr->dwStyle & WS_BORDER) {
lprect->top--;
lprect->bottom++;
} else if(wndPtr->dwStyle & WS_HSCROLL)
lprect->bottom++;
vertical = TRUE;
break;
@ -199,7 +212,7 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
SCROLLBAR_INFO *info = SCROLL_GetPtrScrollInfo( wndPtr, nBar );
*arrowSize = SYSMETRICS_CXVSCROLL;
pixels -= 2 * SYSMETRICS_CXVSCROLL;
pixels -= (2 * (SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP));
if (info->Page)
{
@ -208,7 +221,7 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
}
else *thumbSize = SYSMETRICS_CXVSCROLL;
if (((pixels -= *thumbSize + 1) < 0) ||
if (((pixels -= *thumbSize ) < 0) ||
((info->flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH))
{
/* Rectangle too small or scrollbar disabled -> no thumb */
@ -218,10 +231,10 @@ static BOOL32 SCROLL_GetScrollBarRect( HWND32 hwnd, INT32 nBar, RECT32 *lprect,
{
INT32 max = info->MaxVal - MAX( info->Page-1, 0 );
if (info->MinVal >= max)
*thumbPos = *arrowSize;
*thumbPos = *arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
else
*thumbPos = *arrowSize + pixels * (info->CurVal-info->MinVal) /
(max - info->MinVal);
*thumbPos = *arrowSize - SCROLL_ARROW_THUMB_OVERLAP
+ pixels * (info->CurVal-info->MinVal) / (max - info->MinVal);
}
}
return vertical;
@ -240,7 +253,8 @@ static UINT32 SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT32 *rect,
INT32 thumbSize;
INT32 pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left;
if ((pixels -= 2*SYSMETRICS_CXVSCROLL) <= 0) return infoPtr->MinVal;
if ((pixels -= 2*(SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP)) <= 0)
return infoPtr->MinVal;
if (infoPtr->Page)
{
@ -249,9 +263,9 @@ static UINT32 SCROLL_GetThumbVal( SCROLLBAR_INFO *infoPtr, RECT32 *rect,
}
else thumbSize = SYSMETRICS_CXVSCROLL;
if ((pixels -= thumbSize + 1) <= 0) return infoPtr->MinVal;
if ((pixels -= thumbSize) <= 0) return infoPtr->MinVal;
pos = MAX( 0, pos - SYSMETRICS_CXVSCROLL );
pos = MAX( 0, pos - (SYSMETRICS_CXVSCROLL - SCROLL_ARROW_THUMB_OVERLAP) );
if (pos > pixels) pos = pixels;
if (!infoPtr->Page) pos *= infoPtr->MaxVal - infoPtr->MinVal;
@ -277,22 +291,22 @@ static enum SCROLL_HITTEST SCROLL_HitTest( HWND32 hwnd, INT32 nBar,
if (vertical)
{
if (pt.y <= rect.top + arrowSize + 1) return SCROLL_TOP_ARROW;
if (pt.y < rect.top + arrowSize) return SCROLL_TOP_ARROW;
if (pt.y >= rect.bottom - arrowSize) return SCROLL_BOTTOM_ARROW;
if (!thumbPos) return SCROLL_TOP_RECT;
pt.y -= rect.top;
if (pt.y < thumbPos) return SCROLL_TOP_RECT;
if (pt.y > thumbPos + thumbSize) return SCROLL_BOTTOM_RECT;
if (pt.y >= thumbPos + thumbSize) return SCROLL_BOTTOM_RECT;
return SCROLL_THUMB;
}
else /* horizontal */
{
if (pt.x <= rect.left + arrowSize) return SCROLL_TOP_ARROW;
if (pt.x < rect.left + arrowSize) return SCROLL_TOP_ARROW;
if (pt.x >= rect.right - arrowSize) return SCROLL_BOTTOM_ARROW;
if (!thumbPos) return SCROLL_TOP_RECT;
pt.x -= rect.left;
if (pt.x < thumbPos) return SCROLL_TOP_RECT;
if (pt.x > thumbPos + thumbSize) return SCROLL_BOTTOM_RECT;
if (pt.x >= thumbPos + thumbSize) return SCROLL_BOTTOM_RECT;
return SCROLL_THUMB;
}
}
@ -313,26 +327,26 @@ static void SCROLL_DrawArrows( HDC32 hdc, SCROLLBAR_INFO *infoPtr,
: LEFT_ARROW(infoPtr->flags, top_pressed));
SetStretchBltMode32( hdc, STRETCH_DELETESCANS );
StretchBlt32( hdc, rect->left, rect->top,
vertical ? rect->right-rect->left : arrowSize+1,
vertical ? arrowSize+1 : rect->bottom-rect->top,
vertical ? rect->right-rect->left : arrowSize,
vertical ? arrowSize : rect->bottom-rect->top,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL + 1, SYSMETRICS_CYHSCROLL + 1,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
SRCCOPY );
SelectObject32( hdcMem, vertical ?
BOTTOM_ARROW( infoPtr->flags, bottom_pressed )
: RIGHT_ARROW( infoPtr->flags, bottom_pressed ) );
if (vertical)
StretchBlt32( hdc, rect->left, rect->bottom - arrowSize - 1,
rect->right - rect->left, arrowSize + 1,
StretchBlt32( hdc, rect->left, rect->bottom - arrowSize,
rect->right - rect->left, arrowSize,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL + 1, SYSMETRICS_CYHSCROLL + 1,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
SRCCOPY );
else
StretchBlt32( hdc, rect->right - arrowSize - 1, rect->top,
arrowSize + 1, rect->bottom - rect->top,
StretchBlt32( hdc, rect->right - arrowSize, rect->top,
arrowSize, rect->bottom - rect->top,
hdcMem, 0, 0,
SYSMETRICS_CXVSCROLL + 1, SYSMETRICS_CYHSCROLL + 1,
SYSMETRICS_CXVSCROLL, SYSMETRICS_CYHSCROLL,
SRCCOPY );
SelectObject32( hdcMem, hbmpPrev );
DeleteDC32( hdcMem );
@ -351,20 +365,25 @@ static void SCROLL_DrawMovingThumb( HDC32 hdc, RECT32 *rect, BOOL32 vertical,
if (vertical)
{
r.top += SCROLL_TrackingPos;
if (r.top < rect->top + arrowSize) r.top = rect->top + arrowSize;
if (r.top + thumbSize >= rect->bottom - arrowSize)
r.top = rect->bottom - arrowSize - thumbSize - 1;
r.bottom = r.top + thumbSize + 1;
if (r.top < rect->top + arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
r.top = rect->top + arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
if (r.top + thumbSize >
rect->bottom - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP))
r.top = rect->bottom - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
- thumbSize;
r.bottom = r.top + thumbSize;
}
else
{
r.left += SCROLL_TrackingPos;
if (r.left < rect->left + arrowSize) r.left = rect->left + arrowSize;
if (r.left + thumbSize >= rect->right - arrowSize)
r.left = rect->right - arrowSize - thumbSize - 1;
r.right = r.left + thumbSize + 1;
if (r.left < rect->left + arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
r.left = rect->left + arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
if (r.left + thumbSize >
rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP))
r.left = rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
- thumbSize;
r.right = r.left + thumbSize;
}
InflateRect32( &r, -1, -1 );
DrawFocusRect32( hdc, &r );
SCROLL_MovingThumb = !SCROLL_MovingThumb;
}
@ -407,15 +426,13 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
r = *rect;
if (vertical)
{
r.top += arrowSize - 1;
r.bottom -= arrowSize;
r.right--;
r.top += arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
r.bottom -= (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
}
else
{
r.left += arrowSize - 1;
r.right -= arrowSize;
r.bottom--;
r.left += arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
r.right -= (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
}
/* Draw the scroll bar frame */
@ -435,27 +452,27 @@ static void SCROLL_DrawInterior( HWND32 hwnd, HDC32 hdc, INT32 nBar,
{
PatBlt32( hdc, r.left + 1, r.top + 1,
r.right - r.left - 2,
thumbPos - arrowSize,
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP) - 1,
top_selected ? 0x0f0000 : PATCOPY );
r.top += thumbPos - arrowSize;
PatBlt32( hdc, r.left + 1, r.top + thumbSize + 1,
r.top += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
PatBlt32( hdc, r.left + 1, r.top + thumbSize,
r.right - r.left - 2,
r.bottom - r.top - thumbSize - 2,
r.bottom - r.top - thumbSize - 1,
bottom_selected ? 0x0f0000 : PATCOPY );
r.bottom = r.top + thumbSize + 2;
r.bottom = r.top + thumbSize;
}
else /* horizontal */
{
PatBlt32( hdc, r.left + 1, r.top + 1,
thumbPos - arrowSize,
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP) - 1,
r.bottom - r.top - 2,
top_selected ? 0x0f0000 : PATCOPY );
r.left += thumbPos - arrowSize;
PatBlt32( hdc, r.left + thumbSize + 1, r.top + 1,
r.right - r.left - thumbSize - 2,
r.left += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
PatBlt32( hdc, r.left + thumbSize, r.top + 1,
r.right - r.left - thumbSize - 1,
r.bottom - r.top - 2,
bottom_selected ? 0x0f0000 : PATCOPY );
r.right = r.left + thumbSize + 2;
r.right = r.left + thumbSize;
}
/* Draw the thumb */
@ -493,6 +510,7 @@ void SCROLL_DrawScrollBar( HWND32 hwnd, HDC32 hdc, INT32 nBar, BOOL32 arrows )
vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
&arrowSize, &thumbSize, &thumbPos );
/* Draw the arrows */
if (arrows && arrowSize) SCROLL_DrawArrows( hdc, infoPtr, &rect, arrowSize,

View File

@ -103,9 +103,19 @@ SB_DrawPart( HDC32 hdc, LPRECT32 lprc, HICON32 hIcon,
/* now draw text */
if (text) {
int oldbkmode = SetBkMode32(hdc, TRANSPARENT);
LPSTR p = text;
UINT32 align = DT_LEFT;
if (*p == '\t') {
p++;
align = DT_CENTER;
if (*p == '\t') {
p++;
align = DT_RIGHT;
}
}
r.left += 3;
DrawText32A(hdc, text, lstrlen32A(text),
&r, DT_LEFT|DT_VCENTER|DT_SINGLELINE);
DrawText32A(hdc, p, lstrlen32A(p), &r, align|DT_VCENTER|DT_SINGLELINE);
if (oldbkmode != TRANSPARENT)
SetBkMode32(hdc, oldbkmode);
}
@ -118,6 +128,7 @@ SW_Refresh( HWND32 hwnd, HDC32 hdc, STATUSWINDOWINFO *self )
int i;
RECT32 rect;
HBRUSH32 hbrBk;
HFONT32 hOldFont;
WND *wndPtr;
wndPtr = WIN_FindWndPtr(hwnd);
@ -134,6 +145,8 @@ SW_Refresh( HWND32 hwnd, HDC32 hdc, STATUSWINDOWINFO *self )
hbrBk = GetSysColorBrush32 (COLOR_3DFACE);
FillRect32(hdc, &rect, hbrBk);
hOldFont = SelectObject32 (hdc, self->hFont ? self->hFont : self->hDefaultFont);
if (self->simple) {
SB_DrawPart (hdc,
&self->part0.bound,
@ -165,6 +178,8 @@ SW_Refresh( HWND32 hwnd, HDC32 hdc, STATUSWINDOWINFO *self )
}
}
SelectObject32 (hdc, hOldFont);
if (self->clrBk != CLR_DEFAULT)
DeleteObject32 (hbrBk);
@ -252,6 +267,7 @@ SW_SetText(STATUSWINDOWINFO *self, HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
}
}
InvalidateRect32(hwnd, &part->bound, FALSE);
// SW_RefreshPart (hdc, part);
return TRUE;
}
@ -320,9 +336,10 @@ SW_GetParts(STATUSWINDOWINFO *self, HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
static LRESULT
SW_Create(HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
{
RECT32 rect;
LPCREATESTRUCT32A lpCreate = (LPCREATESTRUCT32A) lParam;
int height, width, len;
NONCLIENTMETRICS32A nclm;
RECT32 rect;
int width, len;
HDC32 hdc;
HWND32 parent;
WND *wndPtr;
@ -331,7 +348,6 @@ SW_Create(HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
wndPtr = WIN_FindWndPtr(hwnd);
self = (STATUSWINDOWINFO*)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
sizeof(STATUSWINDOWINFO));
wndPtr->wExtra[0] = (DWORD)self;
self->numParts = 1;
@ -341,6 +357,10 @@ SW_Create(HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
self->hFont = 0;
GetClientRect32(hwnd, &rect);
nclm.cbSize = sizeof(NONCLIENTMETRICS32A);
SystemParametersInfo32A (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
self->hDefaultFont = CreateFontIndirect32A (&nclm.lfStatusFont);
/* initialize simple case */
self->part0.bound = rect;
self->part0.text = 0;
@ -362,11 +382,14 @@ SW_Create(HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
lstrcpy32A (self->parts[0].text, lpCreate->lpszName);
}
height = 20;
if ((hdc = GetDC32 (0))) {
TEXTMETRIC32A tm;
HFONT32 hOldFont;
hOldFont = SelectObject32 (hdc,self->hDefaultFont);
GetTextMetrics32A(hdc, &tm);
self->textHeight = tm.tmHeight;
SelectObject32 (hdc, hOldFont);
ReleaseDC32(0, hdc);
}
@ -554,6 +577,11 @@ SW_Destroy(STATUSWINDOWINFO *self, HWND32 hwnd, WPARAM32 wParam, LPARAM lParam)
if (self->part0.text && (self->part0.style != SBT_OWNERDRAW))
HeapFree(SystemHeap, 0, self->part0.text);
HeapFree(SystemHeap, 0, self->parts);
/* delete default font */
if (self->hDefaultFont)
DeleteObject32 (self->hDefaultFont);
HeapFree(SystemHeap, 0, self);
return 0;
}
@ -673,6 +701,7 @@ SW_WMSetText (STATUSWINDOWINFO *self, HWND32 hwnd, WPARAM32 wParam, LPARAM lPara
lstrcpy32A (part->text, (LPCSTR)lParam);
}
InvalidateRect32(hwnd, &part->bound, FALSE);
// SW_RefreshPart (hdc, part);
return TRUE;
}

File diff suppressed because it is too large Load Diff

View File

@ -352,13 +352,31 @@ void DEBUG_AddModuleBreakpoints(void)
addr.off = pModule->ip;
fprintf( stderr, "Win16 task '%s': ", entry.szModule );
DEBUG_AddBreakpoint( &addr );
}
}
for (wm=PROCESS_Current()->modref_list;wm;wm=wm->next) {
addr.seg = 0;
addr.off =(DWORD)RVA_PTR(wm->module,OptionalHeader.AddressOfEntryPoint);
fprintf( stderr, "Win32 module '%s': ", wm->modname );
DEBUG_AddBreakpoint( &addr );
}
else /* PE module */
{
if (!(wm = PROCESS_Current()->modref_list))
{
addr.seg = 0;
addr.off = (DWORD)RVA_PTR( pModule->module32,
OptionalHeader.AddressOfEntryPoint);
}
else
{
while (wm)
{
if (wm->module == pModule->module32) break;
wm = wm->next;
}
if (!wm) continue;
addr.seg = 0;
addr.off = (DWORD)RVA_PTR( wm->module,
OptionalHeader.AddressOfEntryPoint);
}
fprintf( stderr, "Win32 task '%s': ", entry.szModule );
DEBUG_AddBreakpoint( &addr );
}
}
DEBUG_SetBreakpoints( TRUE ); /* Setup breakpoints */

View File

@ -47,7 +47,7 @@ BOOL32 DEBUG_checkmap_bad( const char *addr, size_t size, int rwflag)
while (fgets( buf, 79, fp)) {
sscanf(buf, "%x-%x %3s", (int *) &start, (int *) &end, prot);
if ( end < addr)
if ( end <= addr)
continue;
if (start <= addr && addr+size < end) {
if (rwflag)

View File

@ -6,7 +6,6 @@
#include <sys/types.h>
#include <fcntl.h>
#include <assert.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <limits.h>
@ -178,9 +177,9 @@ DEBUG_ReadTypeEnumBackwards(char*x) {
x--;
x++; /* '(' */
filenr=strtol(x,&x,10); /* <int> */
assert(*(x++)==','); /* ',' */
x++; /* ',' */
subnr=strtol(x,&x,10); /* <int> */
assert(*(x++)==')'); /* ')' */
x++; /* ')' */
} else {
while ((*x>='0') && (*x<='9'))
x--;
@ -478,13 +477,13 @@ DEBUG_ParseTypedefStab(char * ptr, const char * typename)
/* ar<typeinfo_nodef>;<int>;<int>;<typeinfo>,<int>,<int>;; */
tc = c + 3;
assert(c[2]=='r');
/* 'r' */
DEBUG_ReadTypeEnum(&tc);
assert(*(tc++)==';'); /* ';' */
tc++; /* ';' */
arrmin = strtol(tc, &tc, 10); /* <int> */
assert(*(tc++)==';'); /* ';' */
tc++; /* ';' */
arrmax = strtol(tc, &tc, 10); /* <int> */
assert(*(tc++)==';'); /* ';' */
tc++; /* ';' */
datatype = stab_types[DEBUG_ReadTypeEnum(&tc)]; /* <typeinfo> */
if( *tc == '\0' )
*c = '\0';

View File

@ -23,6 +23,8 @@ Windows requirements:
(ASPI). At least with Mustek, they allow you the choice of using
the builtin card or the "Adaptec (AHA)" compatible drivers. This will not
work any other way.
Software that accesses the scanner via a DOS ASPI driver (e.g. ASPI2DOS)
is supported, too. [AM]
1) You probably need a real windows install of the software to set the
LUN's/SCSI id's up correctly. I'm not exactly sure.
@ -70,9 +72,15 @@ NOTES/BUGS:
The biggest is that it only works under linux at the moment.
The ASPI code was only tested using a Mustek 800SP with a Buslogic
controller under Linux.
The ASPI code has only been tested with:
- a Mustek 800SP with a Buslogic controller under Linux [BM]
- a Siemens Nixdorf 9036 with Adaptec AVA-1505 under Linux
accessed via DOSASPI.
Note that I had color problems, though (barely readable result). [AM]
I make no warranty to the aspi code. It makes my scanner work. Your scanner
may explode. I have no way of determining this. I take zero responsibility!
Bruce Milner
Additions by Andreas Mohr

View File

@ -1,14 +1,12 @@
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
easier, please follow the guidelines described in this document.
things up. To make my life easier, please follow the guidelines
described in this document.
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 1000 of them! Also, instead of writing FIXMEs in the source,
output a FIXME message if you can.
Read this document before writing new code. DO NOT USE fprintf
(or printf) to output things. 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.
@ -349,9 +347,24 @@ So, the -debugmsg command line option has been changed as follows:
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 (hopefully) come next
release.
Compiling Out Debugging Messages
--------------------------------
To compile out the debugging messages, provide configure with the
following options:
--disable-debug -- turns off TRACE, WARN, and FIXME (and DUMP).
--disable-trace -- turns off TRACE only.
This will result in an executable that, when stripped, is about 15%-20%
smaller. Note, however, that you will not be able to effectively debug
Wine without these messages.
This feature has not been extensively tested--it may subtly break some
things.
A Few Notes on Style

View File

@ -68,10 +68,9 @@ relevant developer as feasonable.
3. If you have found a misbehaving function, try to find out why it
misbehaves. Find the function in the source code. Try to make sense of
the arguments passed. Usually there is a
"dprintf_xyz(stddeb,"Function(...)"...);" at the beginning of the
function. Rerun wine with "-debugmsg +xyz,+relay" added to the
commandline.
the arguments passed. Usually there is a 'TRACE(<channel>,"(...)\n");'
at the beginning of the function. Rerun wine with
"-debugmsg +xyz,+relay" added to the commandline.
4. Additional information on how to debug using the internal debugger can be
found in debugger/README.
@ -81,7 +80,7 @@ relevant developer as feasonable.
+all", which dumps ALL included debug information in wine.
6. If that isn't enough add more debug output for yourself into the
functions you find relevant.
functions you find relevant. See documentation/debug-msgs.
You might also try to run the program in gdb instead of using the
WINE-debugger. If you don't use the "-desktop" or "-managed" option,
start the WINE process with "-sync", or chances are good to get X into

View File

@ -271,6 +271,7 @@ Wine is free software. Wine is still in development-only state.
@menu
* Copying:: License, Warranty, and Authors of Wine.
* Introduction:: A short overview.
* Wine Design:: The design of Wine.
* Reference Manual:: The Wine reference manual.
* Installation:: Installing and configuring Wine.
* The Wine Project:: How to contribute to Wine.
@ -340,54 +341,37 @@ Alexandre Julliard @*
@node Introduction, Reference Manual, Copying, Top
@node Introduction, Wine Design, Copying, Top
@chapter Introduction
@center Wine:
@center the WINdows Emulator,
@center or Wine Is Not an Emulator
FIXME: make an easy-readable fluent text out of this.
Welcome to @winemanualtitle{}. This is edition @winemanualversion{},
last updated @winemanualdate{}.
@strong{What is Wine?}
Wine is a program that allows running MS-Windows programs under X11.
Wine incorporates two features, the program loader and @winelib{}:
Wine is a Windows-compatibility layer for Unix and X11.
The Wine system consists of several thing:
@enumerate
@item
You can run @mswindows{} binaries (programs) in Wine. Wine contains a
program loader which loads and executes an @mswindows{} binary. It uses
the @winelib{} features of Wine to translate @WIN32{} and @WIN16{} calls
to their @unix{}/X11 equivalent.
Both 16 bit and 32 bit binaries can be loaded.
An API, sometimes referred to as the Wine API,
designed to be as compatible as possible with the
@mswindows{} API
@item
@winelib{}: Wine can also be used as a library which implements the
@mswindows{} API on top of a @unix{} or @unix{}-like operating system
with X11. @winelib{} (i.e. the Wine library) translates @WIN16{} or
@WIN32{} API calls to their @unix{}/X11 equivalent.
A library, called @winelib{}, which implements this API
@item
A binary compatibility layer, sometimes referred to as the Wine
emulator, which acts as a program loader for native Windows binaries.
The emulator works for both 16 and 32 bit Intel binaries, and
provides all the appropriate translation between 16 and 32 bit code
(thunking). Real mode interrupts are also supported, and their
functionality is implemented in @winelib{}.
You can write a user-level application program that calls the @WIN16{}
or @WIN32{} API functions and compile it on a @unix{} box.
@end enumerate
@strong{Status}
@strong{System Requirements}
Wine is still at development stage. The file @file{ANNOUNCE} says,
``This is still a developer's only release. There are many bugs and
many unimplemented API features. Most applications still do not work
correctly.''
@xref{Warranty}, for additional information.
@strong{Requirements}
Wine needs an 80x86 CPU to run on. Emulating the CPU is currently not
possible.
Wine provides binary support for Intel code on Intel hardware only.
Neither hardware emulation
nor non-Intel binaries are supported.
@winelib{} should be possible to port to just about any Unix system.
Currently, you must have one of:
@itemize @bullet
@ -397,46 +381,161 @@ Linux version 0.99.13 or above
NetBSD-current
@item
FreeBSD-current or FreeBSD 1.1
@item
OpenBSD/i386 2.1 or later
@item
Solaris x86 2.5 or later
@end itemize
You need X11, and you must have @file{libXpm} installed on your system.
@strong{Availability}
Wine is free software. The file @file{README} says, ``Basically, you can do
anything with it, except claim that you wrote it.''
Wine is free software; the license is BSD-style. Basically, you can do
anything with it, except claim that you wrote it.
@xref{Copying}, for more information.
@strong{Performance}
Wine is expected to run @mswindows{} binaries about the same speed as
@mswindows{} would. However, be aware that the 16 bit versions of
@mswindows{} programs are generally slower than their 32 bit
counterparts.
@strong{Further information}
You should consult the files @file{README}, @file{ANNOUNCE},
@file{RELEASE-NOTES}, @file{BUGS}, @file{LICENSE}, and @file{WARRANTY},
in the root directory of the Wine distribution.
The Wine FAQ, available from @*
@url{ftp://ftp.asgardpro.com/wine/dave/Wine.FAQ}, @*
@url{ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/Wine.FAQ}, @*
@url{ftp://rtfm.mit.edu/pub/usenet-by-group/comp.emulators.ms-windows.wine/WINE_(WINdows_Emulator)_Frequently_Asked_Questions}, @*
@url{ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/Wine.FAQ}, @*
@url{http://www.asgardpro.com/wine/index.html}, @*
gives answer to a lot of questions.
The Wine USENET newsgroup @url{news:comp.emulators.ms-windows.wine}
is useful for both Wine developers and Wine users. The Wine home page
is @url{http://www.winehq.com/}.
The Wine USENET newsgroup is interesting for developers. It discusses technical
matters about Wine. The address is: @url{news:comp.emulators.ms-windows.wine}.
@node Wine Design, Reference Manual, Introduction, Top
@chapter Wine Design
@subsection The Wine Graphics Driver Model
Wine, like Windows, abstracts drawing code so that applications may access
a wide variety of devices, from different kinds of graphics cards,
X displays and printers, using a single unified graphics model.
This model is referred to as GDI: _G_raphics _D_river _I_nterface.
This section discusses the Wine implementation of GDI.
There are 61 functions in the Wine graphics model, including Arc, BitBlt,
Chord, etc. For a complete list and prototypes, see the definition
of DC_FUNCTIONS in [include/gdi.h].
Wine, as of 2Q1998, has three native drivers: these provide support
for rendering to X displays, metafiles, and Win16 native printer drivers.
As far as Wine is concerned, a driver
simply consists of a name and a table of function pointers
(see [graphics/driver.c]). These functions
are the driver's implementation of the various Wine graphics
operations (the GDI). Wine maintains a linked list of all drivers which
register themselves with Wine, as well as a ``generic''
driver. Currently, the X11 driver registers itself as DISPLAY, the
win16 driver registers itself as the generic driver, and the metafile
driver doesn't register itself at all.
@subsubsection How a driver function gets invoked
All drawing by Wine applications
is done in terms of a Device Context (DC).
Before an application can draw, it must create a DC, and all drawing calls
must pass a handle to the DC they wish to draw to.
[include/gdi.h] defines several structures relating to DCs, including
DC, WIN_DC_INFO, and DeviceCaps. The DeviceCaps structure is at the lowest
level: it holds
information relating to specifics of the graphics display
hardware and associated
driver.
WIN_DC_INFO holds information about several device independent
modes the DC can be in, plus a pointer to DeviceCaps.
Finally,
the DC structure is the toplevel structure usually passed around.
It holds viewport information, a pointer to WIN_DC_INFO, and a
pointer to the function table to be used while rendering that DC.
This function table is filled at the time of creating the DC.
@c Modes
@c Some discussion of the various modalities available to a DC would be nice.
@c Coordinate Systems
@c Some discussion of the maze of coordinate systems would also be nice.
@c Device Coordinates
@c Logical Coordinates
@c World transforms
@subsubsection The X11 driver
@xref{The Wine Project}, if you consider contributing some work.
As a part of the Wine loading process,
X11DRV_Init in [graphics/x11drv/init.c] is called.
This initializes various aspects of the X11 driver and
registers it as DISPLAY. This function first
calls initialization procedures for various parts of the X11 driver.
It then
creates and
fills a static DeviceCaps
structure to be used for every X11 DC.
Finally, it fills the table of GDI functions to be used for X11
rendering and registers itself as ``DISPLAY''.
@subsubsection The Metafile Driver
The metafile driver is unusual, in that it is not a driver for any
kind of display device, but rather a mechanism which allows using
the Wine graphics model as a file format for saving graphics.
The advantage of this is that it allows using identical formats for
saving pictures as is actually used to display them; it is analogous
to Display PostScript.
The metafile driver is invoked explicitly by the application. The
application calls CreateMetaFile() to create a special DC for recording
graphics drawing operations in a metafile. Any drawing operations
performed in this DC are not drawn physically anywhere, they are
instead stored in the metafile. The DC is explicitly destroyed by a
call to CloseMetaFile(), which also finishes writing the metafile.
Metafiles may be written either to a file or to memory. Later, the
metafile can be rendered (in a physical DC) by PlayMetaFile().
The way that this works is that device contexts contain a pointer
to the function lookup table for drawing operations appropriate for
that device.
Not all functions in the Wine graphics model are relevant to metafiles, but
some relevant but rarely used functions are unimplemented.
@subsubsection The WIN16 Driver
WIN16DRV_Init is called by MAIN_EmulatorInit, and registers the
WIN16DRV function table WIN16DRV_Funcs [graphics/win16drv/init.c]
for the generic driver. The WIN16 driver is designed to load
specified native Windows printer drivers. I don't understand
how the whole scheme works,
start studying what happens when a printer DC is
created via WIN16DRV_CreateDC.
If a DC is created explicitly, via the
CreateDC() call, the driver name is specified explicitly and Wine
finds the appropriate driver by leafing through its table of registered
drivers. Metafile DCs can only be created by the CreateMetaFile function.
Alternatively, most of the time, the DISPLAY driver is invoked
implicitly.
The application creates a window with
CreateWindow(). If the CS_CLASSDC or CS_OWNDC flag is passed, a new DC
is created and saved for the window in a structure called DCE, which holds
a DC, a clipping region, and flags. Whenever the application wants to
paint in that window, it calls GetDC(hwnd), which returns the DC in the
DCE saved in the window.
If neither of those flags are used, the window gets a DCE assigned to it
from a pool of DCEs created during Wine initialization and temporarily
assigned during the GetDC() call.
All DCEs, whether part of the Wine DC pool or created by request of a window,
use the ``DISPLAY'' driver.
@node Reference Manual, Installation, Introduction, Top
@node Reference Manual, Installation, Wine Design, Top
@menu
* WIN32 Reference Manual:: The @WIN32{} function calls and data types.

View File

@ -47,7 +47,7 @@ typedef struct
#define INVALID_DOS_CHARS "*?<>|\"+=,;[] \345"
static const char *DOSFS_Devices[] = {
"CON","PRN","NUL","AUX","LPT1","LPT2","LPT3","LPT4","COM1","COM2","COM3","COM4",
"CON","PRN","NUL","AUX","LPT1","LPT2","LPT3","LPT4","COM1","COM2","COM3","COM4","SCSIMGR$"
};
@ -587,6 +587,8 @@ HFILE32 DOSFS_OpenDevice( const char *name, int unixmode )
{
int i;
const char *p;
FILE_OBJECT *file;
HFILE32 handle;
if (name[0] && (name[1] == ':')) name += 2;
if ((p = strrchr( name, '/' ))) name = p + 1;
@ -615,6 +617,14 @@ HFILE32 DOSFS_OpenDevice( const char *name, int unixmode )
break;
}
}
if (!strcmp(DOSFS_Devices[i],"SCSIMGR$")) {
if ((handle = FILE_Alloc( &file )) == INVALID_HANDLE_VALUE32)
return HFILE_ERROR32;
else {
file->unix_name = HEAP_strdupA( SystemHeap, 0, name );
return handle;
}
}
FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i]);
return HFILE_ERROR32;
}

View File

@ -542,6 +542,9 @@ int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
"drive %c already exists\n",
'A' + existing_drive, 'A' + new_drive,
'A' + new_drive );
/* it is already mapped there, so return success */
if (!strcmp(old->root,new->root))
return 1;
return 0;
}
@ -851,6 +854,10 @@ BOOL32 WINAPI SetCurrentDirectory32A( LPCSTR dir )
{
int drive = DRIVE_GetCurrentDrive();
if (!dir) {
ERR(file,"(NULL)!\n");
return FALSE;
}
if (dir[0] && (dir[1]==':'))
{
drive = tolower( *dir ) - 'a';

View File

@ -73,14 +73,14 @@ static void DOS_RemoveFileLocks(FILE_OBJECT *file);
*
* Allocate a file.
*/
static HFILE32 FILE_Alloc( FILE_OBJECT **file )
HFILE32 FILE_Alloc( FILE_OBJECT **file )
{
HFILE32 handle;
*file = HeapAlloc( SystemHeap, 0, sizeof(FILE_OBJECT) );
if (!*file)
{
DOS_ERROR( ER_TooManyOpenFiles, EC_ProgramError, SA_Abort, EL_Disk );
return NULL;
return (HFILE32)NULL;
}
(*file)->header.type = K32OBJ_FILE;
(*file)->header.refcount = 0;
@ -185,7 +185,7 @@ static void FILE_Destroy( K32OBJ *ptr )
* Return the DOS file associated to a task file handle. FILE_ReleaseFile must
* be called to release the file.
*/
static FILE_OBJECT *FILE_GetFile( HFILE32 handle )
FILE_OBJECT *FILE_GetFile( HFILE32 handle )
{
return (FILE_OBJECT *)HANDLE_GetObjPtr( PROCESS_Current(), handle,
K32OBJ_FILE, 0 /*FIXME*/ );

View File

@ -150,6 +150,14 @@ static void PROFILE_Free( PROFILESECTION *section )
}
}
static int
PROFILE_isspace(char c) {
if (isspace(c)) return 1;
if (c=='\r' || c==0x1a) return 1;
/* CR and ^Z (DOS EOF) are spaces too (found on CD-ROMs) */
return 0;
}
/***********************************************************************
* PROFILE_Load
@ -176,9 +184,9 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
{
line++;
p = buffer + strlen(buffer) - 1;
while ((p > buffer) && ((*p == '\n') || isspace(*p))) *p-- = '\0';
while ((p > buffer) && ((*p == '\n') || PROFILE_isspace(*p))) *p--='\0';
p = buffer;
while (*p && isspace(*p)) p++;
while (*p && PROFILE_isspace(*p)) p++;
if (*p == '[') /* section start */
{
if (!(p2 = strrchr( p, ']' )))
@ -203,9 +211,9 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
if ((p2 = strchr( p, '=' )) != NULL)
{
char *p3 = p2 - 1;
while ((p3 > p) && isspace(*p3)) *p3-- = '\0';
while ((p3 > p) && PROFILE_isspace(*p3)) *p3-- = '\0';
*p2++ = '\0';
while (*p2 && isspace(*p2)) p2++;
while (*p2 && PROFILE_isspace(*p2)) p2++;
}
key = HEAP_xalloc( SystemHeap, 0, sizeof(*key) );
key->name = HEAP_strdupA( SystemHeap, 0, p );
@ -765,7 +773,7 @@ int PROFILE_LoadWineIni(void)
fclose( f );
return 1;
}
WARN(profile, "Can't open configuration file %s or $HOME%s\n",
MSG( "Can't open configuration file %s or $HOME%s\n",
WINE_INI_GLOBAL, PROFILE_WineIniName );
return 0;
}
@ -787,9 +795,9 @@ char* PROFILE_GetStringItem( char* start )
{
if( lpch ) *lpch = '\0'; else *lpchX = '\0';
while( *(++lpchX) )
if( !isspace(*lpchX) ) return lpchX;
if( !PROFILE_isspace(*lpchX) ) return lpchX;
}
else if( isspace( *lpchX ) && !lpch ) lpch = lpchX;
else if( PROFILE_isspace( *lpchX ) && !lpch ) lpch = lpchX;
else lpch = NULL;
}
if( lpch ) *lpch = '\0';

View File

@ -960,11 +960,19 @@ static ULONG WINAPI IDirectDrawClipper_Release(LPDIRECTDRAWCLIPPER this) {
return 0;
}
static HRESULT WINAPI IDirectDrawClipper_GetClipList(
LPDIRECTDRAWCLIPPER this,LPRECT32 rects,LPRGNDATA lprgn,LPDWORD hmm
) {
FIXME(ddraw,"(%p,%p,%p,%p),stub!\n",this,rects,lprgn,hmm);
if (hmm) *hmm=0;
return 0;
}
static struct IDirectDrawClipper_VTable ddclipvt = {
(void*)1,
(void*)2,
IDirectDrawClipper_Release,
(void*)4,
IDirectDrawClipper_GetClipList,
(void*)5,
(void*)6,
(void*)7,
@ -1511,6 +1519,14 @@ static HRESULT WINAPI IDirectDraw_GetMonitorFrequency(
return 0;
}
/* what can we directly decompress? */
static HRESULT WINAPI IDirectDraw_GetFourCCCodes(
LPDIRECTDRAW this,LPDWORD x,LPDWORD y
) {
FIXME(ddraw,"(%p,%p,%p), stub\n",this,x,y);
return 0;
}
static IDirectDraw_VTable ddvt = {
IDirectDraw_QueryInterface,
IDirectDraw_AddRef,
@ -1525,7 +1541,7 @@ static IDirectDraw_VTable ddvt = {
IDirectDraw_FlipToGDISurface,
IDirectDraw_GetCaps,
IDirectDraw_GetDisplayMode,
(void*)14,
IDirectDraw_GetFourCCCodes,
(void*)15,
IDirectDraw_GetMonitorFrequency,
(void*)17,

View File

@ -4,80 +4,136 @@
* Note: This has NOTHING to do with the task/process environment!
*
* Copyright 1997 Marcus Meissner
* Copyright 1998 Andreas Mohr
*/
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <config.h>
#include <gdi.h>
#include <debug.h>
typedef struct {
ATOM atom;
HGLOBAL16 handle;
} ENVTABLE;
static ENVTABLE EnvTable[20];
static ENVTABLE *SearchEnvTable(ATOM atom)
{
INT16 i;
for (i = 20; i; i--) {
if (EnvTable[i].atom == atom) return &EnvTable[i];
}
return NULL;
}
static ATOM GDI_GetNullPortAtom(void)
{
static ATOM NullPortAtom = 0;
if (!NullPortAtom)
{
char NullPort[256];
GetProfileString32A( "windows", "nullport", "none",
NullPort, sizeof(NullPort) );
NullPortAtom = AddAtom32A( NullPort );
}
return NullPortAtom;
}
static ATOM PortNameToAtom(LPCSTR lpPortName, BOOL16 add)
{
char PortName[256];
LPCSTR p;
if (lpPortName[strlen(lpPortName) - 1] == ':') {
strncpy(PortName, lpPortName, strlen(lpPortName) - 1);
p = PortName;
}
else
p = lpPortName;
if (add)
return AddAtom32A(p);
else
return FindAtom32A(p);
}
/***********************************************************************
* GetEnvironment (GDI.134)
*/
INT16 WINAPI GetEnvironment(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nMaxSiz)
INT16 WINAPI GetEnvironment(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nMaxSize)
{
FIXME(gdi, "('%s','%p',%d),stub\n", lpPortName, lpdev, nMaxSiz);
return 0;
ATOM atom;
LPCSTR p;
ENVTABLE *env;
WORD size;
TRACE(gdi, "('%s', %p, %d)\n", lpPortName, lpdev, nMaxSize);
if (!(atom = PortNameToAtom(lpPortName, FALSE)))
return 0;
if (atom == GDI_GetNullPortAtom())
if (!(atom = FindAtom32A((LPCSTR)lpdev)))
return 0;
if (!(env = SearchEnvTable(atom)))
return 0;
size = GlobalSize16(env->handle);
if (!lpdev) return 0;
if (size < nMaxSize) nMaxSize = size;
if (!(p = GlobalLock16(env->handle))) return 0;
memcpy(lpdev, p, nMaxSize);
GlobalUnlock16(env->handle);
return nMaxSize;
}
/***********************************************************************
* SetEnvironment (GDI.132)
*/
INT16 WINAPI SetEnvironment(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nCount)
{
ATOM atom;
BOOL16 nullport = FALSE;
LPSTR p;
ENVTABLE *env;
HGLOBAL16 handle;
FIXME(gdi, "('%s', '%p', %d) stub!\n", lpPortName, lpdev, nCount);
if (TRACE_ON(gdi)) DUMP(
"\tdevmode:\n"
"\tname = %s\n"
"\tdmSpecVersion = %d\n"
"\tdmDriverVersion = %d\n"
"\tdmSize = %d\n"
"\tdmDriverExtra = %d\n"
"\tdmFields = %ld\n"
"\tdmOrientation = %d\n"
"\tdmPaperSize = %d\n"
"\tdmPaperLength = %d\n"
"\tdmPaperWidth = %d\n"
"\tdmScale = %d\n"
"\tdmCopies = %d\n"
"\tdmDefaultSource = %d\n"
"\tdmPrintQuality = %d\n"
"\tdmColor = %d\n"
"\tdmDuplex = %d\n"
"\tdmYResolution = %d\n"
"\tdmTTOption = %d\n"
"\tdmCollate = %d\n"
"\tdmFBitsPerPel = %d\n"
"\tdmPelsWidth = %ld\n"
"\tdmPelsHeight = %ld\n"
"\tdmDisplayFlags = %ld\n"
"\tdmDisplayFrequency = %ld\n",
lpdev->dmDeviceName,
lpdev->dmSpecVersion,
lpdev->dmDriverVersion,
lpdev->dmSize,
lpdev->dmDriverExtra,
lpdev->dmFields,
lpdev->dmOrientation,
lpdev->dmPaperSize,
lpdev->dmPaperLength,
lpdev->dmPaperWidth,
lpdev->dmScale,
lpdev->dmCopies,
lpdev->dmDefaultSource,
lpdev->dmPrintQuality,
lpdev->dmColor,
lpdev->dmDuplex,
lpdev->dmYResolution,
lpdev->dmTTOption,
lpdev->dmCollate,
lpdev->dmBitsPerPel,
lpdev->dmPelsWidth,
lpdev->dmPelsHeight,
lpdev->dmDisplayFlags,
lpdev->dmDisplayFrequency
);
return 0;
TRACE(gdi, "('%s', %p, %d)\n", lpPortName, lpdev, nCount);
if ((atom = PortNameToAtom(lpPortName, FALSE))) {
if (atom == GDI_GetNullPortAtom()) {
nullport = TRUE;
atom = FindAtom32A((LPCSTR)lpdev);
}
env = SearchEnvTable(atom);
GlobalFree16(env->handle);
env->atom = 0;
}
if (nCount) { /* store DEVMODE struct */
if (nullport)
p = (LPSTR)lpdev;
else
p = (LPSTR)lpPortName;
if ((atom = PortNameToAtom(p, TRUE))
&& (env = SearchEnvTable(0))
&& (handle = GlobalAlloc16(GMEM_SHARE|GMEM_MOVEABLE, nCount))) {
if (!(p = GlobalLock16(handle))) {
GlobalFree16(handle);
return 0;
}
env->atom = atom;
env->handle = handle;
memcpy(p, lpdev, nCount);
GlobalUnlock16(handle);
return handle;
}
else return 0;
}
else return -1;
}

View File

@ -5,10 +5,10 @@
* Copyright 1998 David Lee Lambert
*
*/
#include "windows.h"
#include <stdio.h>
#include <stdlib.h>
#include <debug.h>
#include "windows.h"
#include "font.h"

View File

@ -22,6 +22,7 @@
#include "callback.h"
#include "options.h"
#include "debug.h"
#include "dc.h"
#define SUPPORT_REALIZED_FONTS 1
#pragma pack(1)
@ -175,6 +176,7 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
if (lstrcmpi32A(printerEnabled,"on"))
{
MSG("WIN16DRV_CreateDC disabled in wine.conf file\n");
MSG("Enable printing with \"printer=on\"");
return FALSE;
}
@ -284,8 +286,12 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
nRet = 0;
break;
case SETABORTPROC:
FIXME(win16drv,"Escape: SetAbortProc ignored should be stored in dc somewhere\n");
/* Make calling application believe this worked */
/* FIXME: The AbortProc should be called:
- After every write to printer port or spool file
- Several times when no more disk space
- Before every metafile record when GDI does banding
*/
/* dc->w.lpfnPrint = (FARPROC16)lpInData; FIXME! */
nRet = 1;
break;
@ -340,9 +346,40 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
}
/**********************************************************************
* QueryAbort (GDI.155)
*
* Calls the app's AbortProc function if avail.
*
* RETURNS
* TRUE if no AbortProc avail or AbortProc wants to continue printing.
* FALSE if AbortProc wants to abort printing.
*/
BOOL16 WINAPI QueryAbort(HDC16 hdc, INT16 reserved)
{
DC *dc = DC_GetDCPtr( hdc );
if ((!dc) || (!dc->w.lpfnPrint))
return TRUE;
return dc->w.lpfnPrint(hdc, 0);
}
/****************** misc. printer releated functions */
/**********************************************************************
* SetAbortProc (GDI.381)
*
*/
INT16 WINAPI SetAbortProc(HDC16 hdc, FARPROC16 abrtprc)
{
DC *dc = DC_GetDCPtr( hdc );
if (dc) {
dc->w.lpfnPrint = abrtprc;
return 1;
}
return -1;
}
/****************** misc. printer related functions */
/*
* The following function should implement a queing system
@ -600,6 +637,15 @@ int WINAPI WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch)
nRet = SP_OUTOFDISK;
else
nRet = cch;
if (pPrintJob->hDC == 0) {
ERR(print, "hDC == 0 !\n");
return SP_ERROR;
}
if (!(QueryAbort(pPrintJob->hDC, (nRet == SP_OUTOFDISK) ? nRet : 0 )))
{
CloseJob(hJob); /* printing aborted */
nRet = SP_APPABORT;
}
}
return nRet;
}

View File

@ -4,6 +4,12 @@
* Copyright 1993,1994 Alexandre Julliard
*/
/*
* FIXME: none of these functions obey the GM_ADVANCED
* graphics mode
*/
#include <math.h>
#ifdef HAVE_FLOAT_H
# include <float.h>
@ -72,6 +78,9 @@ X11DRV_LineTo( DC *dc, INT32 x, INT32 y )
*
* Helper functions for Arc(), Chord() and Pie().
* 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie.
*
* FIXME: incorrect with thick pen and/or PS_INSIDEFRAME style
* see ellipse and rectangle functions
*/
static BOOL32
X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
@ -191,24 +200,32 @@ X11DRV_Chord( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom,
BOOL32
X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
{
INT32 width, oldwidth;
left = XLPTODP( dc, left );
top = YLPTODP( dc, top );
right = XLPTODP( dc, right );
bottom = YLPTODP( dc, bottom );
if ((left == right) || (top == bottom)) return FALSE;
if ((left == right) || (top == bottom)) return TRUE;
if (right < left) { INT32 tmp = right; right = left; left = tmp; }
if (bottom < top) { INT32 tmp = bottom; bottom = top; top = tmp; }
if ((dc->u.x.pen.style == PS_INSIDEFRAME) &&
(dc->u.x.pen.width < right-left-1) &&
(dc->u.x.pen.width < bottom-top-1))
oldwidth = width = dc->u.x.pen.width;
if (!width) width = 1;
if(dc->u.x.pen.style == PS_NULL) width = 0;
if ((dc->u.x.pen.style == PS_INSIDEFRAME))
{
left += dc->u.x.pen.width / 2;
right -= (dc->u.x.pen.width + 1) / 2;
top += dc->u.x.pen.width / 2;
bottom -= (dc->u.x.pen.width + 1) / 2;
if (2*width > (right-left)) width=(right-left + 1)/2;
if (2*width > (bottom-top)) width=(bottom-top + 1)/2;
left += width / 2;
right -= (width - 1) / 2;
top += width / 2;
bottom -= (width - 1) / 2;
}
if(width == 1) width=0;
dc->u.x.pen.width=width;
if (DC_SetupGCForBrush( dc ))
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
@ -218,6 +235,7 @@ X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
right-left-1, bottom-top-1, 0, 360*64 );
dc->u.x.pen.width=oldwidth;
return TRUE;
}
@ -228,39 +246,36 @@ X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
BOOL32
X11DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
{
INT32 width;
INT32 width, oldwidth;
TRACE(graphics, "(%d %d %d %d)\n",
left, top, right, bottom);
left = XLPTODP( dc, left );
top = YLPTODP( dc, top );
right = XLPTODP( dc, right );
bottom = YLPTODP( dc, bottom );
if ((left == right) || (top == bottom)) return TRUE;
if (right < left) { INT32 tmp = right; right = left; left = tmp; }
if (bottom < top) { INT32 tmp = bottom; bottom = top; top = tmp; }
if ((left == right) || (top == bottom))
{
#if 0
if (DC_SetupGCForPen( dc ))
TSXDrawLine(display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + top,
dc->w.DCOrgX + right,
dc->w.DCOrgY + bottom);
#endif
return TRUE;
}
width = dc->u.x.pen.width;
oldwidth = width = dc->u.x.pen.width;
if (!width) width = 1;
if(dc->u.x.pen.style == PS_NULL) width = 0;
if ((dc->u.x.pen.style == PS_INSIDEFRAME) &&
(width < right-left) && (width < bottom-top))
if ((dc->u.x.pen.style == PS_INSIDEFRAME))
{
if (2*width > (right-left)) width=(right-left + 1)/2;
if (2*width > (bottom-top)) width=(bottom-top + 1)/2;
left += width / 2;
right -= (width + 1) / 2;
right -= (width - 1) / 2;
top += width / 2;
bottom -= (width + 1) / 2;
bottom -= (width - 1) / 2;
}
if(width == 1) width=0;
dc->u.x.pen.width=width;
if ((right > left + width) && (bottom > top + width))
{
@ -274,6 +289,8 @@ X11DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
TSXDrawRectangle( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
right-left-1, bottom-top-1 );
dc->u.x.pen.width=oldwidth;
return TRUE;
}
@ -284,6 +301,8 @@ BOOL32
X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
INT32 bottom, INT32 ell_width, INT32 ell_height )
{
INT32 width, oldwidth;
TRACE(graphics, "(%d %d %d %d %d %d\n",
left, top, right, bottom, ell_width, ell_height);
@ -291,6 +310,10 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
top = YLPTODP( dc, top );
right = XLPTODP( dc, right );
bottom = YLPTODP( dc, bottom );
if ((left == right) || (top == bottom))
return TRUE;
ell_width = abs( ell_width * dc->vportExtX / dc->wndExtX );
ell_height = abs( ell_height * dc->vportExtY / dc->wndExtY );
@ -298,25 +321,62 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
if (right < left) { INT32 tmp = right; right = left; left = tmp; }
if (bottom < top) { INT32 tmp = bottom; bottom = top; top = tmp; }
if (ell_width > right - left) ell_width = right - left;
if (ell_height > bottom - top) ell_height = bottom - top;
oldwidth=width = dc->u.x.pen.width;
if (!width) width = 1;
if(dc->u.x.pen.style == PS_NULL) width = 0;
if ((dc->u.x.pen.style == PS_INSIDEFRAME))
{
if (2*width > (right-left)) width=(right-left + 1)/2;
if (2*width > (bottom-top)) width=(bottom-top + 1)/2;
left += width / 2;
right -= (width - 1) / 2;
top += width / 2;
bottom -= (width - 1) / 2;
}
if(width == 1) width=0;
dc->u.x.pen.width=width;
if (DC_SetupGCForBrush( dc ))
{
if (ell_width && ell_height)
{
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
if (ell_width > (right-left) )
if (ell_height > (bottom-top) )
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
right - left - 1, bottom - top - 1,
0, 360 * 64 );
else{
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
right - left - 1, ell_height, 0, 180 * 64 );
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + bottom - ell_height - 1,
right - left - 1, ell_height, 180 * 64, 180 * 64 );
}
else if (ell_height > (bottom-top) ){
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
ell_width, bottom - top - 1, 90 * 64, 180 * 64 );
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width -1, dc->w.DCOrgY + top,
ell_width, bottom - top - 1, 270 * 64, 180 * 64 );
}else{
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
ell_width, ell_height, 90 * 64, 90 * 64 );
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + bottom - ell_height,
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + bottom - ell_height - 1,
ell_width, ell_height, 180 * 64, 90 * 64 );
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width,
dc->w.DCOrgY + bottom - ell_height,
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width - 1,
dc->w.DCOrgY + bottom - ell_height - 1,
ell_width, ell_height, 270 * 64, 90 * 64 );
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width, dc->w.DCOrgY + top,
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width - 1,
dc->w.DCOrgY + top,
ell_width, ell_height, 0, 90 * 64 );
}
if (ell_width < right - left)
@ -328,61 +388,83 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left + ell_width / 2,
dc->w.DCOrgY + bottom - (ell_height+1) / 2,
right - left - ell_width, (ell_height+1) / 2 );
right - left - ell_width,
(ell_height+1) / 2 - 1 );
}
if (ell_height < bottom - top)
{
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + top + ell_height / 2,
right - left, bottom - top - ell_height );
right - left - 1, bottom - top - ell_height );
}
}
if (DC_SetupGCForPen(dc))
{
if (ell_width && ell_height)
{
if (DC_SetupGCForPen(dc)) {
if (ell_width > (right-left) )
if (ell_height > (bottom-top) )
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
right - left - 1, bottom -top - 1, 0 , 360 * 64 );
else{
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
right - left - 1, ell_height - 1, 0 , 180 * 64 );
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + bottom - ell_height,
right - left - 1, ell_height - 1, 180 * 64 , 180 * 64 );
}
else if (ell_height > (bottom-top) ){
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
ell_width - 1 , bottom - top - 1, 90 * 64 , 180 * 64 );
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width,
dc->w.DCOrgY + top,
ell_width - 1 , bottom - top - 1, 270 * 64 , 180 * 64 );
}else{
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
ell_width, ell_height, 90 * 64, 90 * 64 );
ell_width - 1, ell_height - 1, 90 * 64, 90 * 64 );
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left, dc->w.DCOrgY + bottom - ell_height,
ell_width, ell_height, 180 * 64, 90 * 64 );
ell_width - 1, ell_height - 1, 180 * 64, 90 * 64 );
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width,
dc->w.DCOrgY + bottom - ell_height,
ell_width, ell_height, 270 * 64, 90 * 64 );
ell_width - 1, ell_height - 1, 270 * 64, 90 * 64 );
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - ell_width, dc->w.DCOrgY + top,
ell_width, ell_height, 0, 90 * 64 );
ell_width - 1, ell_height - 1, 0, 90 * 64 );
}
if (ell_width < right - left)
{
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left + ell_width / 2 - 2,
dc->w.DCOrgY + top,
dc->w.DCOrgX + right - ell_width / 2,
dc->w.DCOrgY + top);
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left + ell_width / 2 - 2,
dc->w.DCOrgY + bottom - 1,
dc->w.DCOrgX + right - ell_width / 2,
dc->w.DCOrgY + bottom - 1);
}
if (ell_height < bottom - top)
{
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right - 1,
dc->w.DCOrgY + top + ell_height / 2 - 1,
dc->w.DCOrgX + right - 1,
dc->w.DCOrgY + bottom - ell_height / 2);
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + top + ell_height / 2 - 1,
dc->w.DCOrgX + left,
dc->w.DCOrgY + bottom - ell_height / 2);
}
if (ell_width < right - left)
{
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left + ell_width / 2,
dc->w.DCOrgY + top,
dc->w.DCOrgX + right - ell_width / 2,
dc->w.DCOrgY + top );
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left + ell_width / 2,
dc->w.DCOrgY + bottom,
dc->w.DCOrgX + right - ell_width / 2,
dc->w.DCOrgY + bottom );
}
if (ell_height < bottom - top)
{
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + right,
dc->w.DCOrgY + top + ell_height / 2,
dc->w.DCOrgX + right,
dc->w.DCOrgY + bottom - ell_height / 2 );
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + left,
dc->w.DCOrgY + top + ell_height / 2,
dc->w.DCOrgX + left,
dc->w.DCOrgY + bottom - ell_height / 2 );
}
}
dc->u.x.pen.width=oldwidth;
return TRUE;
}

View File

@ -89,7 +89,7 @@ static BUILTIN16_DLL BuiltinDLLs[] =
{ &GDI_Descriptor, DLL_FLAG_ALWAYS_USED },
{ &SYSTEM_Descriptor, DLL_FLAG_ALWAYS_USED },
{ &WPROCS_Descriptor, DLL_FLAG_ALWAYS_USED },
{ &WINDEBUG_Descriptor, DLL_FLAG_ALWAYS_USED },
{ &WINDEBUG_Descriptor, DLL_FLAG_NOT_USED },
{ &COMMDLG_Descriptor, DLL_FLAG_NOT_USED },
{ &COMPOBJ_Descriptor, DLL_FLAG_NOT_USED },
{ &DDEML_Descriptor, DLL_FLAG_NOT_USED },

View File

@ -139,7 +139,7 @@ file gdi.exe
151 pascal16 CopyMetaFile(word str) CopyMetaFile16
153 pascal16 CreateIC(str str str ptr) CreateIC16
154 pascal GetNearestColor(word long) GetNearestColor16
155 stub QueryAbort
155 pascal16 QueryAbort(word word) QueryAbort
156 pascal16 CreateDiscardableBitmap(word word word) CreateDiscardableBitmap16
158 pascal16 EnumCallback(ptr ptr word long) WineEnumDFontCallback
159 pascal16 GetMetaFileBits(word) GetMetaFileBits
@ -207,7 +207,7 @@ file gdi.exe
272 stub EndDocPrinter
274 stub ClosePrinter
280 stub GetRealDriverInfo
281 pascal DrvSetPrinterData(ptr ptr ptr ptr long) DrvSetPrinterData
281 pascal DrvSetPrinterData(ptr ptr long ptr long) DrvSetPrinterData
282 pascal DrvGetPrinterData(ptr ptr ptr ptr long ptr) DrvGetPrinterData
299 stub ENGINEGETCHARWIDTHEX
300 pascal EngineEnumerateFont(ptr segptr long) EngineEnumerateFont

View File

@ -149,7 +149,7 @@ file krnl386.exe
146 pascal16 DeleteFile(ptr) DeleteFile16
147 pascal16 SetLastError(long) SetLastError
148 pascal GetLastError() GetLastError
149 stub GetVersionEx
149 pascal16 GetVersionEx(ptr) GetVersionEx16
150 pascal16 DirectedYield(word) DirectedYield
151 stub WinOldApCall
152 pascal16 GetNumTasks() GetNumTasks

View File

@ -139,7 +139,7 @@ type win16
1100 pascal DRVOPEN(str str long) DrvOpen
1101 pascal DRVCLOSE(word long long) DrvClose
1102 pascal DRVSENDMESSAGE(word word long long) DrvSendMessage
1103 pascal DRVGETMODULEHANDLE(word) DrvGetModuleHandle
1103 pascal drvGetModuleHandle(word) DrvGetModuleHandle16
1104 pascal DRVDEFDRIVERPROC(long word word long long) DrvDefDriverProc
1120 pascal mmThreadCreate(ptr ptr long long) mmThreadCreate16
1121 pascal mmThreadSignal(word) mmThreadSignal16
@ -148,23 +148,25 @@ type win16
1124 stub MMTHREADISVALID
1125 pascal mmThreadGetTask(word) mmThreadGetTask16
1150 stub MMSHOWMMCPLPROPERTYSHEET
1210 pascal mmioOpen(str ptr long) mmioOpen16
1211 pascal MMIOCLOSE(word word) mmioClose
1212 pascal MMIOREAD(word ptr long) mmioRead
1213 pascal MMIOWRITE(word ptr long) mmioWrite
1214 pascal MMIOSEEK(word long word) mmioSeek
1215 pascal MMIOGETINFO(word ptr word) mmioGetInfo
1211 pascal mmioClose(word word) mmioClose16
1212 pascal mmioRead(word ptr long) mmioRead16
1213 pascal mmioWrite(word ptr long) mmioWrite16
1214 pascal mmioSeek(word long word) mmioSeek16
1215 pascal mmioGetInfo(word ptr word) mmioGetInfo16
1216 pascal MMIOSETINFO(word ptr word) mmioSetInfo
1217 pascal MMIOSETBUFFER(word ptr long word) mmioSetBuffer
1218 pascal MMIOFLUSH(word word) mmioFlush
1219 pascal MMIOADVANCE(word ptr word) mmioAdvance
1218 pascal mmioFlush(word word) mmioFlush16
1219 pascal mmioAdvance(word ptr word) mmioAdvance16
1220 pascal mmioStringToFOURCC(str word) mmioStringToFOURCC16
1221 pascal MMIOINSTALLIOPROC(long ptr long) mmioInstallIOProc16
1222 pascal MMIOSENDMESSAGE(word word long long) mmioSendMessage
1223 pascal MMIODESCEND(word ptr ptr word) mmioDescend
1224 pascal MMIOASCEND(word ptr word) mmioAscend
1224 pascal mmioAscend(word ptr word) mmioAscend16
1225 pascal MMIOCREATECHUNK(word ptr word) mmioCreateChunk
1226 pascal MMIORENAME(ptr ptr ptr long) mmioRename
#2000 stub WINMMF_THUNKDATA16
#2001 stub RING3_DEVLOADER
#2002 stub WINMMTILEBUFFER

View File

@ -253,7 +253,10 @@ void RELAY_DebugCallTo16( int* stack, int nb_args )
DPRINTF("CallTo16(func=%04lx:%04x,ds=%04lx",
CS_reg(context), IP_reg(context), DS_reg(context) );
nb_args = stack[1] / sizeof(WORD);
while (nb_args--) printf( ",0x%04x", *(--stack16) );
while (nb_args--) {
--stack16;
DPRINTF( ",0x%04x", *stack16 );
}
DPRINTF(") ss:sp=%04x:%04x\n", SELECTOROF(thdb->cur_stack),
OFFSETOF(thdb->cur_stack) );
DPRINTF(" AX=%04x BX=%04x CX=%04x DX=%04x SI=%04x DI=%04x BP=%04x ES=%04x\n",
@ -267,7 +270,10 @@ void RELAY_DebugCallTo16( int* stack, int nb_args )
HIWORD(stack[0]), LOWORD(stack[0]),
SELECTOROF(thdb->cur_stack) );
stack++;
while (nb_args--) DPRINTF(",0x%04x", *stack++ );
while (nb_args--) {
DPRINTF(",0x%04x", *stack );
stack++;
}
DPRINTF(") ss:sp=%04x:%04x\n", SELECTOROF(thdb->cur_stack),
OFFSETOF(thdb->cur_stack) );
}

View File

@ -255,10 +255,10 @@ file user.exe
248 pascal16 GetOpenClipboardWindow() GetOpenClipboardWindow16
249 pascal16 GetAsyncKeyState(word) GetAsyncKeyState16
250 pascal16 GetMenuState(word word word) GetMenuState16
251 pascal SendDriverMessage(word word long long) SendDriverMessage
252 pascal16 OpenDriver(str str long) OpenDriver
253 pascal CloseDriver(word long long) CloseDriver
254 pascal16 GetDriverModuleHandle(word) GetDriverModuleHandle
251 pascal SendDriverMessage(word word long long) SendDriverMessage16
252 pascal16 OpenDriver(str str long) OpenDriver16
253 pascal CloseDriver(word long long) CloseDriver16
254 pascal16 GetDriverModuleHandle(word) GetDriverModuleHandle16
255 pascal DefDriverProc(long word word long long) DefDriverProc
256 pascal16 GetDriverInfo(word ptr) GetDriverInfo
257 pascal16 GetNextDriver(word long) GetNextDriver
@ -477,7 +477,7 @@ file user.exe
529 pascal16 WNetPropertyDialog(word word ptr word) WNetPropertyDialog
530 pascal16 WNetGetDirectoryType(ptr ptr) WNetGetDirectoryType16
531 pascal16 WNetDirectoryNotify(word ptr word) WNetDirectoryNotify
532 pascal16 WNetGetPropertyText(word word word ptr word) WNetGetPropertyText
532 pascal16 WNetGetPropertyText(word word str str word word) WNetGetPropertyText
533 stub WNetInitialize
534 stub WNetLogon
600 pascal16 GetShellWindow() GetShellWindow16

View File

@ -13,6 +13,7 @@ type win16
28 pascal MyAlloc(word word word) NE_AllocateSegment
29 pascal DefResourceHandler(word word word) NE_DefResourceHandler
30 pascal FormatCharDlgProc(word word word long) FormatCharDlgProc16
31 pascal16 ASPI_DOS_func(long) ASPI_DOS_func
# Interrupt vectors 0-255 are ordinals 100-355
# The 'word' parameter are the flags pushed on the stack by the interrupt

View File

@ -21,6 +21,12 @@
/* Define if X libraries are not reentrant (compiled without -D_REENTRANT). */
#undef NO_REENTRANT_X11
/* Define if all debug messages are to be compiled out */
#undef NO_DEBUG_MSGS
/* Define if TRACE messages are to be compiled out */
#undef NO_TRACE_MSGS
/* Define if the struct statfs has the member bavail */
#undef STATFS_HAS_BAVAIL

View File

@ -7,6 +7,9 @@
#include "windows.h"
VOID WINAPI GetEffectiveClientRect (HWND32, LPRECT32, LPINT32);
void WINAPI InitCommonControls(void);
typedef struct tagINITCOMMONCONTROLSEX {
@ -76,11 +79,17 @@ BOOL32 WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
#define NM_TOOLTIPSCREATED (NM_FIRST-19)
/* callback constants */
#define LPSTR_TEXTCALLBACK32A ((LPSTR)-1L)
#define LPSTR_TEXTCALLBACK32W ((LPWSTR)-1L)
#define LPSTR_TEXTCALLBACK WINELIB_NAME_AW(LPSTR_TEXTCALLBACK)
/* StatusWindow */
#define STATUSCLASSNAME16 "msctls_statusbar"
#define STATUSCLASSNAME32A "msctls_statusbar32"
#define STATUSCLASSNAME32W L"msctls_statusbar32" /*FIXME*/
#define STATUSCLASSNAME32W L"msctls_statusbar32"
#define STATUSCLASSNAME WINELIB_NAME_AW(STATUSCLASSNAME)
#define SB_SETTEXT32A (WM_USER+1)
@ -497,47 +506,46 @@ typedef struct tagNMHEADERA
/* Toolbar */
#define TOOLBARCLASSNAME16 "ToolbarWindow"
#define TOOLBARCLASSNAME32W L"ToolbarWindow32"
#define TOOLBARCLASSNAME32A "ToolbarWindow32"
#define TOOLBARCLASSNAME16 "ToolbarWindow"
#define TOOLBARCLASSNAME32W L"ToolbarWindow32"
#define TOOLBARCLASSNAME32A "ToolbarWindow32"
#define TOOLBARCLASSNAME WINELIB_NAME_AW(TOOLBARCLASSNAME)
#define CMB_MASKED 0x02
#define TBSTATE_CHECKED 0x01
#define TBSTATE_PRESSED 0x02
#define TBSTATE_ENABLED 0x04
#define TBSTATE_HIDDEN 0x08
#define TBSTATE_INDETERMINATE 0x10
#define TBSTATE_WRAP 0x20
#define CMB_MASKED 0x02
#define TBSTATE_CHECKED 0x01
#define TBSTATE_PRESSED 0x02
#define TBSTATE_ENABLED 0x04
#define TBSTATE_HIDDEN 0x08
#define TBSTATE_INDETERMINATE 0x10
#define TBSTATE_WRAP 0x20
#define TBSTATE_ELLIPSES 0x40
#define TBSTATE_MARKED 0x80
#define TBSTYLE_BUTTON 0x00
#define TBSTYLE_SEP 0x01
#define TBSTYLE_CHECK 0x02
#define TBSTYLE_GROUP 0x04
#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
#define TBSTYLE_DROPDOWN 0x08
#define TBSTYLE_TOOLTIPS 0x0100
#define TBSTYLE_WRAPABLE 0x0200
#define TBSTYLE_ALTDRAG 0x0400
#define TBSTYLE_FLAT 0x0800
#define TBSTYLE_LIST 0x1000
#define TBSTYLE_CUSTOMERASE 0x2000
#define TBSTATE_MARKED 0x80
#define TBSTYLE_BUTTON 0x00
#define TBSTYLE_SEP 0x01
#define TBSTYLE_CHECK 0x02
#define TBSTYLE_GROUP 0x04
#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK)
#define TBSTYLE_DROPDOWN 0x08
#define TBSTYLE_TOOLTIPS 0x0100
#define TBSTYLE_WRAPABLE 0x0200
#define TBSTYLE_ALTDRAG 0x0400
#define TBSTYLE_FLAT 0x0800
#define TBSTYLE_LIST 0x1000
#define TBSTYLE_CUSTOMERASE 0x2000
#define TB_ENABLEBUTTON (WM_USER+1)
#define TB_CHECKBUTTON (WM_USER+2)
#define TB_PRESSBUTTON (WM_USER+3)
#define TB_HIDEBUTTON (WM_USER+4)
#define TB_INDETERMINATE (WM_USER+5)
#define TB_ISBUTTONENABLED (WM_USER+9)
#define TB_ISBUTTONCHECKED (WM_USER+10)
#define TB_ISBUTTONPRESSED (WM_USER+11)
#define TB_ISBUTTONHIDDEN (WM_USER+12)
#define TB_ISBUTTONENABLED (WM_USER+9)
#define TB_ISBUTTONCHECKED (WM_USER+10)
#define TB_ISBUTTONPRESSED (WM_USER+11)
#define TB_ISBUTTONHIDDEN (WM_USER+12)
#define TB_ISBUTTONINDETERMINATE (WM_USER+13)
#define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
#define TB_SETSTATE (WM_USER+17)
@ -558,8 +566,8 @@ typedef struct tagNMHEADERA
#define TB_SAVERESTORE32W (WM_USER+76)
#define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
#define TB_CUSTOMIZE (WM_USER+27)
#define TB_ADDSTRING32A (WM_USER+28)
#define TB_ADDSTRING32W (WM_USER+77)
#define TB_ADDSTRING32A (WM_USER+28)
#define TB_ADDSTRING32W (WM_USER+77)
#define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
#define TB_GETITEMRECT (WM_USER+29)
#define TB_BUTTONSTRUCTSIZE (WM_USER+30)
@ -571,6 +579,7 @@ typedef struct tagNMHEADERA
#define TB_SETPARENT (WM_USER+37)
#define TB_SETROWS (WM_USER+39)
#define TB_GETROWS (WM_USER+40)
#define TB_GETBITMAPFLAGS (WM_USER+41)
#define TB_SETCMDID (WM_USER+42)
#define TB_CHANGEBITMAP (WM_USER+43)
#define TB_GETBITMAP (WM_USER+44)
@ -594,6 +603,10 @@ typedef struct tagNMHEADERA
#define TB_SETMAXTEXTROWS (WM_USER+60)
#define TB_GETTEXTROWS (WM_USER+61)
#define TB_MAPACCELERATOR32A (WM_USER+78)
#define TB_MAPACCELERATOR32W (WM_USER+90)
#define TB_MAPACCELERATOR WINELIB_NAME_AW(TB_MAPACCELERATOR)
/* This is just for old CreateToolbar. */
/* Don't use it in new programs. */
@ -633,18 +646,12 @@ typedef struct tagTBADDBITMAP {
#define HINST_COMMCTRL ((HINSTANCE32)-1)
HWND32 WINAPI
CreateToolbar(HWND32, DWORD, UINT32, INT32, HINSTANCE32,
UINT32, LPCOLDTBBUTTON, INT32);
HWND32 WINAPI
CreateToolbarEx(HWND32, DWORD, UINT32, INT32,
HINSTANCE32, UINT32, LPCTBBUTTON,
INT32, INT32, INT32, INT32, INT32, UINT32);
HBITMAP32 WINAPI
CreateMappedBitmap (HINSTANCE32, INT32, UINT32, LPCOLORMAP, INT32);
HWND32 WINAPI CreateToolbar(HWND32, DWORD, UINT32, INT32, HINSTANCE32,
UINT32, LPCOLDTBBUTTON, INT32);
HWND32 WINAPI CreateToolbarEx(HWND32, DWORD, UINT32, INT32, HINSTANCE32,
UINT32, LPCTBBUTTON, INT32, INT32, INT32,
INT32, INT32, UINT32);
HBITMAP32 WINAPI CreateMappedBitmap (HINSTANCE32, INT32, UINT32,
LPCOLORMAP, INT32);
#endif /* __WINE_COMMCTRL_H */

View File

@ -485,6 +485,76 @@ typedef DEVNAMES * LPDEVNAMES;
#define CDERR_NOHOOK 0x000B
#define CDERR_REGISTERMSGFAIL 0x000C
/* PageSetupDlg stuff ... */
#define WM_PSD_PAGESETUPDLG (WM_USER )
#define WM_PSD_FULLPAGERECT (WM_USER+1)
#define WM_PSD_MINMARGINRECT (WM_USER+2)
#define WM_PSD_MARGINRECT (WM_USER+3)
#define WM_PSD_GREEKTEXTRECT (WM_USER+4)
#define WM_PSD_ENVSTAMPRECT (WM_USER+5)
#define WM_PSD_YAFULLPAGERECT (WM_USER+6)
typedef UINT32 (CALLBACK* LPPAGEPAINTHOOK)( HWND32, UINT32, WPARAM32, LPARAM );
typedef UINT32 (CALLBACK* LPPAGESETUPHOOK)( HWND32, UINT32, WPARAM32, LPARAM );
typedef struct tagPSD32A
{
DWORD lStructSize;
HWND32 hwndOwner;
HGLOBAL32 hDevMode;
HGLOBAL32 hDevNames;
DWORD Flags;
POINT32 ptPaperSize;
RECT32 rtMinMargin;
RECT32 rtMargin;
HINSTANCE32 hInstance;
LPARAM lCustData;
LPPAGESETUPHOOK lpfnPageSetupHook;
LPPAGEPAINTHOOK lpfnPagePaintHook;
LPCSTR lpPageSetupTemplateName;
HGLOBAL32 hPageSetupTemplate;
} PAGESETUPDLG32A,*LPPAGESETUPDLG32A;
typedef struct tagPSD32W
{
DWORD lStructSize;
HWND32 hwndOwner;
HGLOBAL32 hDevMode;
HGLOBAL32 hDevNames;
DWORD Flags;
POINT32 ptPaperSize;
RECT32 rtMinMargin;
RECT32 rtMargin;
HINSTANCE32 hInstance;
LPARAM lCustData;
LPPAGESETUPHOOK lpfnPageSetupHook;
LPPAGEPAINTHOOK lpfnPagePaintHook;
LPCWSTR lpPageSetupTemplateName;
HGLOBAL32 hPageSetupTemplate;
} PAGESETUPDLG32W,*LPPAGESETUPDLG32W;
DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
#define PSD_DEFAULTMINMARGINS 0x00000000
#define PSD_INWININIINTLMEASURE 0x00000000
#define PSD_MINMARGINS 0x00000001
#define PSD_MARGINS 0x00000002
#define PSD_INTHOUSANDTHSOFINCHES 0x00000004
#define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
#define PSD_DISABLEMARGINS 0x00000010
#define PSD_DISABLEPRINTER 0x00000020
#define PSD_NOWARNING 0x00000080
#define PSD_DISABLEORIENTATION 0x00000100
#define PSD_RETURNDEFAULT 0x00000400
#define PSD_DISABLEPAPER 0x00000200
#define PSD_SHOWHELP 0x00000800
#define PSD_ENABLEPAGESETUPHOOK 0x00002000
#define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
#define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
#define PSD_ENABLEPAGEPAINTHOOK 0x00040000
#define PSD_DISABLEPAGEPAINTING 0x00080000
BOOL16 WINAPI ChooseColor16(LPCHOOSECOLOR16 lpChCol);
BOOL32 WINAPI ChooseColor32A(LPCHOOSECOLOR32A lpChCol);
BOOL32 WINAPI ChooseColor32W(LPCHOOSECOLOR32W lpChCol);
@ -506,6 +576,9 @@ BOOL16 WINAPI GetSaveFileName16(SEGPTR ofn);
BOOL32 WINAPI GetSaveFileName32A(LPOPENFILENAME32A ofn);
BOOL32 WINAPI GetSaveFileName32W(LPOPENFILENAME32W ofn);
#define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
BOOL32 WINAPI PageSetupDlg32A( LPPAGESETUPDLG32A );
BOOL32 WINAPI PageSetupDlg32W( LPPAGESETUPDLG32W );
#define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
BOOL16 WINAPI PrintDlg( SEGPTR print);
HWND16 WINAPI ReplaceText16( SEGPTR find);
HWND32 WINAPI ReplaceText32A( LPFINDREPLACE32A lpFind);

View File

@ -33,6 +33,12 @@
/* Define if X libraries are not reentrant (compiled without -D_REENTRANT). */
#undef NO_REENTRANT_X11
/* Define if all debug messages are to be compiled out */
#undef NO_DEBUG_MSGS
/* Define if TRACE messages are to be compiled out */
#undef NO_TRACE_MSGS
/* Define if the struct statfs has the member bavail */
#undef STATFS_HAS_BAVAIL
@ -96,12 +102,18 @@
/* Define if you have the <machine/soundcard.h> header file. */
#undef HAVE_MACHINE_SOUNDCARD_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/cdio.h> header file. */
#undef HAVE_SYS_CDIO_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define if you have the <sys/modem.h> header file. */
#undef HAVE_SYS_MODEM_H
/* Define if you have the <sys/mount.h> header file. */
#undef HAVE_SYS_MOUNT_H
@ -114,6 +126,9 @@
/* Define if you have the <sys/statfs.h> header file. */
#undef HAVE_SYS_STATFS_H
/* Define if you have the <sys/strtio.h> header file. */
#undef HAVE_SYS_STRTIO_H
/* Define if you have the <sys/syscall.h> header file. */
#undef HAVE_SYS_SYSCALL_H

View File

@ -94,33 +94,34 @@
#define dbch_sendmsg 86
#define dbch_shell 87
#define dbch_shm 88
#define dbch_sound 89
#define dbch_static 90
#define dbch_stress 91
#define dbch_string 92
#define dbch_syscolor 93
#define dbch_system 94
#define dbch_task 95
#define dbch_text 96
#define dbch_thread 97
#define dbch_thunk 98
#define dbch_timer 99
#define dbch_toolbar 100
#define dbch_toolhelp 101
#define dbch_tweak 102
#define dbch_uitools 103
#define dbch_updown 104
#define dbch_ver 105
#define dbch_virtual 106
#define dbch_vxd 107
#define dbch_win 108
#define dbch_win16drv 109
#define dbch_win32 110
#define dbch_wing 111
#define dbch_winsock 112
#define dbch_wnet 113
#define dbch_x11 114
#define dbch_x11drv 115
#define dbch_snoop 89
#define dbch_sound 90
#define dbch_static 91
#define dbch_stress 92
#define dbch_string 93
#define dbch_syscolor 94
#define dbch_system 95
#define dbch_task 96
#define dbch_text 97
#define dbch_thread 98
#define dbch_thunk 99
#define dbch_timer 100
#define dbch_toolbar 101
#define dbch_toolhelp 102
#define dbch_tweak 103
#define dbch_uitools 104
#define dbch_updown 105
#define dbch_ver 106
#define dbch_virtual 107
#define dbch_vxd 108
#define dbch_win 109
#define dbch_win16drv 110
#define dbch_win32 111
#define dbch_wing 112
#define dbch_winsock 113
#define dbch_wnet 114
#define dbch_x11 115
#define dbch_x11drv 116
/* Definitions for classes identifiers */
#define dbcl_fixme 0
#define dbcl_err 1

View File

@ -4,7 +4,7 @@
#include "debugtools.h"
#endif
#define DEBUG_CHANNEL_COUNT 116
#define DEBUG_CHANNEL_COUNT 117
#ifdef DEBUG_RUNTIME
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
@ -123,6 +123,7 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
};
const char* debug_ch_name[] = {
"accel",
@ -214,6 +215,7 @@ const char* debug_ch_name[] = {
"sendmsg",
"shell",
"shm",
"snoop",
"sound",
"static",
"stress",

View File

@ -5,6 +5,7 @@
#ifdef __WINE__ /* Debugging interface is internal to Wine */
#include <stdio.h>
#include "config.h"
#include "debugstr.h"
#define DEBUG_RUNTIME
@ -39,18 +40,44 @@ extern short debug_msg_enabled[][DEBUG_CLASS_COUNT];
if(!DEBUGGING(cl, ch)) ; \
else DPRINTF(# cl ":" # ch ":%s " format, __FUNCTION__ , ## args)
/* use configure to allow user to compile out debugging messages */
#ifndef NO_TRACE_MSGS
#define TRACE(ch, fmt, args...) DPRINTF_(trace, ch, fmt, ## args)
#else
#define TRACE(ch, fmt, args...)
#endif /* NO_TRACE_MSGS */
#ifndef NO_DEBUG_MSGS
#define WARN(ch, fmt, args...) DPRINTF_(warn, ch, fmt, ## args)
#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)
#else
#define WARN(ch, fmt, args...)
#define FIXME(ch, fmt, args...)
#define DUMP(format, args...)
#endif /* NO_DEBUG_MSGS */
/* define error macro regardless of what is configured */
#define ERR(ch, fmt, args...) DPRINTF_(err, ch, fmt, ## 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)
/* if the debug message is compiled out, make these return false */
#ifndef NO_TRACE_MSGS
#define TRACE_ON(ch) DEBUGGING(trace, ch)
#else
#define TRACE_ON(ch) 0
#endif /* NO_TRACE_MSGS */
#ifndef NO_DEBUG_MSGS
#define WARN_ON(ch) DEBUGGING(warn, ch)
#define FIXME_ON(ch) DEBUGGING(fixme, ch)
#else
#define WARN_ON(ch) 0
#define FIXME_ON(ch) 0
#endif /* NO_DEBUG_MSGS */
#define ERR_ON(ch) DEBUGGING(err, ch)
#endif /* __WINE__ */

4
include/device.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef __WINE_DEVICE_H
#define __WINE_DEVICE_H
extern HANDLE32 DEVICE_Open( LPCSTR name, DWORD flags);
#endif

View File

@ -34,12 +34,16 @@
#define GND_FORWARD 0x00000000
#define GND_REVERSE 0x00000002
/* FIXME: unused? */
typedef struct {
DWORD dwDCISize;
LPCSTR lpszDCISectionName;
LPCSTR lpszDCIAliasName;
} DRVCONFIGINFO, *LPDRVCONFIGINFO;
} xDRVCONFIGINFO, *xLPDRVCONFIGINFO;
/* GetDriverInfo16 references this structure, so this a struct defined
* in the Win16 API.
*/
typedef struct
{
UINT16 length;
@ -48,6 +52,7 @@ typedef struct
CHAR szAliasName[128];
} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
/* FIXME: Is this a WINE internal struct? */
typedef struct tagDRIVERITEM
{
DRIVERINFOSTRUCT16 dis;
@ -57,14 +62,45 @@ typedef struct tagDRIVERITEM
DRIVERPROC16 lpDrvProc;
} DRIVERITEM, *LPDRIVERITEM;
/* internal */
typedef struct
{
UINT32 length;
HDRVR32 hDriver;
HMODULE32 hModule;
CHAR szAliasName[128];
} DRIVERINFOSTRUCT32A, *LPDRIVERINFOSTRUCT32A;
/* internal */
typedef struct tagDRIVERITEM32A {
DRIVERINFOSTRUCT32A dis;
DWORD count;
struct tagDRIVERITEM32A *next;
DRIVERPROC32 driverproc;
} DRIVERITEM32A,*LPDRIVERITEM32A;
LRESULT WINAPI DefDriverProc(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
LPARAM dwParam1, LPARAM dwParam2);
HDRVR16 WINAPI OpenDriver(LPSTR szDriverName, LPSTR szSectionName,
LPARAM lParam2);
LRESULT WINAPI CloseDriver(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI SendDriverMessage( HDRVR16 hDriver, UINT16 message,
LPARAM lParam1, LPARAM lParam2 );
HMODULE16 WINAPI GetDriverModuleHandle(HDRVR16 hDriver);
HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
LPARAM lParam2);
HDRVR32 WINAPI OpenDriver32A(LPCSTR szDriverName, LPCSTR szSectionName,
LPARAM lParam2);
HDRVR32 WINAPI OpenDriver32W(LPCWSTR szDriverName, LPCWSTR szSectionName,
LPARAM lParam2);
#define OpenDriver WINELIB_NAME_AW(OpenDriver)
LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI CloseDriver32(HDRVR32 hDriver, LPARAM lParam1, LPARAM lParam2);
#define CloseDriver WINELIB_NAME(CloseDriver)
LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message,
LPARAM lParam1, LPARAM lParam2 );
LRESULT WINAPI SendDriverMessage32( HDRVR32 hDriver, UINT32 message,
LPARAM lParam1, LPARAM lParam2 );
#define SendDriverMessage WINELIB_NAME(SendDriverMessage)
HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
HMODULE32 WINAPI GetDriverModuleHandle32(HDRVR32 hDriver);
#define GetDriverModuleHandle WINELIB_NAME(GetDriverModuleHandle)
/* only win31 version for those below ? */
HDRVR16 WINAPI GetNextDriver(HDRVR16, DWORD);
BOOL16 WINAPI GetDriverInfo(HDRVR16, DRIVERINFOSTRUCT16 *);

View File

@ -35,6 +35,8 @@ typedef struct
/* files/file.c */
extern FILE_OBJECT *FILE_GetFile( HFILE32 handle );
extern HFILE32 FILE_Alloc( FILE_OBJECT **file );
extern void FILE_SetDosError(void);
extern HFILE32 FILE_DupUnixHandle( int fd );
extern BOOL32 FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info );

View File

@ -130,6 +130,7 @@ typedef struct
INT32 GraphicsMode; /* Graphics mode */
INT32 DCOrgX; /* DC origin */
INT32 DCOrgY;
FARPROC16 lpfnPrint; /* AbortProc for Printing */
INT32 CursPosX; /* Current position */
INT32 CursPosY;
INT32 ArcDirection;

View File

@ -25,7 +25,8 @@ extern BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle );
extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner,
BOOL16 isCode, BOOL16 is32Bit,
BOOL16 isReadOnly );
extern WORD GlobalHandleToSel( HGLOBAL16 handle );
extern WORD WINAPI GlobalHandleToSel( HGLOBAL16 handle );
/* memory/virtual.c */
extern BOOL32 VIRTUAL_Init( void );

View File

@ -43,6 +43,9 @@ extern void SIGNAL_MaskAsyncEvents( BOOL32 flag );
/* if1632/signal.c */
extern BOOL32 SIGNAL_InitEmulator(void);
/* misc/aspi.c */
extern void ASPI_DOS_HandleInt(CONTEXT *context);
#define INT_BARF(context,num) \
fprintf( stderr, "int%x: unknown/not implemented parameters:\n" \
"int%x: AX %04x, BX %04x, CX %04x, DX %04x, " \

View File

@ -1580,54 +1580,64 @@ LPMMIOPROC32 WINAPI mmioInstallIOProc32A(FOURCC,LPMMIOPROC32,DWORD);
LPMMIOPROC32 WINAPI mmioInstallIOProc32W(FOURCC,LPMMIOPROC32,DWORD);
#define mmioInstallIOPro WINELIB_NAME_AW(mmioInstallIOProc)
FOURCC WINAPI mmioStringToFOURCC16(LPCSTR sz, UINT16 uFlags);
FOURCC WINAPI mmioStringToFOURCC32A(LPCSTR sz, UINT32 uFlags);
FOURCC WINAPI mmioStringToFOURCC32W(LPCWSTR sz, UINT32 uFlags);
FOURCC WINAPI mmioStringToFOURCC16(LPCSTR,UINT16);
FOURCC WINAPI mmioStringToFOURCC32A(LPCSTR,UINT32);
FOURCC WINAPI mmioStringToFOURCC32W(LPCWSTR,UINT32);
#define mmioStringToFOURCC WINELIB_NAME_AW(mmioStringToFOURCC)
HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16 * lpmmioinfo, DWORD dwOpenFlags);
HMMIO32 WINAPI mmioOpen32A(LPSTR szFileName, MMIOINFO32 * lpmmioinfo, DWORD dwOpenFlags);
HMMIO32 WINAPI mmioOpen32W(LPWSTR szFileName, MMIOINFO32 * lpmmioinfo, DWORD dwOpenFlags);
#define mmioOpen WINELIB_NAME_AW(mmioOpen)
HMMIO16 WINAPI mmioOpen16 (LPSTR ,MMIOINFO16*,DWORD);
HMMIO32 WINAPI mmioOpen32A(LPSTR ,MMIOINFO32*,DWORD);
HMMIO32 WINAPI mmioOpen32W(LPWSTR,MMIOINFO32*,DWORD);
#define mmioOpen WINELIB_NAME_AW(mmioOpen)
UINT16 WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
UINT16 WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
MMIOINFO16 * lpmmioinfo, DWORD dwRenameFlags);
UINT16 WINAPI mmioClose(HMMIO16 hmmio, UINT16 uFlags);
LONG WINAPI mmioRead(HMMIO16 hmmio, HPSTR pch, LONG cch);
LONG WINAPI mmioWrite(HMMIO16 hmmio, HPCSTR pch, LONG cch);
LONG WINAPI mmioSeek(HMMIO16 hmmio, LONG lOffset, int iOrigin);
UINT16 WINAPI mmioGetInfo(HMMIO16 hmmio, MMIOINFO16 * lpmmioinfo, UINT16 uFlags);
UINT16 WINAPI mmioSetInfo(HMMIO16 hmmio, const MMIOINFO16 * lpmmioinfo, UINT16 uFlags);
UINT16 WINAPI mmioSetBuffer(HMMIO16 hmmio, LPSTR pchBuffer, LONG cchBuffer,
UINT16 uFlags);
UINT16 WINAPI mmioFlush(HMMIO16 hmmio, UINT16 uFlags);
UINT16 WINAPI mmioAdvance(HMMIO16 hmmio, MMIOINFO16 * lpmmioinfo, UINT16 uFlags);
LONG WINAPI mmioSendMessage(HMMIO16 hmmio, UINT16 uMessage,
LPARAM lParam1, LPARAM lParam2);
UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
const MMCKINFO * lpckParent, UINT16 uFlags);
UINT16 WINAPI mmioAscend(HMMIO16 hmmio, MMCKINFO * lpck, UINT16 uFlags);
UINT16 WINAPI mmioCreateChunk(HMMIO16 hmmio, MMCKINFO * lpck, UINT16 uFlags);
MMRESULT16 WINAPI mmioClose16(HMMIO16,UINT16);
MMRESULT32 WINAPI mmioClose32(HMMIO32,UINT32);
#define mmioClose WINELIB_NAME(mmioClose)
LONG WINAPI mmioRead16(HMMIO16,HPSTR,LONG);
LONG WINAPI mmioRead32(HMMIO32,HPSTR,LONG);
#define mmioRead WINELIB_NAME(mmioRead)
LONG WINAPI mmioWrite16(HMMIO16,HPCSTR,LONG);
LONG WINAPI mmioWrite32(HMMIO32,HPCSTR,LONG);
#define mmioWrite WINELIB_NAME(mmioWrite)
LONG WINAPI mmioSeek16(HMMIO16,LONG,INT16);
LONG WINAPI mmioSeek32(HMMIO32,LONG,INT32);
#define mmioSeek WINELIB_NAME(mmioSeek)
typedef UINT16 (CALLBACK *YIELDPROC) (UINT16 uDeviceID, DWORD dwYieldData);
MMRESULT16 WINAPI mmioGetInfo16(HMMIO16,MMIOINFO16*,UINT16);
MMRESULT32 WINAPI mmioGetInfo32(HMMIO32,MMIOINFO32*,UINT32);
#define mmioGetInfo WINELIB_NAME(mmioGetInfo)
MMRESULT16 WINAPI mmioSetInfo(HMMIO16,const MMIOINFO16*,UINT16);
UINT16 WINAPI mmioSetBuffer(HMMIO16,LPSTR,LONG,UINT16);
UINT16 WINAPI mmioFlush16(HMMIO16,UINT16);
UINT32 WINAPI mmioFlush32(HMMIO32,UINT32);
#define mmioFlush WINELIB_NAME(mmioFlush)
DWORD WINAPI mciSendCommand (UINT16 uDeviceID, UINT16 uMessage,
DWORD dwParam1, DWORD dwParam2);
DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
LPSTR lpstrReturnString, UINT16 uReturnLength,
HWND16 hwndCallback);
UINT16 WINAPI mciGetDeviceID (LPCSTR lpstrName);
UINT16 WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID,
LPCSTR lpstrType);
UINT16 WINAPI mmioAdvance16(HMMIO16,MMIOINFO16*,UINT16);
UINT32 WINAPI mmioAdvance32(HMMIO32,MMIOINFO32*,UINT32);
#define mmioAdvance WINELIB_NAME(mmioAdvance)
LONG WINAPI mmioSendMessage(HMMIO16,UINT16,LPARAM,LPARAM);
UINT16 WINAPI mmioDescend(HMMIO16,MMCKINFO*,const MMCKINFO*,UINT16);
UINT16 WINAPI mmioAscend16(HMMIO16,MMCKINFO*,UINT16);
UINT32 WINAPI mmioAscend32(HMMIO32,MMCKINFO*,UINT32);
#define mmioAscend WINELIB_NAME(mmioAscend)
UINT16 WINAPI mmioCreateChunk(HMMIO16,MMCKINFO*,UINT16);
typedef UINT16 (CALLBACK *YIELDPROC)(UINT16,DWORD);
DWORD WINAPI mciSendCommand (UINT16,UINT16,DWORD,DWORD);
DWORD WINAPI mciSendString (LPCSTR,LPSTR,UINT16,HWND16);
UINT16 WINAPI mciGetDeviceID(LPCSTR);
UINT16 WINAPI mciGetDeviceIDFromElementID(DWORD,LPCSTR);
BOOL16 WINAPI mciGetErrorString16 (DWORD,LPSTR,UINT16);
BOOL32 WINAPI mciGetErrorString32A(DWORD,LPSTR,UINT32);
BOOL32 WINAPI mciGetErrorString32W(DWORD,LPWSTR,UINT32);
#define mciGetErrorString WINELIB_NAME_AW(mciGetErrorString)
BOOL16 WINAPI mciSetYieldProc (UINT16 uDeviceID, YIELDPROC fpYieldProc,
DWORD dwYieldData);
BOOL16 WINAPI mciSetYieldProc (UINT16,YIELDPROC,DWORD);
HTASK16 WINAPI mciGetCreatorTask(UINT16 uDeviceID);
YIELDPROC WINAPI mciGetYieldProc (UINT16 uDeviceID, DWORD * lpdwYieldData);
HTASK16 WINAPI mciGetCreatorTask(UINT16);
YIELDPROC WINAPI mciGetYieldProc(UINT16,DWORD*);
#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)

View File

@ -193,6 +193,6 @@ extern BYTE DOS_ErrorClass, DOS_ErrorAction, DOS_ErrorLocus;
#define EL_Memory 0x05
void WINAPI DOS3Call( CONTEXT *context );
void do_mscdex( CONTEXT *context );
void do_mscdex( CONTEXT *context, int dorealmode );
#endif /* __WINE_MSDOS_H */

8
include/snoop.h Normal file
View File

@ -0,0 +1,8 @@
/*
* Definitions for inter-win32-dll snooping
*/
#ifndef __WINE_SNOOP_H
#define __WINE_SNOOP_H
extern void SNOOP_RegisterDLL(HMODULE32 hmod,LPCSTR name,DWORD nrofordinals);
extern FARPROC32 SNOOP_GetProcAddress32(HMODULE32 hmod,LPCSTR name,DWORD ordinal,FARPROC32 origfun);
#endif

View File

@ -25,6 +25,7 @@ typedef struct
UINT32 height;
BOOL32 simple;
HFONT32 hFont;
HFONT32 hDefaultFont;
COLORREF clrBk; /* background color */
STATUSWINDOWPART part0; /* simple window */
STATUSWINDOWPART *parts;

View File

@ -13,8 +13,8 @@
/* Constant system metrics */
#if 0
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXDLGFRAME 2
#define SYSMETRICS_CYDLGFRAME 2
#define SYSMETRICS_CXDLGFRAME 3
#define SYSMETRICS_CYDLGFRAME 3
#define SYSMETRICS_CYVTHUMB 13
#define SYSMETRICS_CXHTHUMB 13
#else
@ -123,8 +123,8 @@
/* Use the following instead of sysMetrics[SM_CXMENUCHECK] GetMenuCheckMarkDimensions()! */
#define SYSMETRICS_CXMENUCHECK sysMetrics[SM_CXMENUCHECK] /* 71 */
#define SYSMETRICS_CYMENUCHECK sysMetrics[SM_CYMENUCHECK] /* 72 */
#define SYSMETRICS_SLOWMACHINE sysMetrics[SM_SLOWMACHINE] /* 73 */
#define SYSMETRICS_MIDEASTENABLED sysMetrics[SM_MIDEASTENABLED] /* 74 */
#define SYSMETRICS_MOUSEWHEELPRESENT sysMetrics[SM_MOUSEWHEELPRESENT] /* 75 */

View File

@ -24,19 +24,20 @@ typedef struct tagTBUTTON_INFO
typedef struct tagTOOLBAR_INFO
{
DWORD dwStructSize; /* Size of TBBUTTON-Struct */
INT32 nHeight; /* Height of the Toolbar */
INT32 nWidth; /* Width of the Toolbar */
DWORD dwStructSize; /* size of TBBUTTON struct */
INT32 nHeight; /* height of the toolbar */
INT32 nWidth; /* width of the toolbar */
INT32 nButtonTop; /* top of the button rectangle */
INT32 nButtonHeight;
INT32 nButtonWidth;
INT32 nBitmapHeight;
INT32 nBitmapWidth;
INT32 nIndent;
INT32 nMaxRows; /* maximum number of rows */
INT32 nNumButtons; /* Number of buttons */
INT32 nNumBitmaps;
INT32 nNumStrings;
INT32 nNumButtons; /* number of buttons */
INT32 nNumBitmaps; /* number of bitmaps */
INT32 nNumStrings; /* number of strings */
BOOL32 bCaptured;
INT32 nButtonDown;
@ -45,8 +46,11 @@ typedef struct tagTOOLBAR_INFO
HIMAGELIST himlDef; /* default image list */
HIMAGELIST himlHot; /* hot image list */
HIMAGELIST himlDis; /* disabled image list */
HWND32 hwndToolTip; /* handle to tool tip control */
HWND32 hwndNotify; /* handle to the window that gets notifications */
TBUTTON_INFO *buttons;
CHAR **strings;
} TOOLBAR_INFO;

View File

@ -1 +1 @@
#define WINE_RELEASE_INFO "Wine release 980601"
#define WINE_RELEASE_INFO "Wine release 980614"

View File

@ -142,6 +142,15 @@ typedef struct {
DWORD Reserved;
}CRITICAL_SECTION;
typedef struct {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[128];
} OSVERSIONINFO16;
typedef struct {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
@ -167,6 +176,7 @@ DECL_WINELIB_TYPE_AW(OSVERSIONINFO)
#define VER_PLATFORM_WIN32_NT 2
/*DWORD WINAPI GetVersion( void );*/
BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16*);
BOOL32 WINAPI GetVersionEx32A(OSVERSIONINFO32A*);
BOOL32 WINAPI GetVersionEx32W(OSVERSIONINFO32W*);
#define GetVersionEx WINELIB_NAME_AW(GetVersionEx)

View File

@ -467,6 +467,9 @@ DECL_WINELIB_TYPE(LPNCCALCSIZE_PARAMS)
#define HTZOOM HTMAXBUTTON
/* WM_SYSCOMMAND parameters */
#ifdef SC_SIZE /* at least HP-UX: already defined in /usr/include/sys/signal.h */
#undef SC_SIZE
#endif
#define SC_SIZE 0xf000
#define SC_MOVE 0xf010
#define SC_MINIMIZE 0xf020
@ -3611,6 +3614,25 @@ DECL_WINELIB_TYPE(DRAWSTATEPROC)
#define WS_EX_ACCEPTFILES 0x00000010L
#define WS_EX_TRANSPARENT 0x00000020L
/* New Win95/WinNT4 styles */
#define WS_EX_MDICHILD 0x00000040L
#define WS_EX_TOOLWINDOW 0x00000080L
#define WS_EX_WINDOWEDGE 0x00000100L
#define WS_EX_CLIENTEDGE 0x00000200L
#define WS_EX_CONTEXTHELP 0x00000400L
#define WS_EX_RIGHT 0x00001000L
#define WS_EX_LEFT 0x00000000L
#define WS_EX_RTLREADING 0x00002000L
#define WS_EX_LTRREADING 0x00000000L
#define WS_EX_LEFTSCROLLBAR 0x00004000L
#define WS_EX_RIGHTSCROLLBAR 0x00000000L
#define WS_EX_CONTROLPARENT 0x00010000L
#define WS_EX_STATICEDGE 0x00020000L
#define WS_EX_APPWINDOW 0x00040000L
#define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE|WS_EX_CLIENTEDGE)
#define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST)
/* Window scrolling */
#define SW_SCROLLCHILDREN 0x0001
#define SW_INVALIDATE 0x0002
@ -6046,6 +6068,13 @@ typedef struct _WIN32_FILE_ATTRIBUTES_DATA {
DWORD nFileSizeLow;
} WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
typedef struct _DllVersionInfo {
DWORD cbSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformID;
} DLLVERSIONINFO;
@ -6213,6 +6242,8 @@ VOID WINAPI hmemcpy(LPVOID,LPCVOID,LONG);
BOOL32 WINAPI AllocConsole(void);
BOOL32 WINAPI AreFileApisANSI(void);
BOOL32 WINAPI Beep(DWORD,DWORD);
WORD WINAPI CascadeWindows (HWND32, UINT32, const LPRECT32,
UINT32, const HWND32 *);
BOOL32 WINAPI ClearCommError(INT32,LPDWORD,LPCOMSTAT);
BOOL32 WINAPI CloseHandle(HANDLE32);
BOOL32 WINAPI CloseServiceHandle(HANDLE32);
@ -6341,6 +6372,8 @@ BOOL32 WINAPI GetFileAttributesEx32A(LPCSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
BOOL32 WINAPI GetFileAttributesEx32W(LPCWSTR,GET_FILEEX_INFO_LEVELS,LPVOID);
#define GetFileattributesEx WINELIB_NAME_AW(GetFileAttributesEx)
DWORD WINAPI GetFileInformationByHandle(HFILE32,BY_HANDLE_FILE_INFORMATION*);
BOOL32 WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,LPSECURITY_DESCRIPTOR,DWORD,LPDWORD);
BOOL32 WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,LPSECURITY_DESCRIPTOR,DWORD,LPDWORD);
DWORD WINAPI GetFileSize(HFILE32,LPDWORD);
BOOL32 WINAPI GetFileTime(HFILE32,LPFILETIME,LPFILETIME,LPFILETIME);
DWORD WINAPI GetFileType(HFILE32);
@ -6566,6 +6599,8 @@ BOOL32 WINAPI StartService32A(HANDLE32,DWORD,LPCSTR*);
BOOL32 WINAPI StartService32W(HANDLE32,DWORD,LPCWSTR*);
#define StartService WINELIB_NAME_AW(StartService)
BOOL32 WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
WORD WINAPI TileWindows (HWND32, UINT32, const LPRECT32,
UINT32, const HWND32 *);
BOOL32 WINAPI TrackPopupMenuEx(HMENU32,UINT32,INT32,INT32,HWND32,
LPTPMPARAMS);
DWORD WINAPI TlsAlloc(void);
@ -7150,8 +7185,8 @@ BOOL32 WINAPI Ellipse32(HDC32,INT32,INT32,INT32,INT32);
BOOL16 WINAPI EmptyClipboard16(void);
BOOL32 WINAPI EmptyClipboard32(void);
#define EmptyClipboard WINELIB_NAME(EmptyClipboard)
BOOL16 WINAPI EnableMenuItem16(HMENU16,UINT16,UINT16);
BOOL32 WINAPI EnableMenuItem32(HMENU32,UINT32,UINT32);
UINT16 WINAPI EnableMenuItem16(HMENU16,UINT16,UINT16);
UINT32 WINAPI EnableMenuItem32(HMENU32,UINT32,UINT32);
#define EnableMenuItem WINELIB_NAME(EnableMenuItem)
BOOL16 WINAPI EnableScrollBar16(HWND16,INT16,UINT16);
BOOL32 WINAPI EnableScrollBar32(HWND32,INT32,UINT32);
@ -8019,6 +8054,9 @@ HCURSOR16 WINAPI LoadCursor16(HINSTANCE16,SEGPTR);
HCURSOR32 WINAPI LoadCursor32A(HINSTANCE32,LPCSTR);
HCURSOR32 WINAPI LoadCursor32W(HINSTANCE32,LPCWSTR);
#define LoadCursor WINELIB_NAME_AW(LoadCursor)
HCURSOR32 WINAPI LoadCursorFromFile32A(LPCSTR);
HCURSOR32 WINAPI LoadCursorFromFile32W(LPCWSTR);
#define LoadCursorFromFile WINELIB_NAME_AW(LoadCursorFromFile)
HICON16 WINAPI LoadIcon16(HINSTANCE16,SEGPTR);
HICON32 WINAPI LoadIcon32A(HINSTANCE32,LPCSTR);
HICON32 WINAPI LoadIcon32W(HINSTANCE32,LPCWSTR);

View File

@ -31,6 +31,7 @@ extern int WIN32_LastError;
#define ERROR_NOT_ENOUGH_MEMORY 8
#define ERROR_BAD_FORMAT 11
#define ERROR_INVALID_ACCESS 12
#define ERROR_INVALID_DATA 13
#define ERROR_OUTOFMEMORY 14
#define ERROR_NO_MORE_FILES 18
#define ERROR_SHARING_VIOLATION 32
@ -57,6 +58,7 @@ extern int WIN32_LastError;
#define ERROR_INVALID_ADDRESS 487
#define ERROR_CAN_NOT_COMPLETE 1003
#define ERROR_BADKEY 1010 /* Config reg key invalid */
#define ERROR_CANTREAD 1012 /* Config reg key couldn't be read */
#define ERROR_CANTWRITE 1013 /* Config reg key couldn't be written */
#define ERROR_IO_DEVICE 1117
#define ERROR_POSSIBLE_DEADLOCK 1131
@ -65,6 +67,7 @@ extern int WIN32_LastError;
#define ERROR_ALREADY_INITIALIZED 1247
#define ERROR_PRIVILEGE_NOT_HELD 1314
#define ERROR_COMMITMENT_LIMIT 1455
#define ERROR_INVALID_PRINTER_NAME 1801
/* HRESULT values for OLE, SHELL and other Interface stuff */
#define NOERROR 0

View File

@ -8,6 +8,7 @@
#define __WINE_WINNT_H
#include "wintypes.h"
#include "windows.h"
/* Heap flags */
@ -97,6 +98,7 @@ typedef struct
DWORD SegSs;
} CONTEXT, *PCONTEXT;
typedef HANDLE32 *PHANDLE;
#ifdef __WINE__
@ -272,6 +274,164 @@ DWORD WINAPI UnhandledExceptionFilter( PEXCEPTION_POINTERS epointers );
LPTOP_LEVEL_EXCEPTION_FILTER
WINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter );
/*
* Here follows typedefs for security and tokens.
*/
/*
* First a constant for the following typdefs.
*/
#define ANYSIZE_ARRAY 1
/*
* TOKEN_INFORMATION_CLASS
*/
typedef enum _TOKEN_INFORMATION_CLASS {
TokenUser = 1,
TokenGroups,
TokenPrivileges,
TokenOwner,
TokenPrimaryGroup,
TokenDefaultDacl,
TokenSource,
TokenType,
TokenImpersonationLevel,
TokenStatistics
} TOKEN_INFORMATION_CLASS;
/*
* SID_AND_ATTRIBUTES
*/
typedef struct _SID_AND_ATTRIBUTES {
PSID Sid;
DWORD Attributes;
} SID_AND_ATTRIBUTES ;
/*
* TOKEN_USER
*/
typedef struct _TOKEN_USER {
SID_AND_ATTRIBUTES User;
} TOKEN_USER;
/*
* TOKEN_GROUPS
*/
typedef struct _TOKEN_GROUPS {
DWORD GroupCount;
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
} TOKEN_GROUPS;
/*
* LUID_AND_ATTRIBUTES
*/
typedef struct _LUID_AND_ATTRIBUTES {
LUID Luid;
DWORD Attributes;
} LUID_AND_ATTRIBUTES;
/*
* TOKEN_PRIVILEGES
*/
typedef struct _TOKEN_PRIVILEGES {
DWORD PrivilegeCount;
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
} TOKEN_PRIVILEGES;
/*
* TOKEN_OWNER
*/
typedef struct _TOKEN_OWNER {
PSID Owner;
} TOKEN_OWNER;
/*
* TOKEN_PRIMARY_GROUP
*/
typedef struct _TOKEN_PRIMARY_GROUP {
PSID PrimaryGroup;
} TOKEN_PRIMARY_GROUP;
/*
* ACL (and PACL LPACL?).
*/
/*
are defined in ntddl.h.
typedef struct _ACL {
BYTE AclRevision;
BYTE Sbz1;
WORD AclSize;
WORD AceCount;
WORD Sbz2;
} ACL, *PACL; PACL <=> LPACL? */
/*
* TOKEN_DEFAULT_DACL
*/
typedef struct _TOKEN_DEFAULT_DACL {
LPACL DefaultDacl;
} TOKEN_DEFAULT_DACL;
/*
* TOKEN_SOURCEL
*/
typedef struct _TOKEN_SOURCE {
char Sourcename[8];
LUID SourceIdentifier;
} TOKEN_SOURCE;
/*
* TOKEN_TYPE
*/
typedef enum tagTOKEN_TYPE {
TokenPrimary = 1,
TokenImpersonation
} TOKEN_TYPE;
/*
* SECURITY_IMPERSONATION_LEVEL
*/
typedef enum _SECURITY_IMPERSONATION_LEVEL {
SecurityAnonymous,
SecurityIdentification,
SecurityImpersonation,
SecurityDelegation
} SECURITY_IMPERSONATION_LEVEL;
/*
* TOKEN_STATISTICS
*/
typedef struct _TOKEN_STATISTICS {
LUID TokenId;
LUID AuthenticationId;
LARGE_INTEGER ExpirationTime;
TOKEN_TYPE TokenType;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
DWORD DynamicCharged;
DWORD DynamicAvailable;
DWORD GroupCount;
DWORD PrivilegeCount;
LUID ModifiedId;
} TOKEN_STATISTICS;
/* I moved the Language IDs to winnls.h (David Lee Lambert) */

View File

@ -53,11 +53,12 @@
#define HKEY_CURRENT_CONFIG 0x80000005
#define HKEY_DYN_DATA 0x80000006
#define REG_OPTION_RESERVED 0x00000000
#define REG_OPTION_NON_VOLATILE 0x00000000
#define REG_OPTION_VOLATILE 0x00000001
#define REG_OPTION_CREATE_LINK 0x00000002
#define REG_OPTION_TAINTED 0x80000000
#define REG_OPTION_RESERVED 0x00000000
#define REG_OPTION_NON_VOLATILE 0x00000000
#define REG_OPTION_VOLATILE 0x00000001
#define REG_OPTION_CREATE_LINK 0x00000002
#define REG_OPTION_BACKUP_RESTORE 0x00000004 /* FIXME */
#define REG_OPTION_TAINTED 0x80000000 /* Internal? */
#define REG_CREATED_NEW_KEY 0x00000001
#define REG_OPENED_EXISTING_KEY 0x00000002

View File

@ -20,13 +20,13 @@ C_SRCS = \
RC_SRCS = \
hello3res.rc
all: check_winerc $(PROGRAMS)
all: check_wrc $(PROGRAMS)
depend:: $(RC_SRCS:.rc=.h)
@MAKE_RULES@
$(RC_SRCS:.rc=.c) $(RC_SRCS:.rc=.h): $(WINERC)
$(RC_SRCS:.rc=.s): $(WRC)
expand: expand.o
$(CC) -o expand expand.o $(LDOPTIONS) $(ALL_LIBS)

View File

@ -1,3 +1,5 @@
#include "windows.h"
MAIN MENU
{
POPUP "Menu demo" {
@ -7,7 +9,7 @@ MAIN MENU
}
}
BITDEMO BITMAP "../rc/winelogo.bmp"
/*BITDEMO BITMAP "../rc/winelogo.bmp"*/
DIADEMO DIALOG 20, 20, 179, 118
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_VISIBLE | WS_SYSMENU
@ -20,9 +22,6 @@ BEGIN
CONTROL "Edit control", 103, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 18, 41, 44, 13
CONTROL "Radio button", 104, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 17, 23, 58, 12
CONTROL "Checkbox", 101, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 19, 76, 47, 12
#if 1
CONTROL "", 106, "COMBOBOX", CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 86, 23, 86, 85
#else
CONTROL "", 106, "LISTBOX", LBS_STANDARD | LBS_DISABLENOSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 86, 23, 86, 85
#endif
/* CONTROL "", 106, "LISTBOX", LBS_STANDARD | LBS_DISABLENOSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 86, 23, 86, 85 */
END

View File

@ -173,7 +173,7 @@ FARPROC16 MODULE_GetWndProcEntry16( LPCSTR name )
return (FARPROC16)PrintSetupDlgProc;
if (!strcmp(name,"ReplaceTextDlgProc"))
return (FARPROC16)ReplaceTextDlgProc16;
WARN(module,"No mapping for %s(), add one in library/miscstubs.c\n",name);
FIXME(module,"No mapping for %s(), add one in library/miscstubs.c\n",name);
assert( FALSE );
return NULL;
}
@ -496,7 +496,7 @@ HMODULE32 WINAPI LoadLibraryEx32W(LPCWSTR libnameW,HFILE32 hfile,DWORD flags)
*/
BOOL32 WINAPI FreeLibrary32(HINSTANCE32 hLibModule)
{
WARN(module,"(%08x): stub\n", hLibModule);
FIXME(module,"(%08x): stub\n", hLibModule);
return TRUE; /* FIXME */
}

View File

@ -395,8 +395,7 @@ int NE_OpenFile( NE_MODULE *pModule )
name = NE_MODULE_NAME( pModule );
if (!DOSFS_GetFullName( name, TRUE, &full_name ) ||
(cachedfd = open( full_name.long_name, O_RDONLY )) == -1)
WARN( module, "Can't open file '%s' for module %04x\n",
name, pModule->self );
MSG( "Can't open file '%s' for module %04x\n", name, pModule->self );
TRACE(module, "opened '%s' -> %d\n",
name, cachedfd );
return cachedfd;
@ -695,9 +694,9 @@ static BOOL32 NE_LoadDLLs( NE_MODULE *pModule )
{
/* FIXME: cleanup what was done */
WARN( module, "Could not load '%s' required by '%.*s', error=%d\n",
buffer, *((BYTE*)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1, hDLL );
MSG( "Could not load '%s' required by '%.*s', error=%d\n",
buffer, *((BYTE*)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1, hDLL );
return FALSE;
}
*pModRef = GetExePtr( hDLL );
@ -751,7 +750,8 @@ HINSTANCE16 NE_LoadModule( LPCSTR name, HINSTANCE16 *hPrevInstance,
/* Now try the built-in even if disabled */
if ((hModule = fnBUILTIN_LoadModule( name, TRUE )))
{
WARN(module, "Could not load Windows DLL '%s', using built-in module.\n", name );
MSG( "Could not load Windows DLL '%s', using built-in module.\n",
name );
return hModule;
}
return 2; /* File not found */

View File

@ -57,6 +57,7 @@
#include "module.h"
#include "global.h"
#include "task.h"
#include "snoop.h"
#include "debug.h"
static void PE_InitDLL(WINE_MODREF *wm, DWORD type, LPVOID lpReserved);
@ -162,14 +163,15 @@ FARPROC32 PE_FindExportedFunction(
addr = function[*ordinal];
if (!addr) return NULL;
if ((addr < rva_start) || (addr >= rva_end))
return (FARPROC32)RVA(addr);
return SNOOP_GetProcAddress32(wm->module,ename,*ordinal,(FARPROC32)RVA(addr));
forward = (char *)RVA(addr);
break;
}
ordinal++;
name++;
}
} else {
} else {
int i;
if (LOWORD(funcName)-exports->Base > exports->NumberOfFunctions) {
TRACE(win32," ordinal %d out of range!\n",
LOWORD(funcName));
@ -177,8 +179,20 @@ FARPROC32 PE_FindExportedFunction(
}
addr = function[(int)funcName-exports->Base];
if (!addr) return NULL;
ename = "";
if (name) {
for (i=0;i<exports->NumberOfNames;i++) {
ename = (char*)RVA(*name);
if (*ordinal == LOWORD(funcName)-exports->Base)
break;
ordinal++;
name++;
}
if (i==exports->NumberOfNames)
ename = "";
}
if ((addr < rva_start) || (addr >= rva_end))
return (FARPROC32)RVA(addr);
return SNOOP_GetProcAddress32(wm->module,ename,(DWORD)funcName-exports->Base,(FARPROC32)RVA(addr));
forward = (char *)RVA(addr);
}
if (forward)
@ -584,6 +598,7 @@ static BOOL32 PE_MapImage( PDB32 *process,WINE_MODREF *wm, OFSTRUCT *ofs, DWORD
*/
*(IMAGE_DOS_HEADER *)load_addr = *dos_header;
*(IMAGE_NT_HEADERS *)(load_addr + dos_header->e_lfanew) = *nt_header;
memcpy(PE_SECTIONS(load_addr),PE_SECTIONS(hModule),sizeof(IMAGE_SECTION_HEADER)*nt_header->FileHeader.NumberOfSections);
pe_seg = PE_SECTIONS(hModule);
for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++, pe_seg++)
@ -681,11 +696,11 @@ static BOOL32 PE_MapImage( PDB32 *process,WINE_MODREF *wm, OFSTRUCT *ofs, DWORD
if(nt_header->OptionalHeader.DataDirectory
[IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT].Size)
FIXME(win32,"Bound Import directory ignored\n");
TRACE(win32,"Bound Import directory ignored\n");
if(nt_header->OptionalHeader.DataDirectory
[IMAGE_DIRECTORY_ENTRY_IAT].Size)
FIXME(win32,"Import Address Table directory ignored\n");
TRACE(win32,"Import Address Table directory ignored\n");
if(nt_header->OptionalHeader.DataDirectory[13].Size)
FIXME(win32,"Unknown directory 13 ignored\n");
if(nt_header->OptionalHeader.DataDirectory[14].Size)
@ -769,7 +784,7 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, PDB32 *process,
WARN( module, "Could not load external DLL '%s', using built-in module.\n", name );
return hModule;
}
return 1;
return 0;
}
/* will go away ... */
if ((hModule = MODULE_CreateDummyModule( &ofs )) < 32) {
@ -795,7 +810,7 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, PDB32 *process,
FreeLibrary16( hModule);
HeapFree(process->heap,0,wm);
ERR(win32,"can't load %s\n",ofs.szPathName);
return 21; /* FIXME: probably 0 */
return 0;
}
/* (possible) recursion */
@ -815,6 +830,8 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, PDB32 *process,
return 0;
}
pModule->module32 = wm->module;
if (wm->binfmt.pe.pe_export)
SNOOP_RegisterDLL(wm->module,wm->modname,wm->binfmt.pe.pe_export->NumberOfFunctions);
return wm->module;
}

View File

@ -24,6 +24,7 @@
#include "debug.h"
#include "libres.h"
#include "winerror.h"
#include "debugstr.h"
extern WORD WINE_LanguageId;
@ -69,10 +70,11 @@ HRSRC32 WINAPI FindResourceEx32W( HMODULE32 hModule, LPCWSTR name,
WINE_MODREF *wm = MODULE32_LookupHMODULE(PROCESS_Current(),hModule);
HRSRC32 hrsrc;
TRACE(resource, "module=%08x "
"type=%s%p name=%s%p\n", wm->module,
(HIWORD(type))? "" : "#", type,
(HIWORD(name))? "" : "#", name);
TRACE(resource, "module=%08x type=%s name=%s\n",
hModule,
debugres_w (type),
debugres_w (name));
if (__winelib) {
hrsrc = LIBRES_FindResource( hModule, name, type );
if (hrsrc)
@ -346,7 +348,7 @@ HACCEL32 WINAPI CreateAcceleratorTable32A(LPACCEL32 lpaccel, INT32 cEntries)
cEntries * sizeof(ACCEL32));
TRACE(accel, "handle %p\n", (LPVOID)hAccel);
if(!hAccel) {
WARN(accel, "Out of memory.\n");
ERR(accel, "Out of memory.\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return (HACCEL32)NULL;
}
@ -389,13 +391,15 @@ BOOL32 WINAPI DestroyAcceleratorTable( HACCEL32 handle )
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; */
/* } */
#if 0
if(!handle) {
WARN(accel, "Application sent NULL ptr.\n");
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
/* HeapFree(GetProcessHeap(), 0, (LPACCEL32)handle); */
HeapFree(GetProcessHeap(), 0, (LPACCEL32)handle);
#endif
return TRUE;
}

View File

@ -285,10 +285,9 @@ void LDT_Print( int start, int length )
flags[1] = (ldt_flags_copy[i] & LDT_FLAGS_READONLY) ? '-' : 'w';
flags[2] = '-';
}
TRACE(ldt,"%04x: sel=%04x base=%08lx limit=%08lx %d-bit %c%c%c\n",
i, ENTRY_TO_SELECTOR(i),
ldt_copy[i].base, ldt_copy[i].limit,
ldt_flags_copy[i] & LDT_FLAGS_32BIT ? 32 : 16,
flags[0], flags[1], flags[2] );
MSG("%04x: sel=%04x base=%08lx limit=%08lx %d-bit %c%c%c\n",
i, ENTRY_TO_SELECTOR(i), ldt_copy[i].base, ldt_copy[i].limit,
ldt_flags_copy[i] & LDT_FLAGS_32BIT ? 32 : 16,
flags[0], flags[1], flags[2] );
}
}

View File

@ -11,6 +11,7 @@
#include "winerror.h"
#include "ldt.h"
#include "debug.h"
#include "winnls.h"
static const BYTE STRING_Oem2Ansi[256] =
"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\244"
@ -144,7 +145,7 @@ LPWSTR WINAPI lstrcatn32W( LPWSTR dst, LPCWSTR src, INT32 n )
*/
INT16 WINAPI lstrcmp16( LPCSTR str1, LPCSTR str2 )
{
return (INT16)lstrcmp32A( str1, str2 );
return (INT16)strcmp( str1, str2 );
}
@ -153,19 +154,14 @@ INT16 WINAPI lstrcmp16( LPCSTR str1, LPCSTR str2 )
*/
INT32 WINAPI lstrcmp32A( LPCSTR str1, LPCSTR str2 )
{
TRACE(string,"%s and %s\n",
debugstr_a (str1), debugstr_a (str2));
/* Win95 KERNEL32.DLL does it that way. Hands off! */
if (!str1 || !str2) {
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
return (INT32)strcmp( str1, str2 );
return CompareString32A(LOCALE_SYSTEM_DEFAULT,0,str1,-1,str2,-1) - 2 ;
}
/***********************************************************************
* lstrcmp32W (KERNEL.603)
* FIXME : should call CompareString32W, when it is implemented.
* This implementation is not "word sort", as it should.
*/
INT32 WINAPI lstrcmp32W( LPCWSTR str1, LPCWSTR str2 )
{
@ -198,17 +194,7 @@ INT32 WINAPI lstrcmpi32A( LPCSTR str1, LPCSTR str2 )
TRACE(string,"strcmpi %s and %s\n",
debugstr_a (str1), debugstr_a (str2));
if (!str1 || !str2) {
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
while (*str1)
{
if ((res = toupper(*str1) - toupper(*str2)) != 0) return res;
str1++;
str2++;
}
return toupper(*str1) - toupper(*str2);
return CompareString32A(LOCALE_SYSTEM_DEFAULT,NORM_IGNORECASE,str1,-1,str2,-1)-2;
}

View File

@ -30,6 +30,7 @@ C_SRCS = \
spy.c \
stress.c \
system.c \
tapi32.c \
toolhelp.c \
tweak.c \
ver.c \

View File

@ -12,6 +12,9 @@
#include "options.h"
#include "heap.h"
#include "debug.h"
#include "selectors.h"
#include "module.h"
#include "miscemu.h"
/* FIXME!
@ -95,6 +98,8 @@ struct ASPI_DEVICE_INFO {
typedef struct ASPI_DEVICE_INFO ASPI_DEVICE_INFO;
static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
static BOOL16 DOSASPI = FALSE;
#ifdef linux
static int
ASPI_OpenDevice16(SRB_ExecSCSICmd16 *prb)
@ -157,7 +162,10 @@ ASPI_DebugPrintCmd16(SRB_ExecSCSICmd16 *prb)
BYTE *lpBuf;
dbg_decl_str(aspi, 512);
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
if ((DOSASPI) && (prb->SRB_BufPointer)) /* translate real mode address */
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
else
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
switch (prb->CDBByte[0]) {
case CMD_INQUIRY:
@ -229,7 +237,10 @@ ASPI_DebugPrintResult16(SRB_ExecSCSICmd16 *prb)
{
BYTE *lpBuf;
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
if ((DOSASPI) && (prb->SRB_BufPointer)) /* translate real mode address */
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
else
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
switch (prb->CDBByte[0]) {
case CMD_INQUIRY:
@ -255,6 +266,7 @@ ASPI_ExecScsiCmd16(SRB_ExecSCSICmd16 *prb, SEGPTR segptr_prb)
fd = ASPI_OpenDevice16(prb);
if (fd == -1) {
WARN(aspi, "ASPI_ExecScsiCmd16 failed: could not open device.\n");
prb->SRB_Status = SS_ERR;
return SS_ERR;
}
@ -263,9 +275,13 @@ ASPI_ExecScsiCmd16(SRB_ExecSCSICmd16 *prb, SEGPTR segptr_prb)
sg_reply_hdr = NULL;
prb->SRB_Status = SS_PENDING;
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
if ((DOSASPI) && (prb->SRB_BufPointer)) /* translate real mode address */
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
else
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
if (!prb->SRB_CDBLen) {
WARN(aspi, "ASPI_ExecScsiCmd16 failed: prb->SRB_CDBLen = 0.\n");
prb->SRB_Status = SS_ERR;
return SS_ERR;
}
@ -406,7 +422,14 @@ WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
switch (lpSRB->common.SRB_cmd) {
case SC_HA_INQUIRY:
FIXME(aspi, "Not implemented SC_HA_INQUIRY\n");
lpSRB->inquiry.SRB_Status = 0x1; /* completed successfully */
lpSRB->inquiry.SRB_HaId = 1; /* bogus value */
lpSRB->inquiry.HA_Count = 1; /* not always */
lpSRB->inquiry.HA_SCSI_ID = 7; /* not always ID 7 */
strcat(lpSRB->inquiry.HA_ManagerId, "Wine ASPI"); /* max 15 chars */
lpSRB->inquiry.SRB_55AASignature = 0x55aa; /* correct ??? */
lpSRB->inquiry.SRB_ExtBufferSize = 0x2000; /* bogus value */
FIXME(aspi, "ASPI: Partially implemented SC_HA_INQUIRY\n");
break;
case SC_GET_DEV_TYPE:
FIXME(aspi, "Not implemented SC_GET_DEV_TYPE\n");
@ -438,3 +461,39 @@ DWORD WINAPI GetASPIDLLVersion()
return (DWORD)0;
#endif
}
void WINAPI ASPI_DOS_func(DWORD srb)
{
LPSRB16 lpSRB = (LPSRB16)DOSMEM_MapRealToLinear(srb);
SEGPTR spSRB = MapLS(lpSRB);
TRACE(aspi, "DOSASPI: function #%d\n", lpSRB->common.SRB_cmd);
DOSASPI = TRUE;
SendASPICommand16(spSRB);
DOSASPI = FALSE;
UnMapLS(spSRB);
}
void ASPI_DOS_HandleInt(CONTEXT *context)
/* returns a real mode call address to ASPI_DOS_func() */
{
#ifdef linux
FARPROC16 DOS_func;
DWORD dos;
LPBYTE dosptr;
DOS_func = MODULE_GetWndProcEntry16("ASPI_DOS_func");
dos = GlobalDOSAlloc(5);
dosptr = (BYTE *)PTR_SEG_OFF_TO_LIN(LOWORD(dos), 0);
*dosptr++ = 0xea; /* ljmp */
*(FARPROC16 *)dosptr = DOS_func;
*(DWORD *)PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context))
= MAKELONG(0, HIWORD(dos)); /* real mode address */
RESET_CFLAG(context);
AX_reg(context) = CX_reg(context);
#else
SET_CFLAG(context);
#endif
}

View File

@ -22,6 +22,9 @@
#include <termios.h>
#include <fcntl.h>
#include <string.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include <errno.h>
#include <ctype.h>
#include <sys/stat.h>
@ -33,6 +36,12 @@
#include "windows.h"
#include "comm.h"
#ifdef HAVE_SYS_MODEM_H
# include <sys/modem.h>
#endif
#ifdef HAVE_SYS_STRTIO_H
# include <sys/strtio.h>
#endif
#include "heap.h"
#include "options.h"
#include "debug.h"

View File

@ -3928,3 +3928,11 @@ BOOL32 WINAPI ChooseColor32W(LPCHOOSECOLOR32W lpChCol )
SEGPTR_FREE(lpcc16);
return (BOOL32)ret;
}
/***********************************************************************
* PageSetupDlgA (COMDLG32.15)
*/
BOOL32 WINAPI PageSetupDlg32A(LPPAGESETUPDLG32A setupdlg) {
FIXME(commdlg,"(%p), stub!\n",setupdlg);
return FALSE;
}

View File

@ -987,11 +987,18 @@ VOID __cdecl CRTDLL_delete(VOID* ptr)
/*********************************************************************
* _strdup (CRTDLL.285)
*/
LPSTR __cdecl CRTDLL__strdup(LPSTR ptr)
LPSTR __cdecl CRTDLL__strdup(LPCSTR ptr)
{
return HEAP_strdupA(GetProcessHeap(),0,ptr);
}
/*********************************************************************
* _wcsdup (CRTDLL.320)
*/
LPWSTR __cdecl CRTDLL__wcsdup(LPCWSTR ptr)
{
return HEAP_strdupW(GetProcessHeap(),0,ptr);
}
/*********************************************************************
* fclose (CRTDLL.362)
@ -1833,3 +1840,27 @@ LPSTR __cdecl CRTDLL__mbsrchr(LPSTR s,CHAR x) {
/* FIXME: handle multibyte strings */
return strrchr(s,x);
}
/*********************************************************************
* _memicmp (CRTDLL.233)(NTDLL.868)
* A stringcompare, without \0 check
* RETURNS
* -1:if first string is alphabetically before second string
* 1:if second '' '' '' '' first ''
* 0:if both are equal.
*/
INT32 __cdecl CRTDLL__memicmp(
LPCSTR s1, /* [in] first string */
LPCSTR s2, /* [in] second string */
DWORD len /* [in] length to compare */
) {
int i;
for (i=0;i<len;i++) {
if (tolower(s1[i])<tolower(s2[i]))
return -1;
if (tolower(s1[i])>tolower(s2[i]))
return 1;
}
return 0;
}

View File

@ -178,7 +178,7 @@ void WINAPI OutputDebugString16( LPCSTR str )
if ((p > buffer) && (p[-1] == '\n')) p[1] = '\0'; /* Remove trailing \n */
if (!GetModuleName( GetCurrentTask(), module, sizeof(module) ))
strcpy( module, "???" );
TRACE(resource, "%s says '%s'\n", module, buffer );
DUMP("%s says '%s'\n", module, buffer );
HeapFree( GetProcessHeap(), 0, buffer );
}

View File

@ -209,6 +209,10 @@ static int MAIN_GetResource( XrmDatabase db, char *name, XrmValue *value )
*/
static BOOL32 MAIN_ParseDebugOptions(char *options)
{
/* defined in relay32/relay386.c */
extern char **debug_relay_includelist;
extern char **debug_relay_excludelist;
int l, cls;
if (strlen(options)<3)
return FALSE;
@ -243,6 +247,45 @@ static BOOL32 MAIN_ParseDebugOptions(char *options)
if(cls == -1 || cls == j)
debug_msg_enabled[i][j]=(*options=='+');
}
else if (!lstrncmpi32A(options+1, "relay=", 6))
{
int i, j;
char *s, *s2, ***output, c;
for (i=0; i<DEBUG_CHANNEL_COUNT; i++)
if (debug_ch_name && (!lstrncmpi32A(debug_ch_name[i],"relay",5))){
for(j=0; j<DEBUG_CLASS_COUNT; j++)
if(cls == -1 || cls == j)
debug_msg_enabled[i][j]=TRUE;
break;
}
/* should never happen, maybe assert(i!=DEBUG_CHANNEL_COUNT)? */
if (i==DEBUG_CHANNEL_COUNT)
return FALSE;
if (*options == '+')
output = &debug_relay_includelist;
else
output = &debug_relay_excludelist;
s = options + 7;
i = 1;
while((s = strchr(s, ':'))) i++, s++;
*output = malloc(sizeof(char **) * i + 1);
i = 0;
s = options + 7;
while((s2 = strchr(s, ':'))) {
c = *s2;
*s2 = '\0';
*((*output)+i) = strdup(s);
*s2 = c;
s = s2 + 1;
i++;
}
c = *(options + l);
*(options + l) = '\0';
*((*output)+i) = strdup(s);
*(options + l) = c;
*((*output)+i+1) = NULL;
}
else
{
int i, j;
@ -758,7 +801,6 @@ BOOL32 WINAPI SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
GetProfileString32A("Desktop", "IconTitleFaceName", "MS Sans Serif",
lpLogFont->lfFaceName, LF_FACESIZE );
lpLogFont->lfHeight = -GetProfileInt32A("Desktop","IconTitleSize", 8);
lpLogFont->lfWidth = 0;
lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
lpLogFont->lfWeight = FW_NORMAL;
@ -787,6 +829,7 @@ BOOL32 WINAPI SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT, 0,
(LPVOID)&(lpnm->lfCaptionFont),0);
lpnm->lfCaptionFont.lfWeight = FW_BOLD;
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT, 0,
(LPVOID)&(lpnm->lfMenuFont),0);
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT, 0,
@ -975,7 +1018,6 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
GetProfileString32A("Desktop", "IconTitleFaceName", "MS Sans Serif",
lpLogFont->lfFaceName, LF_FACESIZE );
lpLogFont->lfHeight = -GetProfileInt32A("Desktop","IconTitleSize", 8);
lpLogFont->lfWidth = 0;
lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
lpLogFont->lfWeight = FW_NORMAL;
@ -996,6 +1038,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
/* FIXME: initialize geometry entries */
SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
(LPVOID)&(lpnm->lfCaptionFont),0);
lpnm->lfCaptionFont.lfWeight = FW_BOLD;
SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
(LPVOID)&(lpnm->lfMenuFont),0);
SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
@ -1085,6 +1128,7 @@ BOOL32 WINAPI SystemParametersInfo32W( UINT32 uAction, UINT32 uParam,
LPNONCLIENTMETRICS32W lpnm=(LPNONCLIENTMETRICS32W)lpvParam;
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0);
lpnm->lfCaptionFont.lfWeight = FW_BOLD;
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0);
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0);
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0);

View File

@ -281,6 +281,22 @@ WNetGetConnection32A(LPCSTR localname,LPSTR remotename,LPDWORD buflen)
return ret;
}
/**************************************************************************
* WNetGetConnectionW [MPR.72]
*/
DWORD WINAPI
WNetGetConnection32W(LPCWSTR localnameW,LPSTR remotenameW,LPDWORD buflen)
{
UINT16 x;
CHAR buf[200];
LPSTR lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW);
DWORD ret = WNetGetConnection16(lnA,buf,&x);
*buflen = x; /* FIXME: *2 ? */
lstrcpyAtoW(remotenameW,buf);
HeapFree(GetProcessHeap(),0,lnA);
return ret;
}
/**************************************************************************
* WNetGetCaps [USER.513]
@ -508,11 +524,11 @@ int WINAPI WNetDirectoryNotify(HWND16 hwndOwner,void *lpDir,WORD wOper)
/**************************************************************************
* WNetGetPropertyText [USER.532]
*/
int WINAPI WNetGetPropertyText(HWND16 hwndParent,WORD iButton,WORD nPropSel,
LPSTR lpszName,WORD nType)
int WINAPI WNetGetPropertyText(WORD iButton, WORD nPropSel, LPSTR lpszName,
LPSTR lpszButtonName, WORD cbButtonName, WORD nType)
{
FIXME(wnet, "(%04x,%x,%x,'%s',%x): stub\n",
hwndParent,iButton,nPropSel,lpszName,nType);
FIXME(wnet, "(%04x,%04x,'%s','%s',%04x): stub\n",
iButton,nPropSel,lpszName,lpszButtonName, nType);
return WN_NO_NETWORK;
}

View File

@ -332,7 +332,7 @@ DWORD /* NTSTATUS */ WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD
}
/**************************************************************************
* RtlInitString [NTDLL]
* RtlInitAnsiString [NTDLL]
*/
VOID WINAPI RtlInitAnsiString(LPANSI_STRING target,LPCSTR source)
{
@ -429,7 +429,7 @@ DWORD /* NTSTATUS */ WINAPI RtlUnicodeStringToAnsiString(LPUNICODE_STRING uni,LP
*/
DWORD WINAPI RtlNtStatusToDosError(DWORD error)
{
FIXME(ntdll, "(%x): map STATUS_ to ERROR_\n",error);
FIXME(ntdll, "(%lx): map STATUS_ to ERROR_\n",error);
return error;
}
@ -556,6 +556,9 @@ DWORD WINAPI NtOpenFile(DWORD x1,DWORD flags,DWORD x3,DWORD x4,DWORD alignment,D
/**************************************************************************
* NTDLL_chkstk (NTDLL.862)
*
* NOTES
* Should this be WINAPI?
*/
void NTDLL_chkstk(void)
{
@ -574,12 +577,13 @@ DWORD WINAPI NtOpenDirectoryObject(DWORD x1,DWORD x2,DWORD x3)
}
/**************************************************************************
/******************************************************************************
* NtQueryDirectoryObject [NTDLL.149]
*/
DWORD WINAPI NtQueryDirectoryObject(DWORD x1, DWORD x2)
DWORD WINAPI NtQueryDirectoryObject( DWORD x1, DWORD x2, DWORD x3, DWORD x4,
DWORD x5, DWORD x6, DWORD x7 )
{
FIXME(ntdll,"(%lx,%lx): stub\n",x1,x2);
FIXME(ntdll,"(%lx,%lx,%lx,%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4,x5,x6,x7);
return 0;
}
@ -587,19 +591,19 @@ DWORD WINAPI NtQueryDirectoryObject(DWORD x1, DWORD x2)
/**************************************************************************
* RtlFreeAnsiString [NTDLL.373]
*/
DWORD WINAPI RtlFreeAnsiString(DWORD x1)
VOID WINAPI RtlFreeAnsiString(LPANSI_STRING AnsiString)
{
FIXME(ntdll,"(%lx): stub\n",x1);
return 0;
if( AnsiString->Buffer )
HeapFree( GetProcessHeap(),0,AnsiString->Buffer );
}
/**************************************************************************
/******************************************************************************
* NtQuerySystemInformation [NTDLL.168]
*/
DWORD WINAPI NtQuerySystemInformation( DWORD x1 )
DWORD WINAPI NtQuerySystemInformation( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
{
FIXME(ntdll,"(%lx): stub\n",x1);
FIXME(ntdll,"(%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4);
return 0;
}
@ -607,9 +611,9 @@ DWORD WINAPI NtQuerySystemInformation( DWORD x1 )
/******************************************************************************
* NtQueryObject [NTDLL.161]
*/
DWORD WINAPI NtQueryObject( DWORD x1, DWORD x2 )
DWORD WINAPI NtQueryObject( DWORD x1, DWORD x2 ,DWORD x3, DWORD x4, DWORD x5 )
{
FIXME(ntdll,"(%lx,%lx): stub\n",x1,x2);
FIXME(ntdll,"(%lx,%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4,x5);
return 0;
}
@ -617,9 +621,9 @@ DWORD WINAPI NtQueryObject( DWORD x1, DWORD x2 )
/******************************************************************************
* RtlTimeToElapsedTimeFields [NTDLL.502]
*/
DWORD WINAPI RtlTimeToElapsedTimeFields( DWORD x1 )
DWORD WINAPI RtlTimeToElapsedTimeFields( DWORD x1, DWORD x2 )
{
FIXME(ntdll,"(%lx): stub\n",x1);
FIXME(ntdll,"(%lx,%lx): stub\n",x1,x2);
return 0;
}
@ -627,10 +631,52 @@ DWORD WINAPI RtlTimeToElapsedTimeFields( DWORD x1 )
/******************************************************************************
* NtSetInformationProcess [NTDLL.207]
*/
DWORD WINAPI NtSetInformationProcess( DWORD x1 )
DWORD WINAPI NtSetInformationProcess( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
{
FIXME(ntdll,"(%lx): stub\n",x1);
FIXME(ntdll,"(%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4);
return 0;
}
/******************************************************************************
* NtFsControlFile [NTDLL.108]
*/
VOID WINAPI NtFsControlFile(VOID)
{
FIXME(ntdll,"(void): stub\n");
}
/******************************************************************************
* RtlExtendedLargeIntegerDivide [NTDLL.359]
*/
INT32 WINAPI RtlExtendedLargeIntegerDivide(
LARGE_INTEGER dividend,
DWORD divisor,
LPDWORD rest
) {
#if SIZEOF_LONG_LONG==8
long long x1 = *(long long*)&dividend;
if (*rest)
*rest = x1 % divisor;
return x1/divisor;
#else
FIXME(ntdll,"((%d<<32)+%d,%d,%p), implement this using normal integer arithmetic!\n",dividend.HighPart,dividend.LowPart,divisor,rest);
return 0;
#endif
}
/******************************************************************************
* RtlExtendedLargeIntegerMultiply [NTDLL.359]
* Note: This even works, since gcc returns 64bit values in eax/edx just like
* the caller expects. However... The relay code won't grok this I think.
*/
long long /*LARGE_INTEGER*/ WINAPI RtlExtendedIntegerMultiply(
LARGE_INTEGER factor1,INT32 factor2
) {
#if SIZEOF_LONG_LONG==8
return (*(long long*)&factor1)*factor2;
#else
FIXME(ntdll,"((%d<<32)+%d,%ld), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2);
return 0;
#endif
}

View File

@ -10,8 +10,17 @@
#include "windows.h"
#include "win.h"
#include "winerror.h"
#include "winreg.h"
#include "debug.h"
#define INT_PD_DEFAULT_DEVMODE 1
#define INT_PD_DEFAULT_MODEL 2
static char PrinterModel[] = "Printer Model";
static char DefaultDevMode[] = "Default DevMode";
static char PrinterDriverData[] = "PrinterDriverData";
static char Printers[] = "System\\CurrentControlSet\\Control\\Print\\Printers\\";
INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
{
INT16 retVal;
@ -32,42 +41,172 @@ INT16 WINAPI EndDoc16(HDC16 hdc)
return Escape16(hdc, ENDDOC, 0, 0, 0);
}
WORD DrvGetPrinterDataInternal(LPSTR RegStr_Printer, LPBYTE lpPrinterData, int cbData)
{
WORD res = -1;
HKEY hkey;
DWORD dwType, cbQueryData;
if (!(RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey))) {
if (cbData > 1) { /* "Default DevMode" */
if (!(RegQueryValueEx32A(hkey, DefaultDevMode, 0, &dwType, 0, &cbQueryData))) {
if (!lpPrinterData) res = cbQueryData;
else
if ((cbQueryData) && (cbQueryData <= cbData)) {
cbQueryData = cbData;
if (RegQueryValueEx32A(hkey, DefaultDevMode, 0,
&dwType, lpPrinterData, &cbQueryData))
res = cbQueryData;
}
}
else /* "Printer Driver" */
{
cbQueryData = 32;
RegQueryValueEx32A(hkey, "Printer Driver", 0,
&dwType, lpPrinterData, &cbQueryData);
res = cbQueryData;
}
}
}
if (hkey) RegCloseKey(hkey);
return res;
}
DWORD WINAPI DrvGetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
LPDWORD lpType, LPBYTE lpPrinterData,
int cbData, LPDWORD lpNeeded)
{
FIXME(print, "stub.\n");
LPSTR RegStr_Printer;
HKEY hkey = 0, hkey2 = 0;
DWORD res = 0;
DWORD dwType, PrinterAttr, cbPrinterAttr, SetData, size;
if (HIWORD(lpPrinter))
TRACE(print,"printer %s\n",lpPrinter);
TRACE(print,"printer %s\n",lpPrinter);
else
TRACE(print,"printer %p\n",lpPrinter);
TRACE(print,"printer %p\n",lpPrinter);
if (HIWORD(lpProfile))
TRACE(print,"profile %s\n",lpProfile);
TRACE(print,"profile %s\n",lpProfile);
else
TRACE(print,"profile %p\n",lpProfile);
TRACE(print,"profile %p\n",lpProfile);
TRACE(print,"lpType %p\n",lpType);
return 0;
if ((!lpPrinter) || (!lpProfile) || (!lpNeeded))
return ERROR_INVALID_PARAMETER;
RegStr_Printer = HeapAlloc(GetProcessHeap(), 0,
strlen(Printers) + strlen(lpPrinter) + 2);
strcpy(RegStr_Printer, Printers);
strcat(RegStr_Printer, lpPrinter);
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) ||
(!lstrcmp32A(lpProfile, DefaultDevMode))) {
size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData);
if (size+1) {
*lpNeeded = size;
if ((lpPrinterData) && (*lpNeeded > cbData))
res = ERROR_MORE_DATA;
}
else res = ERROR_INVALID_PRINTER_NAME;
}
else
if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) ||
(!lstrcmp32A(lpProfile, PrinterModel))) {
*lpNeeded = 32;
if (!lpPrinterData) goto failed;
if (cbData < 32) {
res = ERROR_MORE_DATA;
goto failed;
}
size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, 1);
if ((size+1) && (lpType))
*lpType = REG_SZ;
else
res = ERROR_INVALID_PRINTER_NAME;
}
else
{
if ((res = RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)))
goto failed;
cbPrinterAttr = 4;
if ((res = RegQueryValueEx32A(hkey, "Attributes", 0, &dwType, (LPBYTE)&PrinterAttr, &cbPrinterAttr)))
goto failed;
if ((res = RegOpenKey32A(hkey, PrinterDriverData, &hkey2)))
goto failed;
*lpNeeded = cbData;
res = RegQueryValueEx32A(hkey2, lpProfile, 0, lpType, lpPrinterData, lpNeeded);
if ((res != ERROR_CANTREAD) && ((PrinterAttr & (0x800|0x10)) == 0x10))
{
if (!(res) && (*lpType == REG_DWORD) && (*(LPDWORD)lpPrinterData == -1))
res = ERROR_INVALID_DATA;
}
else
{
SetData = -1;
RegSetValueEx32A(hkey2, lpProfile, 0, REG_DWORD, (LPBYTE)&SetData, 4); /* no result returned */
}
}
failed:
if (hkey2) RegCloseKey(hkey2);
if (hkey) RegCloseKey(hkey);
HeapFree(GetProcessHeap(), 0, RegStr_Printer);
return res;
}
DWORD WINAPI DrvSetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
LPDWORD lpType, LPBYTE lpPrinterData,
DWORD lpType, LPBYTE lpPrinterData,
DWORD dwSize)
{
FIXME(print, "stub.\n");
LPSTR RegStr_Printer;
HKEY hkey = 0;
DWORD res = 0;
if (HIWORD(lpPrinter))
TRACE(print,"printer %s\n",lpPrinter);
TRACE(print,"printer %s\n",lpPrinter);
else
TRACE(print,"printer %p\n",lpPrinter);
TRACE(print,"printer %p\n",lpPrinter);
if (HIWORD(lpProfile))
TRACE(print,"profile %s\n",lpProfile);
TRACE(print,"profile %s\n",lpProfile);
else
TRACE(print,"profile %p\n",lpProfile);
TRACE(print,"lpType %p\n",lpType);
return 0;
TRACE(print,"profile %p\n",lpProfile);
TRACE(print,"lpType %08lx\n",lpType);
if ((!lpPrinter) || (!lpProfile) ||
((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) ||
(!lstrcmp32A(lpProfile, PrinterModel)))
return ERROR_INVALID_PARAMETER;
RegStr_Printer = HeapAlloc(GetProcessHeap(), 0,
strlen(Printers) + strlen(lpPrinter) + 2);
strcpy(RegStr_Printer, Printers);
strcat(RegStr_Printer, lpPrinter);
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) ||
(!lstrcmp32A(lpProfile, DefaultDevMode))) {
if (!(RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)) ||
(RegSetValueEx32A(hkey, DefaultDevMode, 0, REG_BINARY, lpPrinterData, dwSize)))
res = ERROR_INVALID_PRINTER_NAME;
}
else
{
strcat(RegStr_Printer, "\\");
if (!(res = RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey))) {
if (!lpPrinterData)
res = RegDeleteValue32A(hkey, lpProfile);
else
res = RegSetValueEx32A(hkey, lpProfile, 0, lpType, lpPrinterData, dwSize);
}
}
if (hkey) RegCloseKey(hkey);
HeapFree(GetProcessHeap(), 0, RegStr_Printer);
return res;
}
@ -105,9 +244,39 @@ BOOL32 WINAPI EnumPrinters32A(DWORD dwType, LPSTR lpszName,
*lpdwReturned=0;
return TRUE;
}
BOOL32 WINAPI AddMonitor32A(LPCSTR pName, DWORD Level, LPBYTE pMonitors)
{
FIXME(print, "(%s,%lx,%p):stub!\n", pName, Level, pMonitors);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
BOOL32 WINAPI
DeletePrinterDriver32A (LPSTR pName, LPSTR pEnvironment, LPSTR pDriverName)
{
FIXME(print, "(%s,%s,%s):stub!\n", pName, pEnvironment, pDriverName);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
BOOL32 WINAPI
DeleteMonitor32A (LPSTR pName, LPSTR pEnvironment, LPSTR pMonitorName)
{
FIXME(print, "(%s,%s,%s):stub!\n", pName, pEnvironment, pMonitorName);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
BOOL32 WINAPI
DeletePort32A (LPSTR pName, HWND32 hWnd, LPSTR pPortName)
{
FIXME(print, "(%s,0x%08x,%s):stub!\n", pName, hWnd, pPortName);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}

File diff suppressed because it is too large Load Diff

View File

@ -375,8 +375,8 @@ static HINSTANCE32 SHELL_FindExecutable( LPCSTR lpFile,
}
/* Check registry */
if (RegQueryValue16( (HKEY)HKEY_CLASSES_ROOT, tmpext, filetype,
&filetypelen ) == SHELL_ERROR_SUCCESS )
if (RegQueryValue16( HKEY_CLASSES_ROOT, tmpext, filetype,
&filetypelen ) == ERROR_SUCCESS )
{
filetype[filetypelen]='\0';
TRACE(exec, "File type: %s\n",
@ -387,8 +387,8 @@ static HINSTANCE32 SHELL_FindExecutable( LPCSTR lpFile,
strcat( filetype, lpOperation );
strcat( filetype, "\\command" );
if (RegQueryValue16( (HKEY)HKEY_CLASSES_ROOT, filetype, command,
&commandlen ) == SHELL_ERROR_SUCCESS )
if (RegQueryValue16( HKEY_CLASSES_ROOT, filetype, command,
&commandlen ) == ERROR_SUCCESS )
{
/* Is there a replace() function anywhere? */
command[commandlen]='\0';
@ -1172,7 +1172,7 @@ HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16 hInstance,
for (i=0;i<n;i++) {
LPIMAGE_RESOURCE_DIRECTORY xresdir;
xresdir = GetResDirEntryW(iconresdir,(LPWSTR)RetPtr[i],(DWORD)rootresdir,FALSE);
xresdir = GetResDirEntryW(iconresdir,(LPWSTR)&(RetPtr[i]),(DWORD)rootresdir,FALSE);
xresdir = GetResDirEntryW(xresdir,(LPWSTR)0,(DWORD)rootresdir,TRUE);
idataent = (LPIMAGE_RESOURCE_DATA_ENTRY)xresdir;
@ -1563,11 +1563,11 @@ void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
}
/*************************************************************************
* FreeIconList
*/
void WINAPI FreeIconList( DWORD dw )
{
FIXME(reg, "empty stub\n" );
FIXME(reg, "(%lx): stub\n",dw);
}
/*************************************************************************
@ -1580,7 +1580,6 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
char xclsid[50],xiid[50];
HRESULT hres = E_OUTOFMEMORY;
WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
WINE_StringFromCLSID((LPCLSID)iid,xiid);
TRACE(shell,"(%s,%s,%p)\n",xclsid,xiid,ppv);
@ -1610,7 +1609,7 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
return 0;
}
FIXME(shell, " -> clsid not found. returning E_OUTOFMEMORY.\n");
FIXME(shell, "clsid(%s) not found. Returning E_OUTOFMEMORY.\n",xclsid);
return hres;
}
@ -1669,3 +1668,18 @@ BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath) {
lstrcpy32A(pszPath,"E:\\"); /* FIXME */
return NOERROR;
}
/*************************************************************************
* SHHelpShortcuts_RunDLL [SHELL32.224]
*
*/
DWORD WINAPI
SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
{
FIXME (exec, "(%lx, %lx, %lx, %lx) empty stub!\n",
dwArg1, dwArg2, dwArg3, dwArg4);
return 0;
}

View File

@ -42,6 +42,9 @@ DWORD WINAPI SHELL32_2(HWND32 hwnd,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6)
/*************************************************************************
* SHELL32_16 [SHELL32.16]
* find_lastitem_in_itemidlist()
*
* NOTES
* Original name: ILFindLast (exported by ordinal)
*/
LPSHITEMID WINAPI SHELL32_16(LPITEMIDLIST iil) {
LPSHITEMID lastsii,sii;
@ -56,9 +59,13 @@ LPSHITEMID WINAPI SHELL32_16(LPITEMIDLIST iil) {
}
return lastsii;
}
/*************************************************************************
* SHELL32_29 [SHELL32.29]
* is_rootdir(const char*path)
*
* NOTES
* Original Name: PathIsRoot
*/
BOOL32 WINAPI SHELL32_29(LPCSTR x) {
if (!lstrcmp32A(x+1,":\\")) /* "X:\" */
@ -81,6 +88,9 @@ BOOL32 WINAPI SHELL32_29(LPCSTR x) {
/*************************************************************************
* SHELL32_30 [SHELL32.30]
* get_rootdir(char*path,int drive)
*
* NOTES
* Original Name: PathBuildRoot
*/
LPSTR WINAPI SHELL32_30(LPSTR root,BYTE drive) {
strcpy(root,"A:\\");
@ -381,9 +391,16 @@ void WINAPI SHELL32_175(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
/*************************************************************************
* SHELL32_181 [SHELL32.181]
* unknown
*
* PARAMS
* hwnd [I] window handle
* y [I] flag ????
*
* NOTES
* Original name: RegisterShellHook (exported by ordinal)
*/
void WINAPI SHELL32_181(DWORD x,DWORD y) {
FIXME(shell,"(0x%08lx,0x%08lx):stub.\n",x,y);
void WINAPI SHELL32_181(HWND32 hwnd, DWORD y) {
FIXME(shell,"(0x%08lx,0x%08lx):stub.\n",hwnd,y);
}
/*************************************************************************
@ -524,6 +541,9 @@ LRESULT WINAPI SHELL32_102(
/*************************************************************************
* SHELL32_183 [SHELL32.183]
* Format and output errormessage.
*
* NOTES
* Original name: ShellMessageBoxA
*/
void __cdecl SHELL32_183(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,LPVOID arglist) {
char buf[100],buf2[100],*buf3;
@ -701,3 +721,43 @@ DWORD WINAPI SHELL32_87(DWORD x) {
return 0;
}
/*************************************************************************
* SHELL32_61 [SHELL32.61]
* Shell/Run-Dialog
*/
DWORD WINAPI
SHELL32_61 (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
LPSTR lpszTitle, LPSTR lpszPrompt, UINT32 uFlags)
{
FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%lx):stub.\n",
hwndOwner, dwParam1, dwParam2, lpszTitle, lpszPrompt, uFlags);
return 0;
}
/*************************************************************************
* SHELL32_60 [SHELL32.60]
* Shell/Shutdown-Dialog
*/
DWORD WINAPI
SHELL32_60 (HWND32 hwndOwner)
{
FIXME (shell,"(0x%08x):stub.\n", hwndOwner);
return 0;
}
/*************************************************************************
* SHELL32_184 [SHELL32.184]
* unknown
*/
DWORD WINAPI
SHELL32_184 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
DWORD dwParam4, DWORD dwParam5)
{
FIXME (shell,"(0x%lx 0x%lx 0x%lx 0x%lx 0x%lx):stub.\n",
dwParam1, dwParam2, dwParam3, dwParam4, dwParam5);
return 0;
}

View File

@ -15,6 +15,8 @@
#include "callback.h"
#include "windows.h"
#include "miscemu.h"
#include "selectors.h"
#include "sig_context.h"
#include "debug.h"
typedef struct
@ -33,10 +35,17 @@ static BOOL32 SYS_TimersDisabled = FALSE;
/***********************************************************************
* SYSTEM_TimerTick
* FIXME: It is a very bad idea to call 16bit code in a signal handler:
* If the signal reached us in 16 bit code, we could have a broken
* %FS, which is in turned saved into the single global
* CALLTO16_Current_fs temporary storage, so a single misplaced
* signal crashes the whole WINE process.
* This needs more thought. -MM
*/
static void SYSTEM_TimerTick(void)
static HANDLER_DEF(SYSTEM_TimerTick)
{
int i;
HANDLER_INIT();
for (i = 0; i < NB_SYS_TIMERS; i++)
{
@ -44,12 +53,15 @@ static void SYSTEM_TimerTick(void)
if ((SYS_Timers[i].ticks -= SYS_TIMER_RATE) <= 0)
{
SYS_Timers[i].ticks += SYS_Timers[i].rate;
Callbacks->CallSystemTimerProc( SYS_Timers[i].callback );
if (SYS_Timers[i].callback == (FARPROC16)DOSMEM_Tick) {
DOSMEM_Tick();
} else
Callbacks->CallSystemTimerProc( SYS_Timers[i].callback );
}
}
}
/**********************************************************************
* SYSTEM_StartTicks
*
@ -62,7 +74,7 @@ static void SYSTEM_StartTicks(void)
if (!handler_installed)
{
handler_installed = TRUE;
SIGNAL_SetHandler( SIGALRM, SYSTEM_TimerTick, 1 );
SIGNAL_SetHandler( SIGALRM, SYSTEM_TimerTick, 1 );
}
#ifndef __EMX__ /* FIXME: Time don't work... Use BIOS directly instead */
{
@ -130,6 +142,14 @@ WORD WINAPI CreateSystemTimer( WORD rate, FARPROC16 callback )
{
int i;
/* FIXME: HACK: do not create system timers due to problems mentioned
* above, except DOSMEM_Tick().
*/
if (callback!=(FARPROC16)DOSMEM_Tick) {
FIXME(system,"are currently broken, returning 0.\n");
return 0;
}
for (i = 0; i < NB_SYS_TIMERS; i++)
if (!SYS_Timers[i].callback) /* Found one */
{

42
misc/tapi32.c Normal file
View File

@ -0,0 +1,42 @@
/*
* TAPI32
*
* Copyright (c) 1998 Andreas Mohr
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "windows.h"
#include "debug.h"
UINT32 WINAPI lineInitialize(
LPVOID lphLineApp, /* FIXME */
HINSTANCE32 hInstance,
LPVOID lpfnCallback, /* FIXME */
LPCSTR lpszAppName,
LPDWORD lpdwNumDevs)
{
FIXME(comm, "stub.\n");
return 0;
}
UINT32 WINAPI lineShutdown( HANDLE32 hLineApp ) /* FIXME */
{
FIXME(comm, "stub.\n");
return 0;
}
UINT32 WINAPI lineNegotiateAPIVersion(
HANDLE32 hLineApp, /* FIXME */
DWORD dwDeviceID,
DWORD dwAPILowVersion,
DWORD dwAPIHighVersion,
LPDWORD lpdwAPIVersion,
LPVOID lpExtensionID /* FIXME */
)
{
FIXME(comm, "stub.\n");
*lpdwAPIVersion = dwAPIHighVersion;
return 0;
}

View File

@ -11,6 +11,7 @@
#include "process.h"
#include "options.h"
#include "debug.h"
#include "ole.h"
typedef enum
{
@ -162,6 +163,26 @@ LONG WINAPI GetVersion32(void)
}
/***********************************************************************
* GetVersionEx16 (KERNEL.149)
*/
BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16 *v)
{
VERSION ver = VERSION_GetVersion();
if (v->dwOSVersionInfoSize != sizeof(OSVERSIONINFO16))
{
WARN(ver,"wrong OSVERSIONINFO size from app");
return FALSE;
}
v->dwMajorVersion = VersionData[ver].getVersionEx.dwMajorVersion;
v->dwMinorVersion = VersionData[ver].getVersionEx.dwMinorVersion;
v->dwBuildNumber = VersionData[ver].getVersionEx.dwBuildNumber;
v->dwPlatformId = VersionData[ver].getVersionEx.dwPlatformId;
strcpy( v->szCSDVersion, VersionData[ver].getVersionEx.szCSDVersion );
return TRUE;
}
/***********************************************************************
* GetVersionEx32A (KERNEL32.428)
*/
@ -300,3 +321,81 @@ void WINAPI DiagOutput(LPCSTR str)
/* FIXME */
DPRINTF("DIAGOUTPUT:%s\n",str);
}
/***********************************************************************
* DllGetVersion [COMCTL32.25]
*
*
*
*/
HRESULT WINAPI COMCTL32_DllGetVersion(DLLVERSIONINFO *pdvi)
{
VERSION ver = VERSION_GetVersion();
if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
{
WARN(ver, "wrong DLLVERSIONINFO size from app");
return OLE_ERROR_SIZE; /* FIXME: is this error correct ? */
}
pdvi->dwPlatformID = VersionData[ver].getVersionEx.dwPlatformId;
switch(VersionData[ver].getVersion32)
{
case 0x80000a03: /* Win 3.1 */
{
pdvi->dwMajorVersion = 3;
pdvi->dwMinorVersion = 51;
pdvi->dwBuildNumber = 0;
}
break;
case 0xc0000004: /* Win 95 */
{
pdvi->dwMajorVersion = 4;
pdvi->dwMinorVersion = 0;
pdvi->dwBuildNumber = 950;
}
break;
case 0x04213303: /* NT 3.51 FIXME: correct ? */
{
pdvi->dwMajorVersion = 3;
pdvi->dwMinorVersion = 51;
pdvi->dwBuildNumber = 0x421;
}
break;
case 0x05650004: /* NT 4.0 FIXME: correct ? */
{
pdvi->dwMajorVersion = 4;
pdvi->dwMinorVersion = 0;
pdvi->dwBuildNumber = 0x565;
}
break;
default:
{
ERR(ver, "Unknown Windows version, please add it to the list !\n");
}
break;
}
return 0; /* winerror.h: NOERROR */
}
/***********************************************************************
* OaBuildVersion [OLEAUT32.170]
*/
UINT32 WINAPI OaBuildVersion()
{
VERSION ver = VERSION_GetVersion();
switch(VersionData[ver].getVersion32)
{
case 0x80000a03: /* Win 3.1 */
return 0x140fd1; /* from Win32s 1.1e */
case 0xc0000004: /* Win 95 */
return 0x0a0bd3;
case 0x04213303: /* NT 3.51 */
return 0x0; /* FIXME */
case 0x05650004: /* NT 4.0 */
return 0x141016;
default:
return 0x0;
}
}

View File

@ -5,10 +5,10 @@
* Copyright (c) 1997 Andreas Mohr
*/
#include "windows.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "windows.h"
LPSTR WINAPI GetWin32sDirectory(void)
{

View File

@ -5,10 +5,10 @@
* Copyright (c) 1997 Andreas Mohr
*/
#include "windows.h"
#include "debug.h"
#include <string.h>
#include <stdlib.h>
#include "windows.h"
#include "debug.h"
void BootTask()
{

View File

@ -1929,7 +1929,7 @@ INT32 WINAPI WSACancelAsyncRequest32(HANDLE32 hAsyncTaskHandle)
INT16 WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle)
{
return (HANDLE16)WSACancelAsyncRequest16((HANDLE32)hAsyncTaskHandle);
return (HANDLE16)WSACancelAsyncRequest32((HANDLE32)hAsyncTaskHandle);
}
/***********************************************************************

View File

@ -8,6 +8,7 @@
#include <string.h>
#include "windows.h"
#include "heap.h"
#include "global.h"
#include "ldt.h"
#include "module.h"
#include "miscemu.h"
@ -24,6 +25,7 @@
void CreateBPB(int drive, BYTE *data, BOOL16 limited); /* defined in int21.c */
static void* lastvalloced = NULL;
/* Structure for real-mode callbacks */
typedef struct
@ -57,6 +59,72 @@ typedef struct tagRMCB {
static RMCB *FirstRMCB = NULL;
/**********************************************************************
* DPMI_xalloc
* special virtualalloc, allocates lineary monoton growing memory.
* (the usual VirtualAlloc does not satisfy that restriction)
*/
static LPVOID
DPMI_xalloc(int len) {
LPVOID ret;
LPVOID oldlastv = lastvalloced;
if (lastvalloced) {
int xflag = 0;
ret = NULL;
while (!ret) {
ret=VirtualAlloc(lastvalloced,len,MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE);
if (!ret)
lastvalloced+=0x10000;
/* we failed to allocate one in the first round.
* try non-linear
*/
if (!xflag && (lastvalloced<oldlastv)) { /* wrapped */
FIXME(int31,"failed to allocate lineary growing memory (%d bytes), using non-linear growing...\n",len);
xflag++;
}
/* if we even fail to allocate something in the next
* round, return NULL
*/
if ((xflag==1) && (lastvalloced >= oldlastv))
xflag++;
if ((xflag==2) && (lastvalloced < oldlastv)) {
FIXME(int31,"failed to allocate any memory of %d bytes!\n",len);
return NULL;
}
}
} else
ret=VirtualAlloc(NULL,len,MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE);
lastvalloced = (LPVOID)(((DWORD)ret+len+0xffff)&~0xffff);
return ret;
}
static void
DPMI_xfree(LPVOID ptr) {
VirtualFree(ptr,0,MEM_RELEASE);
}
/* FIXME: perhaps we could grow this mapped area... */
static LPVOID
DPMI_xrealloc(LPVOID ptr,int newsize) {
MEMORY_BASIC_INFORMATION mbi;
LPVOID newptr;
if (!VirtualQuery(ptr,&mbi,sizeof(mbi))) {
FIXME(int31,"reallocing non DPMI_xalloced region?\n");
return NULL;
}
/* We do not shrink allocated memory. most reallocs only do grows
* anyway
*/
if (newsize<=mbi.RegionSize)
return ptr;
newptr = DPMI_xalloc(newsize);
memcpy(newptr,ptr,newsize);
DPMI_xfree(ptr);
return newptr;
}
/**********************************************************************
* INT_GetRealModeContext
*/
@ -121,7 +189,7 @@ static void INT_DoRealModeInt( CONTEXT *context )
{
case 0x15:
/* MSCDEX hook */
do_mscdex( &realmode_ctx );
do_mscdex( &realmode_ctx, 1 );
break;
default:
SET_CFLAG(context);
@ -207,12 +275,28 @@ static void INT_DoRealModeInt( CONTEXT *context )
break;
}
}
break;
break;
default:
SET_CFLAG(context);
break;
}
break;
case 0x60: {/* CANONICALIZE PATH */
LPCSTR path = (LPCSTR)DOSMEM_MapRealToLinear((DS_reg(&realmode_ctx)<<16)+SI_reg(&realmode_ctx));
TRACE(int31,"TRUENAME %s\n",path);
if (!GetFullPathName32A(
path,
128,
(LPSTR)DOSMEM_MapRealToLinear(
(ES_reg(&realmode_ctx)<<16)+DI_reg(&realmode_ctx)),
NULL
))
SET_CFLAG(context);
else
AX_reg(&realmode_ctx) = 0;
}
break;
default:
SET_CFLAG(context);
break;
@ -525,7 +609,8 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
break;
case 0x0205: /* Set protected mode interrupt vector */
TRACE(int31,"set protected mode interrupt handler (0x%02x,0x%08lx), stub!\n",BL_reg(context),PTR_SEG_OFF_TO_LIN(CX_reg(context),DX_reg(context)));
TRACE(int31,"set protected mode interrupt handler (0x%02x,0x%08lx), stub!\n",
BL_reg(context),PTR_SEG_OFF_TO_LIN(CX_reg(context),DX_reg(context)));
INT_SetHandler( BL_reg(context),
(FARPROC16)PTR_SEG_OFF_TO_SEGPTR( CX_reg(context),
DX_reg(context) ));
@ -584,13 +669,11 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
}
case 0x0501: /* Allocate memory block */
TRACE(int31,"allocate memory block (%ld)\n",MAKELONG(CX_reg(context),BX_reg(context)));
if (!(ptr = (BYTE *)VirtualAlloc(NULL, MAKELONG(CX_reg(context), BX_reg(context)), MEM_COMMIT, PAGE_EXECUTE_READWRITE)))
if (!(ptr = (BYTE *)DPMI_xalloc(MAKELONG(CX_reg(context), BX_reg(context)))))
{
AX_reg(context) = 0x8012; /* linear memory not available */
SET_CFLAG(context);
}
else
{
} else {
BX_reg(context) = SI_reg(context) = HIWORD(ptr);
CX_reg(context) = DI_reg(context) = LOWORD(ptr);
}
@ -598,20 +681,18 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
case 0x0502: /* Free memory block */
TRACE(int31,"free memory block (0x%08lx)\n",MAKELONG(DI_reg(context),SI_reg(context)));
VirtualFree((void *)MAKELONG(DI_reg(context), SI_reg(context)), 0, MEM_RELEASE);
DPMI_xfree((void *)MAKELONG(DI_reg(context), SI_reg(context)));
break;
case 0x0503: /* Resize memory block */
TRACE(int31,"resize memory block (0x%08lx,%ld)\n",MAKELONG(DI_reg(context),SI_reg(context)),MAKELONG(CX_reg(context),BX_reg(context)));
if (!(ptr = (BYTE *)HeapReAlloc( GetProcessHeap(), 0,
if (!(ptr = (BYTE *)DPMI_xrealloc(
(void *)MAKELONG(DI_reg(context),SI_reg(context)),
MAKELONG(CX_reg(context),BX_reg(context)))))
{
AX_reg(context) = 0x8012; /* linear memory not available */
SET_CFLAG(context);
}
else
{
} else {
BX_reg(context) = SI_reg(context) = HIWORD(ptr);
CX_reg(context) = DI_reg(context) = LOWORD(ptr);
}

View File

@ -1313,6 +1313,13 @@ void WINAPI DOS3Call( CONTEXT *context )
case 0x01:
break;
case 0x02:{
FILE_OBJECT *file;
file = FILE_GetFile(BX_reg(context));
if (!lstrcmpi32A(file->unix_name, "SCSIMGR$"))
ASPI_DOS_HandleInt(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 drive = DOS_GET_DRIVE(BL_reg(context));

View File

@ -32,7 +32,7 @@ void WINAPI INT_Int2fHandler( CONTEXT *context )
break;
case 0x15: /* mscdex */
do_mscdex(context);
do_mscdex(context, FALSE );
break;
case 0x16:
@ -184,7 +184,7 @@ static void do_int2f_16( CONTEXT *context )
}
}
void do_mscdex( CONTEXT *context )
void do_mscdex( CONTEXT *context, int dorealmode )
{
int drive, count;
char *p;
@ -217,7 +217,10 @@ void do_mscdex( CONTEXT *context )
break;
case 0x0D: /* get drive letters */
p = PTR_SEG_OFF_TO_LIN(ES_reg(context), BX_reg(context));
if (dorealmode)
p = DOSMEM_MapRealToLinear(MAKELONG(BX_reg(context),ES_reg(context)));
else
p = PTR_SEG_OFF_TO_LIN(ES_reg(context), BX_reg(context));
memset( p, 0, MAX_DOS_DRIVES );
for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
{

View File

@ -212,7 +212,7 @@ static DWORD WAVE_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS16
TRACE(mciwave, "Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX \n",
(LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType,
mmckInfo.cksize);
if (mmioRead(MCIWavDev[wDevID].hFile, (HPSTR) lpWaveFormat,
if (mmioRead32(MCIWavDev[wDevID].hFile, (HPSTR) lpWaveFormat,
(long) sizeof(PCMWAVEFORMAT)) != (long) sizeof(PCMWAVEFORMAT))
return MCIERR_INTERNAL;
mmckInfo.ckid = mmioFOURCC('d', 'a', 't', 'a');
@ -263,7 +263,7 @@ static DWORD WAVE_mciCue(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpPar
/* always close elements ? */
if (MCIWavDev[wDevID].hFile != 0) {
mmioClose(MCIWavDev[wDevID].hFile, 0);
mmioClose32(MCIWavDev[wDevID].hFile, 0);
MCIWavDev[wDevID].hFile = 0;
}
@ -300,7 +300,7 @@ static DWORD WAVE_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpP
MCIWavDev[wDevID].nUseCount--;
if (MCIWavDev[wDevID].nUseCount == 0) {
if (MCIWavDev[wDevID].hFile != 0) {
mmioClose(MCIWavDev[wDevID].hFile, 0);
mmioClose32(MCIWavDev[wDevID].hFile, 0);
MCIWavDev[wDevID].hFile = 0;
}
if (MCIWavDev[wDevID].fInput)
@ -370,7 +370,7 @@ static DWORD WAVE_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
lpWaveHdr->dwLoops = 0L;
dwRet=wodMessage(wDevID,WODM_PREPARE,0,(DWORD)lpWaveHdr,sizeof(WAVEHDR));
while(TRUE) {
count = mmioRead(MCIWavDev[wDevID].hFile, lpWaveHdr->lpData, bufsize);
count = mmioRead32(MCIWavDev[wDevID].hFile, lpWaveHdr->lpData, bufsize);
TRACE(mciwave,"mmioRead bufsize=%ld count=%ld\n", bufsize, count);
if (count < 1) break;
lpWaveHdr->dwBufferLength = count;
@ -1056,10 +1056,12 @@ static DWORD wodRestart(WORD wDevID)
return MMSYSERR_NOTENABLED;
}
/* FIXME: is NotifyClient with WOM_DONE right ? (Comet Busters 1.3.3 needs this notification) */
/* FIXME: Myst crashes with this ... hmm -MM
if (WAVE_NotifyClient(wDevID, WOM_DONE, 0L, 0L) != MMSYSERR_NOERROR) {
WARN(mciwave, "can't notify client !\n");
return MMSYSERR_INVALPARAM;
}
*/
return MMSYSERR_NOERROR;
}

View File

@ -36,6 +36,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <math.h> /* Insomnia - pow() function */
#include "windows.h"
#include "winerror.h"
#include "interfaces.h"
@ -179,6 +180,7 @@ static HRESULT WINAPI IDirectSoundBuffer_SetVolume(
TRACE(dsound,"(%p,%ld)\n",this,vol);
this->volume = vol;
this->volfac = ((double)vol+10000.0)/10000.0;
return 0;
}
@ -340,7 +342,7 @@ static HRESULT WINAPI IDirectSoundBuffer_GetPan(
static HRESULT WINAPI IDirectSoundBuffer_Unlock(
LPDIRECTSOUNDBUFFER this,LPVOID p1,DWORD x1,LPVOID p2,DWORD x2
) {
FIXME(dsound,"(%p,%p,%ld,%p,%ld):stub\n", this,p1,x1,p2,x2);
/* FIXME(dsound,"(%p,%p,%ld,%p,%ld):stub\n", this,p1,x1,p2,x2); */
return 0;
}
@ -356,6 +358,7 @@ static HRESULT WINAPI IDirectSoundBuffer_Initialize(
LPDIRECTSOUNDBUFFER this,LPDIRECTSOUND dsound,LPDSBUFFERDESC dbsd
) {
FIXME(dsound,"(%p,%p,%p):stub\n",this,dsound,dbsd);
printf("Re-Init!!!\n");
return DSERR_ALREADYINITIALIZED;
}
@ -622,7 +625,29 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
int j,buflen = dsb->buflen;
LPDSBPOSITIONNOTIFY nextevent;
int xdiff = dsb->wfx.nSamplesPerSec-dsound->wfx.nSamplesPerSec;
double volfac = dsb->volfac;
/* Insomnia - Going along with REAL author's style */
long Rvoldec, Lvoldec;
long pan = dsb->pan;
long samp; /* temporary sample workspace */
{
double tmpr=dsb->volume-500;
double tmpl=tmpr;
if(pan>0) tmpl -= (double)pan;
else tmpr += (double)pan;
tmpl /= 1000.0;
tmpr /= 1000.0;
tmpl = pow(2.0, tmpl);
tmpr = pow(2.0, tmpr);
tmpl *= 65536; /* Set to the correct multiple times */
tmpr *= 65536; /* 65536 to be convenient for bit shifting */
tmpl += 0.5; /* Add .5 for rounding accuracy */
tmpr += 0.5;
Lvoldec = (long)tmpl;
Rvoldec = (long)tmpr;
}
/* End Insomnia's mod */
if (xdiff<0) xdiff=-xdiff;
if (xdiff>1500) {
@ -646,9 +671,26 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
playbuf8[(j<<1) ]+=xbuf[dsb->playpos]*volfac;
playbuf8[(j<<1)+1]+=xbuf[dsb->playpos]*volfac;
/* Insomnia- volume, panning, and correcting against wrap */
/* Left Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Lvoldec;
samp >>= 16;
samp += playbuf8[(j<<1)];
if(samp > 127L) samp = 127L;
else if(samp < -128L) samp = -128L;
playbuf8[(j<<1)] = (short)samp;
/* Right Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Rvoldec;
samp >>= 16;
samp += playbuf8[(j<<1)+1];
if(samp > 127L) samp = 127L;
else if(samp < -128L) samp = -128L;
playbuf8[(j<<1)+1] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
} else {
@ -659,8 +701,21 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
playbuf8[j]+=xbuf[dsb->playpos]*volfac;
/* Insomnia- volume, panning, and correcting against wrap */
samp = xbuf[dsb->playpos>>1];
/* Right Channel */
if(j&1) samp *= Rvoldec;
/* Left Channel */
else samp *= Lvoldec;
samp >>= 16;
samp += playbuf8[j];
if(samp > 127L) samp = 127L;
else if(samp < -128L) samp = -128L;
playbuf8[j] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
}
@ -674,9 +729,26 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
playbuf8[(j<<1) ]+=(xbuf[dsb->playpos>>1]>>8)*volfac;
playbuf8[(j<<1)+1]+=(xbuf[dsb->playpos>>1]>>8)*volfac;
/* Insomnia- volume, panning, and correcting against wrap */
/* Left Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Lvoldec;
samp >>= 24;
samp += playbuf8[(j<<1)];
if(samp > 127L) samp = 127L;
else if(samp < -128L) samp = -128L;
playbuf8[(j<<1)] = (short)samp;
/* Right Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Rvoldec;
samp >>= 24;
samp += playbuf8[(j<<1)+1];
if(samp > 127L) samp = 127L;
else if(samp < -128L) samp = -128L;
playbuf8[(j<<1)+1] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
} else {
@ -687,16 +759,31 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
playbuf8[j]+=(xbuf[dsb->playpos>>1]>>8)*volfac;
/* Insomnia- volume, panning, and correcting against wrap */
samp = xbuf[dsb->playpos>>1];
/* Right Channel */
if(j&1) samp *= Rvoldec;
/* Left Channel */
else samp *= Lvoldec;
samp >>= 24;
samp += playbuf8[j];
if(samp > 127L) samp = 127L;
else if(samp < -128L) samp = -128L;
playbuf8[j] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
}
}
} else { /* 16 bit */
if (dsb->wfx.wBitsPerSample == 8) {
unsigned char *xbuf = (unsigned char*)(dsb->buffer);
/* unsigned char *xbuf = (unsigned char*)(dsb->buffer); */
char *xbuf = dsb->buffer;
if (dsb->wfx.nChannels == 1) {
printf("Mixing 8-bit stereo into 16!!\n");
for (j=0;j<sizeof(playbuf)/sizeof(playbuf[0])/2;j++) {
dsb->playpos=(dsb->playpos+1)%buflen;
if (!dsb->playpos && !(dsb->playflags&DSBPLAY_LOOPING)) {
@ -704,10 +791,26 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
/* FIXME: should be *256 */
playbuf[(j<<1) ]+=(xbuf[dsb->playpos]<<7)*volfac;
playbuf[(j<<1)+1]+=(xbuf[dsb->playpos]<<7)*volfac;
/* Insomnia- volume, panning, and correcting against wrap */
/* Left Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Lvoldec;
samp >>= 8;
samp += playbuf[(j<<1)];
if(samp > 32767L) samp = 32767L;
else if(samp < -32768L) samp = -32768L;
playbuf[(j<<1)] = (short)samp;
/* Right Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Rvoldec;
samp >>= 8;
samp += playbuf[(j<<1)+1];
if(samp > 32767L) samp = 32767L;
else if(samp < -32768L) samp = -32768L;
playbuf[(j<<1)+1] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
} else {
@ -718,9 +821,21 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
/* FIXME: should be *256 */
playbuf[j]+=(xbuf[dsb->playpos]<<7)*volfac;
/* Insomnia- volume, panning, and correcting against wrap */
samp = xbuf[dsb->playpos>>1];
/* Right Channel */
if(j&1) samp *= Rvoldec;
/* Left Channel */
else samp *= Lvoldec;
samp >>= 8;
samp += playbuf[j];
if(samp > 32767L) samp = 32767L;
else if(samp < -32768L) samp = -32768L;
playbuf[j] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
}
@ -734,9 +849,26 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
playbuf[(j<<1) ]+=(xbuf[dsb->playpos>>1]*volfac);
playbuf[(j<<1)+1]+=(xbuf[dsb->playpos>>1]*volfac);
/* Insomnia- volume, panning, and correcting against wrap */
/* Left Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Lvoldec;
samp >>= 16;
samp += playbuf[(j<<1)];
if(samp > 32767L) samp = 32767L;
else if(samp < -32768L) samp = -32768L;
playbuf[(j<<1)] = (short)samp;
/* Right Channel */
samp = xbuf[dsb->playpos>>1];
samp *= Rvoldec;
samp >>= 16;
samp += playbuf[(j<<1)+1];
if(samp > 32767L) samp = 32767L;
else if(samp < -32768L) samp = -32768L;
playbuf[(j<<1)+1] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
} else {
@ -747,8 +879,21 @@ DSOUND_MixInBuffer(IDirectSoundBuffer *dsb) {
dsb->playpos = buflen;
return;
}
/* FIXME: pan,volume */
playbuf[j]+=xbuf[dsb->playpos>>1]/**volfac*/;
/* Insomnia- volume, panning, and correcting against wrap */
samp = xbuf[dsb->playpos>>1];
/* Right Channel */
if(j&1) samp *= Rvoldec;
/* Left Channel */
else samp *= Lvoldec;
samp >>= 16;
samp += playbuf[j];
if(samp > 32767L) samp = 32767L;
else if(samp < -32768L) samp = -32768L;
playbuf[j] = (short)samp;
/* End Insomnia's mod */
CHECK_EVENT
}
}
@ -784,6 +929,8 @@ DSOUND_thread(LPVOID arg) {
for (i=dsound->nrofbuffers;i--;) {
IDirectSoundBuffer *dsb = dsound->buffers[i];
if (!dsb || !dsb->lpvtbl)
continue;
dsb->lpvtbl->fnAddRef(dsb);
if (dsb->playing && dsb->buflen)
playing++;
@ -814,6 +961,8 @@ DSOUND_thread(LPVOID arg) {
for (i=dsound->nrofbuffers;i--;) {
IDirectSoundBuffer *dsb = dsound->buffers[i];
if (!dsb || !dsb->lpvtbl)
continue;
dsb->lpvtbl->fnAddRef(dsb);
if (dsb->buflen && dsb->playing) {
playing++;
@ -882,7 +1031,7 @@ HRESULT WINAPI DirectSoundCreate(LPGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pUn
DWORD xid;
dsound = (*ppDS);
hnd = CreateThread(NULL,NULL,DSOUND_thread,0,0,&xid);
hnd = CreateThread(NULL,0,DSOUND_thread,0,0,&xid);
}
return 0;
#else

View File

@ -2177,9 +2177,9 @@ DWORD WINAPI mciSendString (LPCSTR lpstrCommand, LPSTR lpstrReturnString,
SEGPTR dname;
dname=(SEGPTR)GetOpenDrv(wDevID)->lpstrAlias;
if (dname==NULL)
if (dname==(SEGPTR)NULL)
dname=(SEGPTR)GetOpenDrv(wDevID)->lpstrDeviceType;
if ((dname!=NULL)&&(!STRCMP(PTR_SEG_TO_LIN(dname),dev)))
if ((dname!=(SEGPTR)NULL)&&(!STRCMP(PTR_SEG_TO_LIN(dname),dev)))
break;
wDevID = MMSYSTEM_NextDevID(wDevID);
if (!MMSYSTEM_DevIDValid(wDevID)) {

View File

@ -81,7 +81,7 @@ static DWORD MIDI_NotifyClient(UINT16 wDevID, WORD wMsg,
static DWORD MIDI_ReadByte(UINT16 wDevID, BYTE *lpbyt)
{
if (lpbyt != NULL) {
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)lpbyt,
if (mmioRead32(MCIMidiDev[wDevID].hFile, (HPSTR)lpbyt,
(long) sizeof(BYTE)) == (long) sizeof(BYTE)) {
return 0;
}
@ -166,11 +166,11 @@ static DWORD MIDI_ReadMThd(UINT16 wDevID, DWORD dwOffset)
DWORD toberead;
FOURCC fourcc;
TRACE(midi, "(%04X, %08lX);\n", wDevID, dwOffset);
if (mmioSeek(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
if (mmioSeek32(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
WARN(midi, "can't seek at %08lX begin of 'MThd' \n", dwOffset);
return MCIERR_INTERNAL;
}
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
if (mmioRead32(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
(long) sizeof(FOURCC)) != (long) sizeof(FOURCC))
return MCIERR_INTERNAL;
if (MIDI_ReadLong(wDevID, &toberead) != 0)
@ -198,10 +198,10 @@ static DWORD MIDI_ReadMTrk(UINT16 wDevID, DWORD dwOffset)
{
DWORD toberead;
FOURCC fourcc;
if (mmioSeek(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
if (mmioSeek32(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
WARN(midi, "can't seek at %08lX begin of 'MThd' \n", dwOffset);
}
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
if (mmioRead32(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
(long) sizeof(FOURCC)) != (long) sizeof(FOURCC)) {
return MCIERR_INTERNAL;
}
@ -290,12 +290,12 @@ static DWORD MIDI_mciOpen(UINT16 wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS16 lpPar
WARN(midi, "can't read 'MThd' header \n");
return MCIERR_INTERNAL;
}
dwOffset = mmioSeek(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
dwOffset = mmioSeek32(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
if (MIDI_ReadMTrk(wDevID, dwOffset) != 0) {
WARN(midi, "can't read 'MTrk' header \n");
return MCIERR_INTERNAL;
}
dwOffset = mmioSeek(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
dwOffset = mmioSeek32(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
MCIMidiDev[wDevID].dwBeginData = dwOffset;
TRACE(midi, "Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX \n",
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType,
@ -337,10 +337,10 @@ static DWORD MIDI_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpP
MCIMidiDev[wDevID].nUseCount--;
if (MCIMidiDev[wDevID].nUseCount == 0) {
if (MCIMidiDev[wDevID].hFile != 0) {
mmioClose(MCIMidiDev[wDevID].hFile, 0);
mmioClose32(MCIMidiDev[wDevID].hFile, 0);
MCIMidiDev[wDevID].hFile = 0;
TRACE(midi, "hFile closed !\n");
}
}
USER_HEAP_FREE(MCIMidiDev[wDevID].hMidiHdr);
dwRet = modMessage(wDevID, MODM_CLOSE, 0, 0L, 0L);
if (dwRet != MMSYSERR_NOERROR) return MCIERR_INTERNAL;
@ -417,7 +417,7 @@ static DWORD MIDI_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
*ptr = LOWORD(dwData);
}
/*
count = mmioRead(MCIMidiDev[wDevID].hFile, lpMidiHdr->lpData, lpMidiHdr->dwBufferLength);
count = mmioRead32(MCIMidiDev[wDevID].hFile, lpMidiHdr->lpData, lpMidiHdr->dwBufferLength);
*/
TRACE(midi, "after read count = %d\n",count);

View File

@ -22,8 +22,8 @@
#include "xmalloc.h"
/**************************************************************************
* mmioDosIOProc [internal]
*/
* mmioDosIOProc [internal]
*/
static LRESULT mmioDosIOProc(LPMMIOINFO16 lpmmioinfo, UINT16 uMessage, LPARAM lParam1, LPARAM lParam2) {
TRACE(mmio, "(%p, %X, %ld, %ld);\n", lpmmioinfo, uMessage, lParam1, lParam2);
@ -148,7 +148,7 @@ static LRESULT mmioDosIOProc(LPMMIOINFO16 lpmmioinfo, UINT16 uMessage, LPARAM lP
}
default:
WARN(mmio, "unexpected message %u\n", uMessage);
FIXME(mmio, "unexpected message %u\n", uMessage);
return 0;
}
@ -156,9 +156,10 @@ static LRESULT mmioDosIOProc(LPMMIOINFO16 lpmmioinfo, UINT16 uMessage, LPARAM lP
}
/**************************************************************************
* mmioDosIOProc [internal]
* mmioMemIOProc [internal]
*/
static LRESULT mmioMemIOProc(LPMMIOINFO16 lpmmioinfo, UINT16 uMessage, LPARAM lParam1, LPARAM lParam2) {
FIXME(mmio,"(%p,0x%04x,0x%08lx,0x%08lx), stub!\n",lpmmioinfo,uMessage,lParam1,lParam2);
return 0;
}
@ -248,12 +249,12 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16 * lpmmioinfo,
/**************************************************************************
* mmioClose [MMSYSTEM.1211]
*/
UINT16 WINAPI mmioClose(HMMIO16 hmmio, UINT16 uFlags)
* mmioClose [WINMM.114]
*/
MMRESULT32 WINAPI mmioClose32(HMMIO32 hmmio, UINT32 uFlags)
{
LPMMIOINFO16 lpmminfo;
UINT16 result;
MMRESULT32 result;
TRACE(mmio, "(%04X, %04X);\n", hmmio, uFlags);
@ -262,10 +263,10 @@ UINT16 WINAPI mmioClose(HMMIO16 hmmio, UINT16 uFlags)
return 0;
/* flush the file - if error reported, ignore */
if (mmioFlush(hmmio, MMIO_EMPTYBUF) != 0)
if (mmioFlush32(hmmio, MMIO_EMPTYBUF) != 0)
lpmminfo->dwFlags &= ~MMIO_DIRTY;
result = (UINT16) mmioSendMessage(hmmio, MMIOM_CLOSE, (LPARAM) uFlags, (LPARAM) 0);
result = mmioSendMessage(hmmio,MMIOM_CLOSE,(LPARAM)uFlags,(LPARAM)0);
mmioSetBuffer(hmmio, NULL, 0, 0);
@ -276,11 +277,20 @@ UINT16 WINAPI mmioClose(HMMIO16 hmmio, UINT16 uFlags)
}
/**************************************************************************
* mmioClose [MMSYSTEM.1211]
*/
MMRESULT16 WINAPI mmioClose16(HMMIO16 hmmio, UINT16 uFlags)
{
return mmioClose32(hmmio,uFlags);
}
/**************************************************************************
* mmioRead [MMSYSTEM.1212]
*/
LONG WINAPI mmioRead(HMMIO16 hmmio, HPSTR pch, LONG cch)
* mmioRead [WINM.124]
*/
LONG WINAPI mmioRead32(HMMIO32 hmmio, HPSTR pch, LONG cch)
{
LONG count;
LPMMIOINFO16 lpmminfo;
@ -298,12 +308,18 @@ LONG WINAPI mmioRead(HMMIO16 hmmio, HPSTR pch, LONG cch)
return count;
}
/**************************************************************************
* mmioRead [MMSYSTEM.1212]
*/
LONG WINAPI mmioRead16(HMMIO16 hmmio, HPSTR pch, LONG cch)
{
return mmioRead32(hmmio,pch,cch);
}
/**************************************************************************
* mmioWrite [MMSYSTEM.1213]
*/
LONG WINAPI mmioWrite(HMMIO16 hmmio, HPCSTR pch, LONG cch)
* mmioWrite [WINMM.133]
*/
LONG WINAPI mmioWrite32(HMMIO32 hmmio, HPCSTR pch, LONG cch)
{
LONG count;
LPMMIOINFO16 lpmminfo;
@ -322,9 +338,17 @@ LONG WINAPI mmioWrite(HMMIO16 hmmio, HPCSTR pch, LONG cch)
}
/**************************************************************************
* mmioSeek [MMSYSTEM.1214]
*/
LONG WINAPI mmioSeek(HMMIO16 hmmio, LONG lOffset, int iOrigin)
* mmioWrite [MMSYSTEM.1213]
*/
LONG WINAPI mmioWrite16(HMMIO16 hmmio, HPCSTR pch, LONG cch)
{
return mmioWrite32(hmmio,pch,cch);
}
/**************************************************************************
* mmioSeek [MMSYSTEM.1214]
*/
LONG WINAPI mmioSeek32(HMMIO32 hmmio, LONG lOffset, INT32 iOrigin)
{
int offset;
LPMMIOINFO16 lpmminfo;
@ -342,9 +366,17 @@ LONG WINAPI mmioSeek(HMMIO16 hmmio, LONG lOffset, int iOrigin)
}
/**************************************************************************
* mmioGetInfo [MMSYSTEM.1215]
*/
UINT16 WINAPI mmioGetInfo(HMMIO16 hmmio, MMIOINFO16 * lpmmioinfo, UINT16 uFlags)
* mmioSeek [MMSYSTEM.1214]
*/
LONG WINAPI mmioSeek16(HMMIO16 hmmio, LONG lOffset, INT16 iOrigin)
{
return mmioSeek32(hmmio,lOffset,iOrigin);
}
/**************************************************************************
* mmioGetInfo [MMSYSTEM.1215]
*/
UINT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16 * lpmmioinfo, UINT16 uFlags)
{
LPMMIOINFO16 lpmminfo;
TRACE(mmio, "mmioGetInfo\n");
@ -355,6 +387,38 @@ UINT16 WINAPI mmioGetInfo(HMMIO16 hmmio, MMIOINFO16 * lpmmioinfo, UINT16 uFlags)
return 0;
}
/**************************************************************************
* mmioGetInfo [WINMM.118]
*/
UINT32 WINAPI mmioGetInfo32(HMMIO32 hmmio, MMIOINFO32*lpmmioinfo, UINT32 uFlags)
{
MMIOINFO16 mmioinfo;
LPMMIOINFO16 lpmminfo=&mmioinfo;
UINT16 ret;
TRACE(mmio, "(0x%04x,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
ret = mmioGetInfo16(hmmio,&mmioinfo,uFlags);
if (!ret)
return 0;
lpmmioinfo->dwFlags = lpmminfo->dwFlags;
lpmmioinfo->fccIOProc = lpmminfo->fccIOProc;
lpmmioinfo->pIOProc = (LPMMIOPROC32)lpmminfo->pIOProc;
lpmmioinfo->wErrorRet = lpmminfo->wErrorRet;
lpmmioinfo->htask = lpmminfo->htask;
lpmmioinfo->cchBuffer = lpmminfo->cchBuffer;
lpmmioinfo->pchBuffer = lpmminfo->pchBuffer;
lpmmioinfo->pchNext = lpmminfo->pchNext;
lpmmioinfo->pchEndRead = lpmminfo->pchEndRead;
lpmmioinfo->pchEndWrite = lpmminfo->pchEndWrite;
lpmmioinfo->lBufOffset = lpmminfo->lBufOffset;
lpmmioinfo->lDiskOffset = lpmminfo->lDiskOffset;
memcpy(lpmmioinfo->adwInfo,lpmminfo->adwInfo,sizeof(lpmminfo->adwInfo));
lpmmioinfo->dwReserved1 = lpmminfo->dwReserved1;
lpmmioinfo->dwReserved2 = lpmminfo->dwReserved2;
lpmmioinfo->hmmio = lpmminfo->hmmio;
return 0;
}
/**************************************************************************
* mmioSetInfo [MMSYSTEM.1216]
*/
@ -383,9 +447,9 @@ UINT16 WINAPI mmioSetBuffer(HMMIO16 hmmio, LPSTR pchBuffer,
}
/**************************************************************************
* mmioFlush [MMSYSTEM.1218]
*/
UINT16 WINAPI mmioFlush(HMMIO16 hmmio, UINT16 uFlags)
* mmioFlush [WINMM.117]
*/
UINT32 WINAPI mmioFlush32(HMMIO32 hmmio, UINT32 uFlags)
{
LPMMIOINFO16 lpmminfo;
TRACE(mmio, "(%04X, %04X)\n", hmmio, uFlags);
@ -396,23 +460,51 @@ UINT16 WINAPI mmioFlush(HMMIO16 hmmio, UINT16 uFlags)
}
/**************************************************************************
* mmioAdvance [MMSYSTEM.1219]
*/
UINT16 WINAPI mmioAdvance(HMMIO16 hmmio, MMIOINFO16 * lpmmioinfo, UINT16 uFlags)
* mmioFlush [MMSYSTEM.1218]
*/
UINT16 WINAPI mmioFlush16(HMMIO16 hmmio, UINT16 uFlags)
{
return mmioFlush32(hmmio,uFlags);
}
/**************************************************************************
* mmioAdvance [MMSYSTEM.1219]
*/
UINT32 WINAPI mmioAdvance32(HMMIO32 hmmio,MMIOINFO32*lpmmioinfo,UINT32 uFlags)
{
int count = 0;
LPMMIOINFO16 lpmminfo;
TRACE(mmio, "mmioAdvance\n");
lpmminfo = (LPMMIOINFO16)GlobalLock16(hmmio);
if (lpmminfo == NULL) return 0;
if (uFlags == MMIO_READ) {
if (uFlags == MMIO_READ)
count = _lread32(LOWORD(lpmminfo->adwInfo[0]),
lpmmioinfo->pchBuffer, lpmmioinfo->cchBuffer);
}
if (uFlags == MMIO_WRITE) {
if (uFlags == MMIO_WRITE)
count = _lwrite32(LOWORD(lpmminfo->adwInfo[0]),
lpmmioinfo->pchBuffer, lpmmioinfo->cchBuffer);
lpmmioinfo->pchNext += count;
GlobalUnlock16(hmmio);
lpmminfo->lDiskOffset = _llseek32((HFILE32)lpmminfo->adwInfo[0], 0, SEEK_CUR);
return 0;
}
/**************************************************************************
* mmioAdvance [MMSYSTEM.1219]
*/
UINT16 WINAPI mmioAdvance16(HMMIO16 hmmio,MMIOINFO16*lpmmioinfo,UINT16 uFlags)
{
int count = 0;
LPMMIOINFO16 lpmminfo;
TRACE(mmio, "mmioAdvance\n");
lpmminfo = (LPMMIOINFO16)GlobalLock16(hmmio);
if (lpmminfo == NULL) return 0;
if (uFlags == MMIO_READ)
count = _lread32(LOWORD(lpmminfo->adwInfo[0]),
lpmmioinfo->pchBuffer, lpmmioinfo->cchBuffer);
if (uFlags == MMIO_WRITE)
count = _lwrite32(LOWORD(lpmminfo->adwInfo[0]),
lpmmioinfo->pchBuffer, lpmmioinfo->cchBuffer);
}
lpmmioinfo->pchNext += count;
GlobalUnlock16(hmmio);
lpmminfo->lDiskOffset = _llseek32((HFILE32)lpmminfo->adwInfo[0], 0, SEEK_CUR);
@ -444,8 +536,7 @@ FOURCC WINAPI mmioStringToFOURCC32W(LPCWSTR sz, UINT32 uFlags)
*/
FOURCC WINAPI mmioStringToFOURCC16(LPCSTR sz, UINT16 uFlags)
{
FIXME(mmio, "empty stub \n");
return 0;
return mmioFOURCC(sz[0],sz[1],sz[2],sz[3]);
}
/**************************************************************************
@ -554,12 +645,12 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
dwfcc = lpck->ckid;
TRACE(mmio, "dwfcc=%08lX\n", dwfcc);
dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
dwOldPos = mmioSeek32(hmmio, 0, SEEK_CUR);
TRACE(mmio, "dwOldPos=%ld\n", dwOldPos);
if (lpckParent != NULL) {
TRACE(mmio, "seek inside parent at %ld !\n", lpckParent->dwDataOffset);
dwOldPos = mmioSeek(hmmio, lpckParent->dwDataOffset, SEEK_SET);
dwOldPos = mmioSeek32(hmmio,lpckParent->dwDataOffset,SEEK_SET);
}
/*
@ -574,11 +665,11 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
while (TRUE) {
LONG ix;
ix = mmioRead(hmmio, (LPSTR)lpck, sizeof(MMCKINFO));
ix = mmioRead32(hmmio, (LPSTR)lpck, sizeof(MMCKINFO));
TRACE(mmio, "after _lread32 ix = %ld req = %d, errno = %d\n",ix,sizeof(MMCKINFO),errno);
if (ix < sizeof(MMCKINFO)) {
mmioSeek(hmmio, dwOldPos, SEEK_SET);
mmioSeek32(hmmio, dwOldPos, SEEK_SET);
WARN(mmio, "return ChunkNotFound\n");
return MMIOERR_CHUNKNOTFOUND;
}
@ -590,12 +681,12 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
dwOldPos += lpck->cksize + 2 * sizeof(DWORD);
if (lpck->ckid == FOURCC_RIFF || lpck->ckid == FOURCC_LIST)
dwOldPos += sizeof(DWORD);
mmioSeek(hmmio, dwOldPos, SEEK_SET);
mmioSeek32(hmmio, dwOldPos, SEEK_SET);
}
}
else {
if (mmioRead(hmmio, (LPSTR)lpck, sizeof(MMCKINFO)) < sizeof(MMCKINFO)) {
mmioSeek(hmmio, dwOldPos, SEEK_SET);
if (mmioRead32(hmmio, (LPSTR)lpck, sizeof(MMCKINFO)) < sizeof(MMCKINFO)) {
mmioSeek32(hmmio, dwOldPos, SEEK_SET);
WARN(mmio, "return ChunkNotFound 2nd\n");
return MMIOERR_CHUNKNOTFOUND;
}
@ -603,7 +694,7 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
lpck->dwDataOffset = dwOldPos + 2 * sizeof(DWORD);
if (lpck->ckid == FOURCC_RIFF || lpck->ckid == FOURCC_LIST)
lpck->dwDataOffset += sizeof(DWORD);
mmioSeek(hmmio, lpck->dwDataOffset, SEEK_SET);
mmioSeek32(hmmio, lpck->dwDataOffset, SEEK_SET);
TRACE(mmio, "lpck->ckid=%08lX lpck->cksize=%ld !\n",
lpck->ckid, lpck->cksize);
@ -613,17 +704,25 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
}
/**************************************************************************
* mmioAscend [MMSYSTEM.1224]
*/
UINT16 WINAPI mmioAscend(HMMIO16 hmmio, MMCKINFO * lpck, UINT16 uFlags)
* mmioAscend [WINMM.113]
*/
UINT32 WINAPI mmioAscend32(HMMIO32 hmmio, MMCKINFO * lpck, UINT32 uFlags)
{
FIXME(mmio, "empty stub !\n");
return 0;
}
/**************************************************************************
* mmioCreateChunk [MMSYSTEM.1225]
*/
* mmioAscend [MMSYSTEM.1224]
*/
UINT16 WINAPI mmioAscend16(HMMIO16 hmmio, MMCKINFO * lpck, UINT16 uFlags)
{
return mmioAscend32(hmmio,lpck,uFlags);
}
/**************************************************************************
* mmioCreateChunk [MMSYSTEM.1225]
*/
UINT16 WINAPI mmioCreateChunk(HMMIO16 hmmio, MMCKINFO * lpck, UINT16 uFlags)
{
FIXME(mmio, "empty stub \n");
@ -632,8 +731,8 @@ UINT16 WINAPI mmioCreateChunk(HMMIO16 hmmio, MMCKINFO * lpck, UINT16 uFlags)
/**************************************************************************
* mmioRename [MMSYSTEM.1226]
*/
* mmioRename [MMSYSTEM.1226]
*/
UINT16 WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
MMIOINFO16 * lpmmioinfo, DWORD dwRenameFlags)
{

View File

@ -201,7 +201,7 @@ BOOL16 WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT16 uFlags)
TRACE(mmsys, "Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX \n",
(LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType, mmckInfo.cksize);
if (mmioRead(hmmio, (HPSTR) &pcmWaveFormat,
if (mmioRead32(hmmio,(HPSTR)&pcmWaveFormat,
(long) sizeof(PCMWAVEFORMAT)) == (long) sizeof(PCMWAVEFORMAT))
{
@ -246,7 +246,7 @@ BOOL16 WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT16 uFlags)
{
while( TRUE )
{
count = mmioRead(hmmio, waveHdr.lpData, bufsize);
count = mmioRead32(hmmio,waveHdr.lpData,bufsize);
if (count < 1) break;
waveHdr.dwBufferLength = count;
/* waveHdr.dwBytesRecorded = count; */
@ -269,7 +269,7 @@ BOOL16 WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT16 uFlags)
}
}
if (hmmio != 0) mmioClose(hmmio, 0);
if (hmmio != 0) mmioClose32(hmmio, 0);
return bRet;
}
@ -3631,48 +3631,46 @@ DWORD WINAPI waveInMessage16(HWAVEIN16 hWaveIn, UINT16 uMessage,
}
/**************************************************************************
* DrvOpen [MMSYSTEM.1100]
*/
* DrvOpen [MMSYSTEM.1100]
*/
HDRVR16 WINAPI DrvOpen(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
{
TRACE(mmsys, "('%s', '%s', %08lX);\n",
lpDriverName, lpSectionName, lParam);
return OpenDriver(lpDriverName, lpSectionName, lParam);
TRACE(mmsys,"('%s','%s',%08lX);\n",lpDriverName,lpSectionName,lParam);
return OpenDriver16(lpDriverName, lpSectionName, lParam);
}
/**************************************************************************
* DrvClose [MMSYSTEM.1101]
*/
* DrvClose [MMSYSTEM.1101]
*/
LRESULT WINAPI DrvClose(HDRVR16 hDrvr, LPARAM lParam1, LPARAM lParam2)
{
TRACE(mmsys, "(%04X, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
return CloseDriver(hDrvr, lParam1, lParam2);
return CloseDriver16(hDrvr, lParam1, lParam2);
}
/**************************************************************************
* DrvSendMessage [MMSYSTEM.1102]
*/
* DrvSendMessage [MMSYSTEM.1102]
*/
LRESULT WINAPI DrvSendMessage(HDRVR16 hDriver, WORD msg, LPARAM lParam1,
LPARAM lParam2)
{
DWORD dwDriverID = 0;
TRACE(mmsys, "(%04X, %04X, %08lX, %08lX);\n",
FIXME(mmsys, "(%04X, %04X, %08lX, %08lX);\n",
hDriver, msg, lParam1, lParam2);
/* FIXME: wrong ... */
return CDAUDIO_DriverProc(dwDriverID, hDriver, msg, lParam1, lParam2);
}
/**************************************************************************
* DrvGetModuleHandle [MMSYSTEM.1103]
*/
HANDLE16 WINAPI DrvGetModuleHandle(HDRVR16 hDrvr)
* DrvGetModuleHandle [MMSYSTEM.1103]
*/
HANDLE16 WINAPI DrvGetModuleHandle16(HDRVR16 hDrvr)
{
TRACE(mmsys, "(%04X);\n", hDrvr);
return 0;
return GetDriverModuleHandle16(hDrvr);
}
/**************************************************************************
* DrvDefDriverProc [MMSYSTEM.1104]
*/

View File

@ -178,8 +178,14 @@ INT32 CLIPPING_IntersectClipRect( DC * dc, INT32 left, INT32 top,
{
dc->w.hClipRgn = newRgn;
CLIPPING_UpdateGCRegion( dc );
return SIMPLEREGION;
}
return SIMPLEREGION;
else if( flags & CLIP_EXCLUDE )
{
dc->w.hClipRgn = CreateRectRgn32( 0, 0, 0, 0 );
CombineRgn32( dc->w.hClipRgn, dc->w.hVisRgn, 0, RGN_COPY );
}
else WARN(clipping,"No hClipRgn and flags are %x\n",flags);
}
ret = CombineRgn32( newRgn, dc->w.hClipRgn, newRgn,

View File

@ -43,6 +43,7 @@
#include "user.h"
#include "keyboard.h"
#include "x11drv.h"
#include "winerror.h"
Cursor CURSORICON_XCursor = None; /* Current X cursor */
static HCURSOR32 hActiveCursor = 0; /* Active cursor */
@ -1471,7 +1472,25 @@ HCURSOR32 WINAPI LoadCursor32A(HINSTANCE32 hInstance, LPCSTR name)
}
return res;
}
/***********************************************************************
* LoadCursorFromFile32W (USER32.361)
*/
HCURSOR32 WINAPI LoadCursorFromFile32W (LPCWSTR name)
{ FIXME(cursor, ":stub LoadCursorFromFile32W\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* LoadCursorFromFile32A (USER32.360)
*/
HCURSOR32 WINAPI LoadCursorFromFile32A (LPCSTR name)
{ FIXME(cursor, ":stub LoadCursorFromFile32A %s\n", name);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* LoadIconW (USER32.364)
*/

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