Release 980726

Sat Jul 25 19:45:45 1998  Juergen Schmied <juergen.schmied@metronet.de>

	* [include/shlobj.h][misc/shell.c][misc/shellord.c][ole/folders.c]
	[shell32.spec]
	Added SHFILEOPSTRUCT32[A|W] and constants, prototypes.
	Implemented SHGetSpecialFolderLocation, SHGetPathFromIDList32[A].
	Many IShellFolder, pidl, shell -related changes.

	SHChangeNotifyRegister, SHChangeNotifyDeregister,
	SHShellFolderView_Message, SHMapPIDLToSystemImageListIndex,
	SHAddToRecentDocs32, SHFileOperation, SHChangeNotify, 
	SHCreateShellFolderViewEx stubs.

Sat Jul 25 17:16:25 1998  Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>

	* [files/profile.c]
	Fix return value of PROFILE_GetSection().

Fri Jul 24 22:45:19 1998  Ove Kaaven <ovek@isflak.arcticnet.no>

	* [controls/edit.c]
	Killed the modified flag on WM_SETTEXT. Eudora should no longer
	bother asking whether you want to save an unchanged message.

Fri Jul 24 21:21:35 1998  Andreas Mohr <100.30936@germany.net>

	* [controls/menu.c]
	Fixed bug in GetMenuState32.
	Doesn't fix Free Agent 32 :((

	* [documentation/debugging]
	Hints added.

	* [files/dos_fs.c] [include/msdos.h] [msdos/int21.c]
	Enhanced DOS device support.

	* [if1632/Makefile.in] [if1632/builtin.c] [if1632/rasapi16.spec]
	  [relay32/Makefile.in] [relay32/builtin32.c] [relay32/rasapi32.spec]
	Added RASAPI16/32.DLL.

	* [misc/aspi.c] [relay32/wnaspi32.spec]
	Implemented GetASPI32SupportInfo.

	* [multimedia/mmsystem.c]
	Implemented mmTaskCreate.

Fri Jul 24 20:55:31 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [controls/toolbar.c]
	Fixed some bugs and added new features.

	* [controls/tooltips.c][include/tooltips.h]
	Added more messages and started display code.

	* [misc/shell.c][misc/shellord.c][relay32/shell.spec]
	Fixed StrToOleStrN (SHELL32_79) and added OleStrToStrN (SHELL32_78).
	Added some new stubs.

	* [objects/cursoricon.c][misc/imagelist.c][include/windows.h]
	Fixed GetIconInfo and removed the GetIconInfo hack from the
	image list code.

	* [controls/pager.c][include/pager.h][controls/treeview.c]
	  [include/treeview.h]
	Added some messages.

	* [misc/tweak.c][winows/nonclient.c][documentation/win95look]
	Removed unused tweak variables.

	* [documentation/common_controls]
	Updated.

Fri Jul 24 18:36:32 1998  James Moody <013263m@dragon.acadiau.ca>

	* [objects/font.c]
	Fixed a bug in GetTextFace.

Fri Jul 24 17:09:33 1998  Marcus Meissner <marcus@jet.franken.de>

	* [misc/commdlg.c]
	Fixed stacksmashing bug due to invalid specified function
	pointers.

	* [files/dos_fs.c]
	Small change in case handling... be able to create files with
	uppercase in them (like Program Files/).

	* [graphics/ddraw.c]
	XF86DGA support made threadsafe, added more Xlib dependent stuff
	(create Window using CreateWindow(), draw into it). xlib support
	is not satisfying.

	* [scheduler/critsection.c]
	Don't recurse on HeapLock with semaphore id 0.

	* [win32/user32.c][windows/message.c][windows/event.c]
	Moved win32 *Message functions where they belong.
	Removed some potential races between XPending and XNextEvent by
	a bit more locking.

Fri Jul 24 13:58:19 1998  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [loader/pe_image.c] [loader/ne/segment.c]
	Use bogus pointer value instead of NULL for unresolved externals.

	* [memory/selector.c]
	Clear saved_fs on selector free.

	* [msdos/cdrom.c] [configure.in]
	Added check for linux/ucdrom.h.

	* [scheduler/client.c] [server/socket.c]
	Fix for missing struct cmsghdr.
	Attempt to support msg_accrights fd passing (completely untested).

	* [windows/event.c]
	Do not grab the pointer in SetCapture (Win32 behavior).

