Release 970305

Sun Mar  2 14:57:37 1997  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [*/*]
	Completed transition to new Win32 types.

	* [tools/build.c]
	Changed CallTo16_regs to take a CONTEXT argument.

	* [memory/virtual.c]
	Rewrote Virtual* functions. Implemented CreateFileMapping and
	OpenFileMapping. Broke MapViewOfFile ;-)

	* [win32/k32obj.c]
	Implemented named objects.

Sun Mar  2 00:33:21 1997  Mikolaj Zalewski <zmikolaj@free.polbox.pl>

	* [misc/ole2nls.c] [resources/sysres_Pl.c]
	Added Polish language support.

Sat Mar  1 13:31:25 1997  David Faure <david.faure@ifhamy.insa-lyon.fr>

	* [windows/keyboard.c]
	Wrote VkKeyScan and tested with Winword. Works ok except for dead
	chars.

Fri Feb 28 09:34:03 1997  John Harvey <john@division.co.uk>

	* [graphics/win16drv/font.c] [graphics/win16drv/init.c]
	  [graphics/win16drv/obects.c]
	Added start of SelectObject call for printer driver. Write should
	now run with the printer driver enabled.

Wed Feb 26 20:03:32 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [debugger/*.c]
	Re-added a disassembly command (list serves another functionality
	now).

	* [loader/pe_resource.c]
	Added # support.

	* [misc/ole2nls.c]
	GetStringType* added.

	* [objects/color.c]
	VGA16 fixes.

	* [windows/class.c]
	Look for global widget classes too in GetClassInfo32.

	* [windows/sysmetrics.c] [include/windows.h]
	Added Win32 sysmetrics.

Sat Feb 22 23:56:29 1997  Jukka Iivonen <iivonen@cc.helsinki.fi>

	* [documentation/languages]
	The fourth case updated.

	* [if1632/ntdll.spec]
	Added some is* and to* functions.

Sat Feb 22 23:05:47 1997  Morten Welinder  <terra@diku.dk>

	* [configure.in]
	Add tests for wait4 and waitpid.

	* [loader/signal.c]
	Clean up OS-dependent code.  I hope I got it right, :-)

	* [tools/wineconf]
	Recognise vfat file systems.  Ignore floppy drives specified in
	/etc/fstab.

	* [files/*]
	Fix function names in error messages.

Sat Feb 22 06:15:13 1997  Pablo Saratxaga <srtxg@chanae.stben.be>

	* [windows/keyboard.c] [windows/message.c]
	Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9}
	characters sets.

Fri Feb 21 20:37:50 1997  Huw D M Davies <h.davies1@physics.oxford.ac.uk>

	* [controls/edit.c]
	Fix incorrect arg order in LOCAL_Alloc() call.

Fri Feb 21 18:19:17 1997  Andrew Taylor  <andrew@riscan.com>

	* [multimedia/mmsystem.c] [multimedia/mcistring.c]
	Fixed bug related to device IDs returned by multimedia
	system.  Implemented mciGetDeviceID.

Sat Feb 15 00:58:19 1997  Jimen Ching  <jching@aloha.com>

	* [debugger/dbg.y]
	Do not dereference invalid expressions.
diff --git a/windows/class.c b/windows/class.c
index d04e707..fa0d470 100644
--- a/windows/class.c
+++ b/windows/class.c
@@ -2,6 +2,10 @@
  * Window classes functions
  *
  * Copyright 1993, 1996 Alexandre Julliard
+ *
+ * FIXME: In win32 all classes are local. They are registered at 
+ *	  program start. Processes CANNOT share classes. (Source: some
+ *	  win31->NT migration book)
  */
 
 #include <stdlib.h>
@@ -156,7 +160,7 @@
  *
  * Free a class structure.
  */
-static BOOL CLASS_FreeClass( CLASS *classPtr )
+static BOOL32 CLASS_FreeClass( CLASS *classPtr )
 {
     CLASS **ppClass;
 
@@ -556,9 +560,18 @@
 
 
 /***********************************************************************
- *           GetClassWord    (USER.129) (USER32.218)
+ *           GetClassWord16    (USER.129)
  */
-WORD GetClassWord( HWND32 hwnd, INT32 offset )
+WORD GetClassWord16( HWND16 hwnd, INT16 offset )
+{
+    return GetClassWord32( hwnd, offset );
+}
+
+
+/***********************************************************************
+ *           GetClassWord32    (USER32.218)
+ */
+WORD GetClassWord32( HWND32 hwnd, INT32 offset )
 {
     WND * wndPtr;
     
@@ -635,7 +648,7 @@
         case GCL_HCURSOR:
         case GCL_HICON:
         case GCL_HICONSM:
-            return GetClassWord( hwnd, offset );
+            return GetClassWord32( hwnd, offset );
     }
     fprintf(stderr, "Warning: invalid offset %d for GetClassLong()\n", offset);
     return 0;
@@ -664,9 +677,18 @@
 
 
 /***********************************************************************
- *           SetClassWord    (USER.130) (USER32.468)
+ *           SetClassWord16    (USER.130)
  */
-WORD SetClassWord( HWND32 hwnd, INT32 offset, WORD newval )
+WORD SetClassWord16( HWND16 hwnd, INT16 offset, WORD newval )
+{
+    return SetClassWord32( hwnd, offset, newval );
+}
+
+
+/***********************************************************************
+ *           SetClassWord32    (USER32.468)
+ */
+WORD SetClassWord32( HWND32 hwnd, INT32 offset, WORD newval )
 {
     WND * wndPtr;
     WORD retval = 0;
@@ -767,7 +789,7 @@
         case GCL_HCURSOR:
         case GCL_HICON:
         case GCL_HICONSM:
-            return SetClassWord( hwnd, offset, (WORD)newval );
+            return SetClassWord32( hwnd, offset, (WORD)newval );
         case GCL_STYLE:      ptr = &wndPtr->class->style; break;
         case GCL_CBWNDEXTRA: ptr = &wndPtr->class->cbWndExtra; break;
         case GCL_CBCLSEXTRA: ptr = &wndPtr->class->cbClsExtra; break;
@@ -881,7 +903,9 @@
     hInstance = GetExePtr( hInstance );  /* FIXME: not needed in Win32 */
     if (!(atom = GlobalFindAtom32A( name )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) ||
-        (hInstance != classPtr->hInstance)) return FALSE;
+	(classPtr->hInstance && (hInstance != classPtr->hInstance)))
+        return FALSE;
+
     wc->style         = classPtr->style;
     wc->lpfnWndProc   = (WNDPROC32)WINPROC_GetProc( classPtr->winproc,
                                                     WIN_PROC_32A );
@@ -908,7 +932,9 @@
     hInstance = GetExePtr( hInstance );  /* FIXME: not needed in Win32 */
     if (!(atom = GlobalFindAtom32W( name )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) ||
-        (hInstance != classPtr->hInstance)) return FALSE;
+	(classPtr->hInstance && (hInstance != classPtr->hInstance)))
+        return FALSE;
+
     wc->style         = classPtr->style;
     wc->lpfnWndProc   = (WNDPROC32)WINPROC_GetProc( classPtr->winproc,
                                                     WIN_PROC_32W );