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/win.c b/windows/win.c
index da44073..d273b2b 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -277,7 +277,7 @@
 {
     LPPOINT16 lppt = (LPPOINT16)&lValue;
     WND     *wndPtr = WIN_FindWndPtr( hwnd );
-    BOOL     bMouse = ((event <= WM_MOUSELAST) && (event >= WM_MOUSEFIRST));
+    BOOL32 bMouse = ((event <= WM_MOUSELAST) && (event >= WM_MOUSEFIRST));
 
     /* if lValue contains cursor coordinates they have to be
      * mapped to the client area of parent window */
@@ -483,7 +483,7 @@
     if (cs->hwndParent)
     {
 	/* Make sure parent is valid */
-        if (!IsWindow( cs->hwndParent ))
+        if (!IsWindow32( cs->hwndParent ))
         {
             fprintf( stderr, "CreateWindowEx: bad parent %04x\n", cs->hwndParent );
 	    return 0;
@@ -715,7 +715,7 @@
         }
         if (cs->hMenu) SetMenu32( hwnd, cs->hMenu );
     }
-    else wndPtr->wIDmenu = (UINT)cs->hMenu;
+    else wndPtr->wIDmenu = (UINT32)cs->hMenu;
 
     /* Send the WM_CREATE message 
      * Perhaps we shouldn't allow width/height changes as well. 
@@ -746,7 +746,7 @@
             }
 
             WIN_SendParentNotify( hwnd, WM_CREATE, wndPtr->wIDmenu, (LPARAM)hwnd );
-            if (!IsWindow(hwnd)) return 0;
+            if (!IsWindow32(hwnd)) return 0;
 
             /* Show the window, maximizing or minimizing if needed */
 
@@ -948,12 +948,12 @@
 
   WIN_CheckFocus(pWnd);
 
-  if( CARET_GetHwnd() == pWnd->hwndSelf ) DestroyCaret();
+  if( CARET_GetHwnd() == pWnd->hwndSelf ) DestroyCaret32();
   if( !pWnd->window ) CLIPBOARD_DisOwn( pWnd ); 
   
   SendMessage32A( pWnd->hwndSelf, WM_DESTROY, 0, 0);
 
-  if( !IsWindow(pWnd->hwndSelf) )
+  if( !IsWindow32(pWnd->hwndSelf) )
   {
     dprintf_win(stddeb,"\tdestroyed itself while in WM_DESTROY!\n");
     return;
@@ -1003,7 +1003,7 @@
 
     if( !QUEUE_IsDoomedQueue(wndPtr->hmemTaskQ) )
 	 WIN_SendParentNotify( hwnd, WM_DESTROY, wndPtr->wIDmenu, (LPARAM)hwnd );
-    if( !IsWindow(hwnd) ) return TRUE;
+    if (!IsWindow32(hwnd)) return TRUE;
 
     if( wndPtr->window ) CLIPBOARD_DisOwn( wndPtr ); /* before window is unmapped */
 
@@ -1014,7 +1014,7 @@
         SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW |
 		        SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|
 		        ((QUEUE_IsDoomedQueue(wndPtr->hmemTaskQ))?SWP_DEFERERASE:0) );
-	if( !IsWindow(hwnd) ) return TRUE;
+	if (!IsWindow32(hwnd)) return TRUE;
     }
 
       /* Recursively destroy owned windows */
@@ -1048,7 +1048,7 @@
       /* Send destroy messages */
 
     WIN_SendDestroyMsg( wndPtr );
-    if( !IsWindow(hwnd) ) return TRUE;
+    if (!IsWindow32(hwnd)) return TRUE;
 
       /* Unlink now so we won't bother with the children later on */
 
@@ -1357,9 +1357,18 @@
 
 
 /**********************************************************************
- *	     GetWindowWord    (USER.133) (USER32.313)
+ *	     GetWindowWord16    (USER.133)
  */