Tue Jul 21 22:28:13 1998  James Juran  <jrj120@psu.edu>

	* [Make.rules.in]
	Changed $(MKDIR) macro to use -p option (make parent directories
	if they don't already exist.  This fixes an error in 'make install'
	if /usr/local/include doesn't already exist.

Tue Jul 21 13:37:04 Rein Klazes <rklazes@casema.net>

	* [include/heap.h]
	Replaced macro SEGPTR_GET by inline function to avoid *lots*
	of wrong use of this macro.

	* [relay32/comdlg32.spec]
	Corrected GetSaveFileNameW entry.

	* [relay32/advapi32.spec] [win32/advapi.c]
	  [relay32/ole32.spec] [ ole/moniker.c]
	Added stubs for SetFileSecurity[AW] and CreateFileMoniker32

	* [graphics/x11drv/graphics.c]
	Finished implementation of bezier drawing code.

Tue Jul 21 11:00:51 1998  Claus Fischer <cfischer@td2cad.intel.com>

	* [files/drive.c]
	Remove label trailing blanks in GetVolumeInformation32A.

	* [documentation/cdrom-labels]
	Added documentation on how to find out a CD-ROM label.

Sun Jul 19 23:16:41 1998  Pascal Cuoq <pcuoq@ens-lyon.fr>

	* [include/windows.h]
	Added some DM_* and DISP_CHANGE_* flags.

	* [relay32/user32.spec] [windows/user.c]
	Added stub for ChangeDisplaySettingA.

	* [ole/ole2nls.c]
	is_punctuation: reuse information from another table.

Sun Jul 19 22:04:46 1998  Douglas Ridgway  <ridgway@winehq.com>

	* [Make.rules.in]
	Updated automatic documentation rules.

	* [graphics/path.c] [misc/aspi.c] [misc/ntdll.c] [misc/winsock_dns.c]
	[ole/ole2dsp.c] [relay32/user32.spec]
	Comment format futzing to keep c2man happy.

	* [documentation/README.documentation]
	Updated description of automatic documentation.

Wed Jul 15 19:10:09 1998   Andrew M. Bishop <amb@gedanken.demon.co.uk>

	* [files/profile.c]
	Cache the 10 most recently used .ini files.

Tue May 20 19:20:23 1997  Pablo Saratxaga <srtxg@chanae.alphanet.ch>

	* [misc/commdlg.c]
	Makes PrintDlg32A() return TRUE even if it is an empty
	stub, so most programs are happy and run anyway instead of
	aborting at startup.

	* [graphics/x11drv/xfont.c]
	Increased the maximum font families as (X11) font aliases
	eated up a lot of families causing wine to stop reading fonts.
diff --git a/documentation/README.documentation b/documentation/README.documentation
index 6a91dc6..a94d4b9 100644
--- a/documentation/README.documentation
+++ b/documentation/README.documentation
@@ -12,19 +12,23 @@
   Texinfo source for preliminary comprehensive documentation is in
 this directory.  Use 'make info' in this directory to generate the GNU
 info version, 'make dvi' to generate the DVI version (hit 'r' to
-ignore errors), or 'make all' for both. It is no longer installed by
+ignore errors), or 'make all' for both. It is not installed by
 default.
 
 Wine API documentation
 
   Do a 'make manpages' in the Wine toplevel directory to generate the
 API manpages from the Wine source, or 'make man' in any source
-subdirectory to generate manpages from only that directory. The
-manpages will be deposited in [documentation/man3w].  You will need
-c2man, available as source from http://www.debian.org/ and other
-places. Apply the patch included at the end of this file for improved
-terse description formatting.  The man pages are not installed
-automatically.
+subdirectory to generate manpages from only that directory. Only
+functions mentioned in Wine spec files will be documented; the
+specific .spec files checked are set by the MANSPECS variable in
+Make.rules. The manpages will be generated into
+[documentation/man3w]. For HTML formatted manpages, do 'make
+htmlpages' from the toplevel, or 'make html' from any
+subdirectory. HTML formatted pages are generated into
+[documentation/html]. You will need c2man as modified for Wine,
+available as source or binary from ftp://ftp.winehq.com/pub/wine/.
+The man pages are not installed by 'make install'.
 
 Other READMEs
 