-WORD GetWindowWord( HWND32 hwnd, INT32 offset )
+WORD GetWindowWord16( HWND16 hwnd, INT16 offset )
+{
+    return GetWindowWord32( hwnd, offset );
+}
+
+
+/**********************************************************************
+ *	     GetWindowWord32    (USER32.313)
+ */
+WORD GetWindowWord32( HWND32 hwnd, INT32 offset )
 {
     WND * wndPtr = WIN_FindWndPtr( hwnd );
     if (!wndPtr) return 0;
@@ -1396,9 +1405,18 @@
 
 
 /**********************************************************************
- *	     SetWindowWord    (USER.134) (USER32.523)
+ *	     SetWindowWord16    (USER.134)
  */
-WORD SetWindowWord( HWND32 hwnd, INT32 offset, WORD newval )
+WORD SetWindowWord16( HWND16 hwnd, INT16 offset, WORD newval )
+{
+    return SetWindowWord32( hwnd, offset, newval );
+}
+
+
+/**********************************************************************
+ *	     SetWindowWord32    (USER32.523)
+ */
+WORD SetWindowWord32( HWND32 hwnd, INT32 offset, WORD newval )
 {
     WORD *ptr, retval;
     WND * wndPtr = WIN_FindWndPtr( hwnd );
@@ -1499,7 +1517,7 @@
     {
         case GWL_ID:
         case GWL_HINSTANCE:
-            return SetWindowWord( hwnd, offset, (WORD)newval );
+            return SetWindowWord32( hwnd, offset, (WORD)newval );
 	case GWL_WNDPROC:
             retval = (LONG)WINPROC_GetProc( wndPtr->winproc, type );
             WINPROC_SetProc( &wndPtr->winproc, (WNDPROC16)newval, type );
@@ -1660,10 +1678,20 @@
     return SendMessage32W( hwnd, WM_GETTEXTLENGTH, 0, 0 );
 }
 
+
 /*******************************************************************
- *         IsWindow   (USER.47) (USER32.347)
+ *         IsWindow16   (USER.47)
  */
-BOOL16 IsWindow( HWND32 hwnd )
+BOOL16 IsWindow16( HWND16 hwnd )
+{
+    return IsWindow32( hwnd );
+}
+
+
+/*******************************************************************
+ *         IsWindow32   (USER32.347)
+ */
+BOOL32 IsWindow32( HWND32 hwnd )
 {
     WND * wndPtr = WIN_FindWndPtr( hwnd );
     return ((wndPtr != NULL) && (wndPtr->dwMagic == WND_MAGIC));
@@ -1730,7 +1758,7 @@
     if (hwndNewParent) wndPtr->parent = pWndParent;
     WIN_LinkWindow(hwndChild, HWND_BOTTOM);
     
-    if (IsWindowVisible32(hwndChild)) UpdateWindow(hwndChild);
+    if (IsWindowVisible32(hwndChild)) UpdateWindow32(hwndChild);
     
     return oldParent;
 }
@@ -1981,7 +2009,7 @@
     for (ppWnd = list; *ppWnd; ppWnd++)
     {
         /* Make sure that the window still exists */
-        if (!IsWindow((*ppWnd)->hwndSelf)) continue;
+        if (!IsWindow32((*ppWnd)->hwndSelf)) continue;
         if (!lpEnumFunc( (*ppWnd)->hwndSelf, lParam )) break;
     }
     HeapFree( SystemHeap, 0, list );
@@ -2016,7 +2044,7 @@
     for (ppWnd = list; *ppWnd; ppWnd++)
     {
         /* Make sure that the window still exists */
-        if (!IsWindow((*ppWnd)->hwndSelf)) continue;
+        if (!IsWindow32((*ppWnd)->hwndSelf)) continue;
         if ((*ppWnd)->hmemTaskQ != hQueue) continue;  /* Check the queue */
         if (!func( (*ppWnd)->hwndSelf, lParam )) break;
     }
@@ -2050,7 +2078,7 @@
     while (*ppWnd)
     {
         /* Make sure that the window still exists */
-        if (!IsWindow((*ppWnd)->hwndSelf)) continue;
+        if (!IsWindow32((*ppWnd)->hwndSelf)) continue;
         /* Build children list first */
         if (!(childList = WIN_BuildWinArray( *ppWnd ))) return FALSE;
         if (!func( (*ppWnd)->hwndSelf, lParam )) return FALSE;
@@ -2306,11 +2334,10 @@
 }
 
 /******************************************************************************
- *                              DragObject ( USER.464 )
- *
+ *             DragObject16   (USER.464)
  */
-DWORD DragObject(HWND16 hwndScope, HWND16 hWnd, WORD wObj, HANDLE16 hOfStruct,
-                WORD szList , HCURSOR16 hCursor)
+DWORD DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
+                    HANDLE16 hOfStruct, WORD szList, HCURSOR16 hCursor )
 {
  MSG16	 	msg;
  LPDRAGINFO	lpDragInfo;