@@ -43,80 +47,59 @@
 existing source. For example,
 
 /******************************************************************
- *         PlayMetaFile32 (GDI32.265) Render metafile to device
+ *         CopyMetaFile32A   (GDI32.23)
  *
- *    The metafile is rendered in the device context specified by hdc.
+ *  Copies the metafile corresponding to hSrcMetaFile to either
+ *  a disk file, if a filename is given, or to a new memory based
+ *  metafile, if lpFileName is NULL.
  *
- *  RETURNS
+ * RETURNS
  *
- *    Always returns TRUE.
+ *  Handle to metafile copy on success, NULL on failure.
  *
- * FIXME
- *    Wine metafiles are not 100% binary compatible with Microsoft Windows
- *    metafiles.
+ * BUGS
+ *
+ *  Copying to disk returns NULL even if successful.
  */
-BOOL32 WINAPI PlayMetaFile32(
-        HDC32 hdc, /* handle of device context in which to render metafile */
-        HMETAFILE32 hmf /* metafile handle */
-) {
+HMETAFILE32 WINAPI CopyMetaFile32A(
+		   HMETAFILE32 hSrcMetaFile, /* handle of metafile to copy */
+		   LPCSTR lpFilename /* filename if copying to a file */
+) { ... }
 
 becomes, after processing with c2man and nroff -man,
 
-
-PlayMetaFile32(3w)                             PlayMetaFile32(3w)
+CopyMetaFileA(3w)                               CopyMetaFileA(3w)
 
 
 NAME
-       PlayMetaFile32   -   PlayMetaFile32   (GDI32.265)   Render
-       metafile to device
+       CopyMetaFileA - CopyMetaFile32A   (GDI32.23)
 
 SYNOPSIS
-       BOOL32 PlayMetaFile32
+       HMETAFILE32 CopyMetaFileA
        (
-            HDC32 hdc,
-            HMETAFILE32 hmf
+            HMETAFILE32 hSrcMetaFile,
+            LPCSTR lpFilename
        );
 
 PARAMETERS
-       HDC32 hdc
-              Handle  of  device  context  in  which  to   render
-              metafile.
+       HMETAFILE32 hSrcMetaFile
+              Handle of metafile to copy.
 
-       HMETAFILE32 hmf
-              Metafile handle.
+       LPCSTR lpFilename
+              Filename if copying to a file.
 
 DESCRIPTION
-       The  metafile  is rendered in the device context specified
-       by hdc.
+       Copies  the  metafile  corresponding  to  hSrcMetaFile  to
+       either a disk file, if a filename is given, or  to  a  new
+       memory based metafile, if lpFileName is NULL.
 
 RETURNS
-       Always returns TRUE.
+       Handle to metafile copy on success, NULL on failure.
 
-FIXME
-       Wine  metafiles  are  not  100%  binary  compatible   with
-       Microsoft Windows metafiles.
+BUGS
+       Copying to disk returns NULL even if successful.
 
-----------------------------------------------------------------
-Patch for c2man:
-
-diff -u c2man-2.41.orig/manpage.c c2man-2.41/manpage.c
---- c2man-2.41.orig/manpage.c	Tue Apr 23 21:13:44 1996
-+++ c2man-2.41/manpage.c	Thu Dec 18 13:20:08 1997
-@@ -585,10 +585,15 @@
- 		    const char *endterse, *afterdash = skipdash(start_line);
- 
- 		    /* find the end of the terse comment */
--		    while (*c && *c != '.' && *c != '\n')
-+		    while (*c && *c != '\n')
-+		    {
- 			c++;
-+		      /* '.' ends terse description only if it ends sentence */
-+			if (*(c-1)=='.' && *c && isspace(*c)) 
-+			  break;
-+		    }
- 
--		    endterse = *c == '.' ? c+1 : c;
-+		    endterse = c;
- 		    *terse = alloc_string(
- 			afterdash < endterse ? afterdash : start_line,
- 			endterse);
+SEE ALSO
+       GetMetaFileA(3w),   GetMetaFileW(3w),   CopyMetaFileW(3w),
+       PlayMetaFile(3w),  SetMetaFileBitsEx(3w),  GetMetaFileBit-
+       sEx(3w)
diff --git a/documentation/cdrom-labels b/documentation/cdrom-labels
new file mode 100644
index 0000000..36297c5
--- /dev/null
+++ b/documentation/cdrom-labels
@@ -0,0 +1,42 @@
+If a program depends on the correct label and/or serial number for the
+CD-Rom, you can use the following command to extract that information:
+
+      dd if=<your cdrom device> bs=1 skip=32808 count=32
+
+You need read access to the device, so perhaps you have to do it as root.
+Put the resulting string (without trailing blanks) into your
+wine.ini/.winerc file like:
+Label=<the label>
+
+[FIXME: if someone knows how to get the serial number in Linux, please
+        put this information here].
+
+If you have access to a Win32 system and C-compiler, you can compile the
+following program to extract this information:
+
+------------------------- begin volinfo.c ---------------------------
+#include <windows.h>
+#include <stdio.h>
+
+int main(int argc,char **argv[])
+{
+    char  drive, root[]="C:\\", label[1002], fsname[1002];
+    DWORD serial, flags, filenamelen, labellen = 1000, fsnamelen = 1000;
+
+    printf("Drive Serial     Flags      Filename-Length "
+           "Label                 Fsname\n");
+    for (drive = 'C'; drive <= 'Z'; drive++)
+    {
+        root[0] = drive;
+        if (GetVolumeInformationA(root,label,labellen,&serial,
+                                  &filenamelen,&flags,fsname,fsnamelen))
+        {
+            strcat(label,"\""); strcat (fsname,"\"");
+            printf("%c:\\   0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n",
+                   drive, (long) serial, (long) flags, (long) filenamelen,
+                   label, fsname);
+        }
+    }
+    return 0;
+}
+------------------------- end volinfo.c -----------------------------
diff --git a/documentation/common_controls b/documentation/common_controls
index 83ccdb8..722edec 100644
--- a/documentation/common_controls
+++ b/documentation/common_controls
@@ -100,13 +100,10 @@
 3.10 List View Control
 ----------------------
   Author:
-      Dummy written by Eric Kohl.
+      James Michael Mastros <root@jennifer-unix.dyn.ml.org>
 
   Status:
-      - Dummy control. No functionality.
-
-  Notes:
-      This control is NEEDED in many places. Any volunteers??
+      - Development in progress.
 
 
 3.11 Month Calendar Control
@@ -213,10 +210,10 @@
       Eric Kohl <ekohl@abo.rhein-zeitung.de>
 
   Status:
-      - Development in progress.
+      - Development in progress. Almost done.
 
   Notes
-      The control does not show.
+      The control does not behave very well. This will be fixed
 
 
 3.20 Trackbar Control
@@ -233,9 +230,14 @@
 
 3.21 Tree View Control
 ----------------------
+  Author:
+      Dummy written by Eric Kohl.
+
   Status:
-      - Nothing done at all.
-      - needed.
+      - Dummy control. No functionality.
+
+  Notes:
+      Author needed!! Any volunteers??
 
 
 3.22 Updown Control
diff --git a/documentation/debugging b/documentation/debugging
index dcc9de0..b929c8f 100644
--- a/documentation/debugging
+++ b/documentation/debugging
@@ -257,3 +257,82 @@
 
 Written by Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>,
 additions welcome.
+-------
+
+Here are some useful debugging tips, added by Andreas Mohr:
+
+
+a) If you have a program crashing at such an early loader phase that you can't
+use the Wine debugger normally, but Wine already executes the program's
+start code, then you may use a special trick:
+You should do a
+wine -debugmsg +relay program
+to get a listing of the functions the program calls in its start function.
+Now you do a
+wine -debug winfile.exe
+This way, you get into Wine-dbg. Now you can set a breakpoint on any
+function the program calls in the start function and just type "c" to bypass
+the eventual calls of Winfile to this function until you are finally at the
+place where this function gets called by the crashing start function.
+Now you can proceed with your debugging as usual.
+
+
+b) If you try to run a program and it quits after showing an error messagebox,
+the problem can usually be identified in the return value of one of the
+functions executed before MessageBox().
+That's why you should re-run the program with e.g.
+wine -debugmsg +relay <program name> &>relmsg
+Then do a "more relmsg" and search for the last occurrence of a call to the string "MESSAGEBOX".
+This is a line like
+Call USER.1: MESSAGEBOX(0x0000,0x01ff1246 "Runtime error 219 at 0004:1056.",0x00000000,0x1010) ret=01f7:2160 ds=01ff
+
+In my example the lines before the call to MessageBox() look like that:
+
+Call KERNEL.96: FREELIBRARY(0x0347) ret=01cf:1033 ds=01ff
+CallTo16(func=033f:0072,ds=01ff,0x0000)
+Ret  KERNEL.96: FREELIBRARY() retval=0x0001 ret=01cf:1033 ds=01ff
+Call KERNEL.96: FREELIBRARY(0x036f) ret=01cf:1043 ds=01ff
+CallTo16(func=0367:0072,ds=01ff,0x0000)
+Ret  KERNEL.96: FREELIBRARY() retval=0x0001 ret=01cf:1043 ds=01ff
+Call KERNEL.96: FREELIBRARY(0x031f) ret=01cf:105c ds=01ff
+CallTo16(func=0317:0072,ds=01ff,0x0000)
+Ret  KERNEL.96: FREELIBRARY() retval=0x0001 ret=01cf:105c ds=01ff
+Call USER.171: WINHELP(0x02ac,0x01ff05b4 "COMET.HLP",0x0002,0x00000000) ret=01cf:1070 ds=01ff
+CallTo16(func=0117:0080,ds=01ff)
+Call WPROCS.24: TASK_RESCHEDULE() ret=00a7:0a2d ds=002b
+Ret  WPROCS.24: TASK_RESCHEDULE() retval=0x0000 ret=00a7:0a2d ds=002b
+Ret  USER.171: WINHELP() retval=0x0001 ret=01cf:1070 ds=01ff
+Call KERNEL.96: FREELIBRARY(0x01be) ret=01df:3e29 ds=01ff
+Ret  KERNEL.96: FREELIBRARY() retval=0x0000 ret=01df:3e29 ds=01ff
+Call KERNEL.52: FREEPROCINSTANCE(0x02cf00ba) ret=01f7:1460 ds=01ff
+Ret  KERNEL.52: FREEPROCINSTANCE() retval=0x0001 ret=01f7:1460 ds=01ff
+Call USER.1: MESSAGEBOX(0x0000,0x01ff1246 "Runtime error 219 at 0004:1056.",0x00000000,0x1010) ret=01f7:2160 ds=01ff
+
+I think that the call to MessageBox() in this example is _not_ caused by a wrong result value of some previously executed function (it's happening quite often like that), but instead the messagebox complains about a runtime error at 0x0004:0x1056.
+As the segment value of the address is only "4", I think that that is only an internal program value. But the offset address reveals something quite interesting:
+Offset 1056 is _very_ close to the return address of FREELIBRARY():
+
+Call KERNEL.96: FREELIBRARY(0x031f) ret=01cf:105c ds=01ff
+                                             ^^^^
+Provided that segment 0x0004 is indeed segment 0x1cf, we now we can use IDA (available at ftp://ftp.uni-koeln.de/pc/msdos/programming/assembler/ida35bx.zip) to
+disassemble the part that caused the error. We just have to find the address of
+the call to FreeLibrary(). Some lines before that the runtime error occurred.
+But be careful ! In some cases you don't have to disassemble the main program, but instead some DLL called by it in order to find the correct place where the runtime error occurred. That can be determined by finding the origin of the segment value (in this case 0x1cf).
+
+c) If you have created a relay file of some crashing program and want to set a
+breakpoint at a certain location which is not yet available as the
+program loads the breakpoint's segment during execution,
+you may set a breakpoint to GetVersion16/32 as those functions are called
+very often.
+Then do a "c" until you are able to set this breakpoint without error message.
+
+d) Some useful programs:
+IDA: ftp://ftp.uni-koeln.de/pc/msdos/programming/assembler/ida35bx.zip
+*Very* good DOS disassembler ! It's badly needed for debugging Wine sometimes.
+
+XRAY: ftp://ftp.th-darmstadt.de/pub/machines/ms-dos/SimTel/msdos/asmutil/xray15.zip
+Traces DOS calls (Int 21h, DPMI, ...). Use it with Windows to correct
+file management problems etc.
+
+pedump: http://oak.oakland.edu/pub/simtelnet/win95/prog/pedump.zip
+Dumps the imports and exports of a PE (Portable Executable) DLL.
diff --git a/documentation/win95look b/documentation/win95look
index c57e7ae..bd04bf9 100644
--- a/documentation/win95look
+++ b/documentation/win95look
@@ -30,9 +30,6 @@
 MenuHighlightLeftNudge=<pixels> # Nudges the left side of the highlight bar
 MenuHighlightRightNudge=<pixels> # Nudges the right side of the highlight bar
 MenuHighlightBottomNudge=<pixels> # Nudges the bottom of the highlight bar
-CaptionHeight=<pixels>        # Sets the height of window captions
-CaptionLeftNudge=<pixels>     # Nudges the caption text of windows down/up
-CaptionTopNudge=<pixels>      # Nudges the caption text of windows left/right
 CaptionAlignment=[left|right|center] # Sets the alignment of caption text
 SysControlNudge=<pixels>      # Nudges the system menu left/right
 MaxControlNudge=<pixels>      # Nudges the maximize control left/right