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/objects/bitmap.c b/objects/bitmap.c
index 1d81b16..77147f7 100644
--- a/objects/bitmap.c
+++ b/objects/bitmap.c
@@ -52,13 +52,23 @@
 
 
 /***********************************************************************
- *           CreateBitmap    (GDI.48) (GDI32.25)
+ *           CreateBitmap16    (GDI.48)
  */
-HBITMAP16 CreateBitmap( INT32 width, INT32 height, UINT32 planes,
-                        UINT32 bpp, LPCVOID bits )
+HBITMAP16 CreateBitmap16( INT16 width, INT16 height, UINT16 planes,
+                          UINT16 bpp, LPCVOID bits )
+{
+    return CreateBitmap32( width, height, planes, bpp, bits );
+}
+
+
+/***********************************************************************
+ *           CreateBitmap32    (GDI32.25)
+ */
+HBITMAP32 CreateBitmap32( INT32 width, INT32 height, UINT32 planes,
+                          UINT32 bpp, LPCVOID bits )
 {
     BITMAPOBJ * bmpObjPtr;
-    HBITMAP16 hbitmap;
+    HBITMAP32 hbitmap;
 
     planes = (BYTE)planes;
     bpp    = (BYTE)bpp;
@@ -95,28 +105,33 @@
 	hbitmap = 0;
     }
     else if (bits)  /* Set bitmap bits */
-	SetBitmapBits( hbitmap, height * bmpObjPtr->bitmap.bmWidthBytes, bits);
+	SetBitmapBits32( hbitmap, height * bmpObjPtr->bitmap.bmWidthBytes,
+                         bits );
     return hbitmap;
 }
 
 
 /***********************************************************************
- *           CreateCompatibleBitmap    (GDI.51) (GDI32.30)
+ *           CreateCompatibleBitmap16    (GDI.51)
  */
-HBITMAP16 CreateCompatibleBitmap( HDC32 hdc, INT32 width, INT32 height )
+HBITMAP16 CreateCompatibleBitmap16( HDC16 hdc, INT16 width, INT16 height )
 {
-    HBITMAP16 hbmpRet = 0;
+    return CreateCompatibleBitmap32( hdc, width, height );
+}
+
+
+/***********************************************************************
+ *           CreateCompatibleBitmap32    (GDI32.30)
+ */
+HBITMAP32 CreateCompatibleBitmap32( HDC32 hdc, INT32 width, INT32 height )
+{
+    HBITMAP32 hbmpRet = 0;
     DC *dc;
 
     dprintf_gdi( stddeb, "CreateCompatibleBitmap(%04x,%d,%d) = \n", 
                  hdc, width, height );
-    dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
-    if (!dc) 
-    {
-	dc = (DC *)GDI_GetObjPtr(hdc, METAFILE_DC_MAGIC);
-	if (!dc) return 0;
-    }
-    hbmpRet = CreateBitmap( width, height, 1, dc->w.bitsPerPixel, NULL );
+    if (!(dc = DC_GetDCPtr( hdc ))) return 0;
+    hbmpRet = CreateBitmap32( width, height, 1, dc->w.bitsPerPixel, NULL );
     dprintf_gdi(stddeb,"\t\t%04x\n", hbmpRet);
     return hbmpRet;
 }
@@ -127,8 +142,8 @@
  */
 HBITMAP16 CreateBitmapIndirect16( const BITMAP16 * bmp )
 {
-    return CreateBitmap( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
-                         bmp->bmBitsPixel, PTR_SEG_TO_LIN( bmp->bmBits ) );
+    return CreateBitmap16( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
+                           bmp->bmBitsPixel, PTR_SEG_TO_LIN( bmp->bmBits ) );
 }
 
 
@@ -137,15 +152,24 @@
  */
 HBITMAP32 CreateBitmapIndirect32( const BITMAP32 * bmp )
 {
-    return CreateBitmap( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
-                         bmp->bmBitsPixel, bmp->bmBits );
+    return CreateBitmap32( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
+                           bmp->bmBitsPixel, bmp->bmBits );
 }
 
 
 /***********************************************************************
- *           GetBitmapBits    (GDI.74) (GDI32.143)
+ *           GetBitmapBits16    (GDI.74)
  */
-LONG GetBitmapBits( HBITMAP32 hbitmap, LONG count, LPVOID buffer )
+LONG GetBitmapBits16( HBITMAP16 hbitmap, LONG count, LPVOID buffer )
+{
+    return GetBitmapBits32( hbitmap, count, buffer );
+}
+
+
+/***********************************************************************
+ *           GetBitmapBits32    (GDI32.143)
+ */
+LONG GetBitmapBits32( HBITMAP32 hbitmap, LONG count, LPVOID buffer )
 {
     BITMAPOBJ * bmp;
     LONG height;
@@ -178,9 +202,18 @@
 
 
 /***********************************************************************
- *           SetBitmapBits    (GDI.106) (GDI32.303)
+ *           SetBitmapBits16    (GDI.106)
  */
-LONG SetBitmapBits( HBITMAP32 hbitmap, LONG count, LPCVOID buffer )
+LONG SetBitmapBits16( HBITMAP16 hbitmap, LONG count, LPCVOID buffer )
+{
+    return SetBitmapBits32( hbitmap, count, buffer );
+}
+
+
+/***********************************************************************
+ *           SetBitmapBits32    (GDI32.303)
+ */
+LONG SetBitmapBits32( HBITMAP32 hbitmap, LONG count, LPCVOID buffer )
 {
     BITMAPOBJ * bmp;
     LONG height;
@@ -416,14 +449,20 @@
 
 
 /***********************************************************************
- *           CreateDiscardableBitmap    (GDI.156) (GDI32.38)
+ *           CreateDiscardableBitmap16    (GDI.156)
  */
-HBITMAP16 CreateDiscardableBitmap( HDC32 hdc, INT32 width, INT32 height )
+HBITMAP16 CreateDiscardableBitmap16( HDC16 hdc, INT16 width, INT16 height )
 {
-    dprintf_bitmap(stddeb,"CreateDiscardableBitmap(%04x, %d, %d); "
-	   "// call CreateCompatibleBitmap() for now!\n",
-	   hdc, width, height);
-    return CreateCompatibleBitmap(hdc, width, height);
+    return CreateCompatibleBitmap16( hdc, width, height );
+}
+
+
+/***********************************************************************
+ *           CreateDiscardableBitmap32    (GDI32.38)
+ */
+HBITMAP32 CreateDiscardableBitmap32( HDC32 hdc, INT32 width, INT32 height )
+{
+    return CreateCompatibleBitmap32( hdc, width, height );
 }
 
 
diff --git a/objects/brush.c b/objects/brush.c
index eb8bca2..4a06005 100644
--- a/objects/brush.c
+++ b/objects/brush.c
@@ -4,7 +4,6 @@
  * Copyright 1993, 1994  Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include "brush.h"
 #include "bitmap.h"
diff --git a/objects/clipping.c b/objects/clipping.c
index 7ca30a9..e801cb0 100644
--- a/objects/clipping.c
+++ b/objects/clipping.c
@@ -4,7 +4,6 @@
  * Copyright 1993 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdio.h>
 #include "dc.h"
 #include "metafile.h"
diff --git a/objects/color.c b/objects/color.c
index 5d1abd9..5b8c761 100644
--- a/objects/color.c
+++ b/objects/color.c
@@ -262,7 +262,7 @@
  *
  * Allocate colorcells and initialize mapping tables.
  */
-static BOOL COLOR_BuildPrivateMap(CSPACE* cs)
+static BOOL32 COLOR_BuildPrivateMap(CSPACE* cs)
 {
     /* Private colormap - identity mapping */
 
@@ -313,7 +313,7 @@
     return FALSE;
 }
 
-static BOOL COLOR_BuildSharedMap(CSPACE* cs)
+static BOOL32 COLOR_BuildSharedMap(CSPACE* cs)
 {
    XColor		color;
    unsigned long        sysPixel[NB_RESERVED_COLORS];
@@ -738,7 +738,11 @@
 
  for( i = 0; i < size && diff ; i++ )
     {
-      if( i == NB_RESERVED_COLORS/2 ) i = size - NB_RESERVED_COLORS/2;
+      if( i == NB_RESERVED_COLORS/2 )
+      {
+      	int newi = size - NB_RESERVED_COLORS/2;
+	if (newi>i) i=newi;
+      }
 
       r = COLOR_sysPal[i].peRed - GetRValue(col);
       g = COLOR_sysPal[i].peGreen - GetGValue(col);
diff --git a/objects/cursoricon.c b/objects/cursoricon.c
index 62b4823..bdb9f0d 100644
--- a/objects/cursoricon.c
+++ b/objects/cursoricon.c
@@ -22,7 +22,6 @@
  * the bits directly :-(
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <string.h>
 #include <stdlib.h>
 #include "windows.h"
@@ -367,8 +366,8 @@
 
     /* Transfer the bitmap bits to the CURSORICONINFO structure */
 
-    GetBitmapBits( hAndBits, sizeAnd, (char *)(info + 1) );
-    GetBitmapBits( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd );
+    GetBitmapBits32( hAndBits, sizeAnd, (char *)(info + 1) );
+    GetBitmapBits32( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd );
     DeleteObject32( hXorBits );
     DeleteObject32( hAndBits );
     GlobalUnlock16( handle );
@@ -739,12 +738,13 @@
 
     if (!(ptr = (CURSORICONINFO *)GlobalLock16( hIcon ))) return FALSE;
     if (!(hMemDC = CreateCompatibleDC32( hdc ))) return FALSE;
-    hAndBits = CreateBitmap( ptr->nWidth, ptr->nHeight, 1, 1, (char *)(ptr+1));
-    hXorBits = CreateBitmap( ptr->nWidth, ptr->nHeight, ptr->bPlanes,
-                             ptr->bBitsPerPixel, (char *)(ptr + 1)
+    hAndBits = CreateBitmap32( ptr->nWidth, ptr->nHeight, 1, 1,
+                               (char *)(ptr+1) );
+    hXorBits = CreateBitmap32( ptr->nWidth, ptr->nHeight, ptr->bPlanes,
+                               ptr->bBitsPerPixel, (char *)(ptr + 1)
                          + ptr->nHeight * BITMAP_WIDTH_BYTES(ptr->nWidth,1) );
-    oldFg = SetTextColor( hdc, RGB(0,0,0) );
-    oldBg = SetBkColor( hdc, RGB(255,255,255) );
+    oldFg = SetTextColor32( hdc, RGB(0,0,0) );
+    oldBg = SetBkColor32( hdc, RGB(255,255,255) );
 
     if (hXorBits && hAndBits)
     {
@@ -758,8 +758,8 @@
     if (hXorBits) DeleteObject32( hXorBits );
     if (hAndBits) DeleteObject32( hAndBits );
     GlobalUnlock16( hIcon );
-    SetTextColor( hdc, oldFg );
-    SetBkColor( hdc, oldBg );
+    SetTextColor32( hdc, oldFg );
+    SetBkColor32( hdc, oldBg );
     return TRUE;
 }
 
diff --git a/objects/dc.c b/objects/dc.c
index 889518f..6d31cd8 100644
--- a/objects/dc.c
+++ b/objects/dc.c
@@ -5,11 +5,9 @@
  *
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include <string.h>
 #include "gdi.h"
-#include "bitmap.h"
 #include "heap.h"
 #include "metafile.h"
 #include "stddebug.h"
@@ -185,8 +183,8 @@
 void DC_InitDC( DC* dc )
 {
     RealizeDefaultPalette( dc->hSelf );
-    SetTextColor( dc->hSelf, dc->w.textColor );
-    SetBkColor( dc->hSelf, dc->w.backgroundColor );
+    SetTextColor32( dc->hSelf, dc->w.textColor );
+    SetBkColor32( dc->hSelf, dc->w.backgroundColor );
     SelectObject32( dc->hSelf, dc->w.hPen );
     SelectObject32( dc->hSelf, dc->w.hBrush );
     SelectObject32( dc->hSelf, dc->w.hFont );
@@ -690,7 +688,7 @@
                hdc, dc->hSelf );
 
       /* Create default bitmap */
-    if (!(hbitmap = CreateBitmap( 1, 1, 1, 1, NULL )))
+    if (!(hbitmap = CreateBitmap32( 1, 1, 1, 1, NULL )))
     {
 	GDI_HEAP_FREE( dc->hSelf );
 	return 0;
@@ -816,9 +814,18 @@
 
 
 /***********************************************************************
- *           SetBkColor    (GDI.1) (GDI32.305)
+ *           SetBkColor16    (GDI.1)
  */
-COLORREF SetBkColor( HDC32 hdc, COLORREF color )
+COLORREF SetBkColor16( HDC16 hdc, COLORREF color )
+{
+    return SetBkColor32( hdc, color );
+}
+
+
+/***********************************************************************
+ *           SetBkColor32    (GDI32.305)
+ */
+COLORREF SetBkColor32( HDC32 hdc, COLORREF color )
 {
     COLORREF oldColor;
     DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@@ -838,9 +845,18 @@
 
 
 /***********************************************************************
- *           SetTextColor    (GDI.9) (GDI32.338)
+ *           SetTextColor16    (GDI.9)
  */
-COLORREF SetTextColor( HDC32 hdc, COLORREF color )
+COLORREF SetTextColor16( HDC16 hdc, COLORREF color )
+{
+    return SetTextColor32( hdc, color );
+}
+
+
+/***********************************************************************
+ *           SetTextColor32    (GDI32.338)
+ */
+COLORREF SetTextColor32( HDC32 hdc, COLORREF color )
 {
     COLORREF oldColor;
     DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
diff --git a/objects/dcvalues.c b/objects/dcvalues.c
index b90b484..9ea8221 100644
--- a/objects/dcvalues.c
+++ b/objects/dcvalues.c
@@ -5,7 +5,6 @@
  *
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include "gdi.h"
 #include "metafile.h"
 
diff --git a/objects/dib.c b/objects/dib.c
index d49b091..29aba34 100644
--- a/objects/dib.c
+++ b/objects/dib.c
@@ -4,7 +4,6 @@
  * Copyright 1993,1994  Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdio.h>
 #include <stdlib.h>
 #include <X11/Xlib.h>
@@ -907,8 +906,8 @@
 
     /* Now create the bitmap */
 
-    handle = fColor ? CreateCompatibleBitmap( hdc, width, height ) :
-                      CreateBitmap( width, height, 1, 1, NULL );
+    handle = fColor ? CreateCompatibleBitmap32( hdc, width, height ) :
+                      CreateBitmap32( width, height, 1, 1, NULL );
     if (!handle) return 0;
 
     if (init == CBM_INIT)
diff --git a/objects/font.c b/objects/font.c
index edf0266..7912362 100644
--- a/objects/font.c
+++ b/objects/font.c
@@ -202,30 +202,81 @@
     metrics->tmAveCharWidth = average;
 }
 
+
 /***********************************************************************
- *           GetGlyphOutLine    (GDI.309)
+ *           GetGlyphOutline16    (GDI.309)
  */
-DWORD GetGlyphOutLine( HDC16 hdc, UINT uChar, UINT fuFormat,
-                       LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPSTR lpBuffer,
-                       LPMAT2 lpmat2) 
+DWORD GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat,
+                         LPGLYPHMETRICS16 lpgm, DWORD cbBuffer,
+                         LPVOID lpBuffer, const MAT2 *lpmat2 )
 {
-    fprintf( stdnimp,"GetGlyphOutLine(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n",
+    fprintf( stdnimp,"GetGlyphOutLine16(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n",
              hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
     return (DWORD)-1; /* failure */
 }
 
 
 /***********************************************************************
- *           CreateScalableFontResource    (GDI.310)
+ *           GetGlyphOutline32A    (GDI32.186)
  */
-BOOL CreateScalableFontResource( UINT fHidden,LPSTR lpszResourceFile,
-                                 LPSTR lpszFontFile, LPSTR lpszCurrentPath )
+DWORD GetGlyphOutline32A( HDC32 hdc, UINT32 uChar, UINT32 fuFormat,
+                         LPGLYPHMETRICS32 lpgm, DWORD cbBuffer,
+                         LPVOID lpBuffer, const MAT2 *lpmat2 )
+{
+    fprintf( stdnimp,"GetGlyphOutLine32A(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n",
+             hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
+    return (DWORD)-1; /* failure */
+}
+
+
+/***********************************************************************
+ *           GetGlyphOutline32W    (GDI32.187)
+ */
+DWORD GetGlyphOutline32W( HDC32 hdc, UINT32 uChar, UINT32 fuFormat,
+                         LPGLYPHMETRICS32 lpgm, DWORD cbBuffer,
+                         LPVOID lpBuffer, const MAT2 *lpmat2 )
+{
+    fprintf( stdnimp,"GetGlyphOutLine32W(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n",
+             hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
+    return (DWORD)-1; /* failure */
+}
+
+
+/***********************************************************************
+ *           CreateScalableFontResource16   (GDI.310)
+ */
+BOOL16 CreateScalableFontResource16( UINT16 fHidden, LPCSTR lpszResourceFile,
+                                     LPCSTR fontFile, LPCSTR path )
+{
+    return CreateScalableFontResource32A( fHidden, lpszResourceFile,
+                                          fontFile, path );
+}
+
+/***********************************************************************
+ *           CreateScalableFontResource32A   (GDI32.62)
+ */
+BOOL32 CreateScalableFontResource32A( DWORD fHidden, LPCSTR lpszResourceFile,
+                                      LPCSTR lpszFontFile,
+                                      LPCSTR lpszCurrentPath )
 {
     /* fHidden=1 - only visible for the calling app, read-only, not
      * enumbered with EnumFonts/EnumFontFamilies
      * lpszCurrentPath can be NULL
      */
-    fprintf(stdnimp,"CreateScalableFontResource(%d,%s,%s,%s) // empty stub!\n",
+    fprintf(stdnimp,"CreateScalableFontResource(%ld,%s,%s,%s) // empty stub\n",
+            fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath );
+    return FALSE; /* create failed */
+}
+
+
+/***********************************************************************
+ *           CreateScalableFontResource32W   (GDI32.63)
+ */
+BOOL32 CreateScalableFontResource32W( DWORD fHidden, LPCWSTR lpszResourceFile,
+                                      LPCWSTR lpszFontFile,
+                                      LPCWSTR lpszCurrentPath )
+{
+    fprintf(stdnimp,"CreateScalableFontResource32W(%ld,%p,%p,%p) // empty stub\n",
             fHidden, lpszResourceFile, lpszFontFile, lpszCurrentPath );
     return FALSE; /* create failed */
 }
@@ -890,9 +941,18 @@
 
 
 /***********************************************************************
- *           AddFontResource    (GDI.119)
+ *           AddFontResource16    (GDI.119)
  */
-INT AddFontResource( LPCSTR str )
+INT16 AddFontResource16( LPCSTR str )
+{
+    return AddFontResource32A( str );
+}
+
+
+/***********************************************************************
+ *           AddFontResource32A    (GDI32.2)
+ */
+INT32 AddFontResource32A( LPCSTR str )
 {
     if (HIWORD(str))
         fprintf( stdnimp, "STUB: AddFontResource('%s')\n", str );
@@ -903,9 +963,28 @@
 
 
 /***********************************************************************
- *           RemoveFontResource    (GDI.136)
+ *           AddFontResource32W    (GDI32.4)
  */
-BOOL RemoveFontResource( LPSTR str )
+INT32 AddFontResource32W( LPCWSTR str )
+{
+    fprintf( stdnimp, "STUB: AddFontResource32W(%p)\n", str );
+    return 1;
+}
+
+
+/***********************************************************************
+ *           RemoveFontResource16    (GDI.136)
+ */
+BOOL16 RemoveFontResource16( LPCSTR str )
+{
+    return RemoveFontResource32A( str );
+}
+
+
+/***********************************************************************
+ *           RemoveFontResource32A    (GDI32.284)
+ */
+BOOL32 RemoveFontResource32A( LPCSTR str )
 {
     if (HIWORD(str))
         fprintf( stdnimp, "STUB: RemoveFontResource('%s')\n", str );
@@ -914,6 +993,17 @@
     return TRUE;
 }
 
+
+/***********************************************************************
+ *           RemoveFontResource32W    (GDI32.286)
+ */
+BOOL32 RemoveFontResource32W( LPCWSTR str )
+{
+    fprintf( stdnimp, "STUB: RemoveFontResource32W(%p)\n", str );
+    return TRUE;
+}
+
+
 /*************************************************************************
  *				FONT_ParseFontParms		[internal]
  */
@@ -1350,10 +1440,18 @@
 
 
 /*************************************************************************
- *				GetRasterizerCaps	[GDI.313]
+ *             GetRasterizerCaps16   (GDI.313)
  */
+BOOL16 GetRasterizerCaps16( LPRASTERIZER_STATUS lprs, UINT16 cbNumBytes )
+{
+    return GetRasterizerCaps32( lprs, cbNumBytes );
+}
 
-BOOL GetRasterizerCaps(LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
+
+/*************************************************************************
+ *             GetRasterizerCaps32   (GDI32.216)
+ */
+BOOL32 GetRasterizerCaps32( LPRASTERIZER_STATUS lprs, UINT32 cbNumBytes )
 {
   /* This is not much more than a dummy */
   RASTERIZER_STATUS rs;
@@ -1361,22 +1459,49 @@
   rs.nSize = sizeof(rs);
   rs.wFlags = 0;
   rs.nLanguageID = 0;
-  return True;
+  return TRUE;
 }
 
+
 /*************************************************************************
- *             GetKerningPairs      [GDI.332]
+ *             GetKerningPairs16   (GDI.332)
  */
-int GetKerningPairs(HDC16 hDC,int cPairs,LPKERNINGPAIR16 lpKerningPairs)
+INT16 GetKerningPairs16( HDC16 hDC, INT16 cPairs,
+                         LPKERNINGPAIR16 lpKerningPairs )
 {
     /* This has to be dealt with when proper font handling is in place 
      *
      * At this time kerning is ignored (set to 0)
      */
-
     int i;
-    fprintf(stdnimp,"GetKerningPairs: almost empty stub!\n");
+    fprintf(stdnimp,"GetKerningPairs16: almost empty stub!\n");
     for (i = 0; i < cPairs; i++) lpKerningPairs[i].iKernAmount = 0;
     return 0;
 }
 
+
+/*************************************************************************
+ *             GetKerningPairs32A   (GDI32.192)
+ */
+DWORD GetKerningPairs32A( HDC32 hDC, DWORD cPairs,
+                          LPKERNINGPAIR32 lpKerningPairs )
+{
+    /* This has to be dealt with when proper font handling is in place 
+     *
+     * At this time kerning is ignored (set to 0)
+     */
+    int i;
+    fprintf(stdnimp,"GetKerningPairs32: almost empty stub!\n");
+    for (i = 0; i < cPairs; i++) lpKerningPairs[i].iKernAmount = 0;
+    return 0;
+}
+
+
+/*************************************************************************
+ *             GetKerningPairs32W   (GDI32.193)
+ */
+DWORD GetKerningPairs32W( HDC32 hDC, DWORD cPairs,
+                          LPKERNINGPAIR32 lpKerningPairs )
+{
+    return GetKerningPairs32A( hDC, cPairs, lpKerningPairs );
+}
diff --git a/objects/gdiobj.c b/objects/gdiobj.c
index d8eccaa..4422ed8 100644
--- a/objects/gdiobj.c
+++ b/objects/gdiobj.c
@@ -4,7 +4,6 @@
  * Copyright 1993 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include <stdio.h>
 #include "color.h"
diff --git a/objects/linedda.c b/objects/linedda.c
index be9693f..d0cf871 100644
--- a/objects/linedda.c
+++ b/objects/linedda.c
@@ -4,7 +4,6 @@
  * Copyright 1993 Bob Amstadt
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include "windows.h"
 
diff --git a/objects/metafile.c b/objects/metafile.c
index d5dcf12..64701e9 100644
--- a/objects/metafile.c
+++ b/objects/metafile.c
@@ -217,7 +217,7 @@
 
 BOOL16 IsValidMetaFile(HMETAFILE16 hmf)
 {
-    BOOL resu=FALSE;
+    BOOL16 resu=FALSE;
     METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
     if (mh) {
       if (mh->mtType == 1 || mh->mtType == 0) 
@@ -276,7 +276,7 @@
 	dprintf_metafile(stddeb,"offset = %04x size = %08lx function = %04x\n",
 			 offset,mr->rdSize,mr->rdFunction);
 	offset += mr->rdSize * 2;
-	PlayMetaFileRecord(hdc, ht, mr, mh->mtNoObjects);
+	PlayMetaFileRecord16( hdc, ht, mr, mh->mtNoObjects );
     }
 
     SelectObject32(hdc, hBrush);
@@ -296,11 +296,11 @@
 
 
 /******************************************************************
- *         EnumMetafile         GDI.175    
+ *            EnumMetaFile16   (GDI.175)
  *                                    Niels de carpentier, april 1996
  */
-
-BOOL EnumMetaFile(HDC16 hdc, HMETAFILE16 hmf, MFENUMPROC16 lpEnumFunc,LPARAM lpData)
+BOOL16 EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf, MFENUMPROC16 lpEnumFunc,
+                       LPARAM lpData )
 {
     METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
     METARECORD *mr;
@@ -341,11 +341,10 @@
 
 
 /******************************************************************
- *         PlayMetaFileRecord      GDI.176
+ *             PlayMetaFileRecord16   (GDI.176)
  */
-
-void PlayMetaFileRecord(HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
-                        WORD nHandles)
+void PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
+                           UINT16 nHandles )
 {
     short s1;
     HANDLE16 hndl;
@@ -366,7 +365,7 @@
       break;
 
     case META_SETBKCOLOR:
-	SetBkColor(hdc, MAKELONG(*(mr->rdParam), *(mr->rdParam + 1)));
+	SetBkColor16(hdc, MAKELONG(*(mr->rdParam), *(mr->rdParam + 1)));
 	break;
 
     case META_SETBKMODE:
@@ -393,7 +392,7 @@
 	SetStretchBltMode16(hdc, *(mr->rdParam));
 	break;
     case META_SETTEXTCOLOR:
-	SetTextColor(hdc, MAKELONG(*(mr->rdParam), *(mr->rdParam + 1)));
+	SetTextColor16(hdc, MAKELONG(*(mr->rdParam), *(mr->rdParam + 1)));
 	break;
 
     case META_SETWINDOWORG:
@@ -543,7 +542,7 @@
 	case BS_PATTERN:
 	    infohdr = (BITMAPINFOHEADER *)(mr->rdParam + 2);
 	    MF_AddHandle(ht, nHandles,
-			 CreatePatternBrush32(CreateBitmap(infohdr->biWidth, 
+			 CreatePatternBrush32(CreateBitmap32(infohdr->biWidth, 
 				      infohdr->biHeight, 
 				      infohdr->biPlanes, 
 				      infohdr->biBitCount,
@@ -660,11 +659,11 @@
     case META_STRETCHBLT:
       {
        HDC16 hdcSrc=CreateCompatibleDC16(hdc);
-       HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[10], /*Width */
-                                      mr->rdParam[11], /*Height*/
-                                      mr->rdParam[13], /*Planes*/
-                                      mr->rdParam[14], /*BitsPixel*/
-                                      (LPSTR)&mr->rdParam[15]);  /*bits*/
+       HBITMAP32 hbitmap=CreateBitmap32(mr->rdParam[10], /*Width */
+                                        mr->rdParam[11], /*Height*/
+                                        mr->rdParam[13], /*Planes*/
+                                        mr->rdParam[14], /*BitsPixel*/
+                                        (LPSTR)&mr->rdParam[15]);  /*bits*/
        SelectObject32(hdcSrc,hbitmap);
        StretchBlt16(hdc,mr->rdParam[9],mr->rdParam[8],
                     mr->rdParam[7],mr->rdParam[6],
@@ -678,9 +677,11 @@
     case META_BITBLT:            /* <-- not yet debugged */
       {
        HDC16 hdcSrc=CreateCompatibleDC16(hdc);
-       HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[7]/*Width */,mr->rdParam[8]/*Height*/,
-                            mr->rdParam[10]/*Planes*/,mr->rdParam[11]/*BitsPixel*/,
-                            (LPSTR)&mr->rdParam[12]/*bits*/);
+       HBITMAP32 hbitmap=CreateBitmap32(mr->rdParam[7]/*Width */,
+                                        mr->rdParam[8]/*Height*/,
+                                        mr->rdParam[10]/*Planes*/,
+                                        mr->rdParam[11]/*BitsPixel*/,
+                                        (LPSTR)&mr->rdParam[12]/*bits*/);
        SelectObject32(hdcSrc,hbitmap);
        BitBlt32(hdc,(INT16)mr->rdParam[6],(INT16)mr->rdParam[5],
                 (INT16)mr->rdParam[4],(INT16)mr->rdParam[3],
@@ -1162,7 +1163,8 @@
     *(mr->rdParam +10) = BM.bmPlanes;
     *(mr->rdParam +11) = BM.bmBitsPixel;
     dprintf_metafile(stddeb,"MF_StretchBlt->len = %ld  rop=%lx  \n",len,rop);
-    if (GetBitmapBits(dcSrc->w.hBitmap,BM.bmWidthBytes * BM.bmHeight,mr->rdParam +12))
+    if (GetBitmapBits32(dcSrc->w.hBitmap,BM.bmWidthBytes * BM.bmHeight,
+                        mr->rdParam +12))
     {
       mr->rdSize = len / sizeof(INT16);
       *(mr->rdParam) = HIWORD(rop);
@@ -1227,7 +1229,7 @@
 
     dprintf_metafile(stddeb,"MF_StretchBltViaDIB->len = %ld  rop=%lx  PixYPM=%ld Caps=%d\n",
                len,rop,lpBMI->biYPelsPerMeter,GetDeviceCaps(hdcSrc,LOGPIXELSY));
-    if (GetDIBits(hdcSrc,dcSrc->w.hBitmap,0,(UINT)lpBMI->biHeight,
+    if (GetDIBits(hdcSrc,dcSrc->w.hBitmap,0,(UINT32)lpBMI->biHeight,
                   (LPSTR)lpBMI + DIB_BitmapInfoSize( (BITMAPINFO *)lpBMI,
                                                      DIB_RGB_COLORS ),
                   (LPBITMAPINFO)lpBMI, DIB_RGB_COLORS))
@@ -1243,7 +1245,8 @@
     *(mr->rdParam +13) = BM.bmPlanes;
     *(mr->rdParam +14) = BM.bmBitsPixel;
     dprintf_metafile(stddeb,"MF_StretchBlt->len = %ld  rop=%lx  \n",len,rop);
-    if (GetBitmapBits(dcSrc->w.hBitmap,BM.bmWidthBytes * BM.bmHeight,mr->rdParam +15))
+    if (GetBitmapBits32( dcSrc->w.hBitmap, BM.bmWidthBytes * BM.bmHeight,
+                         mr->rdParam +15))
 #endif    
     {
       mr->rdSize = len / sizeof(INT16);
diff --git a/objects/oembitmap.c b/objects/oembitmap.c
index 224f658..6fb8aab 100644
--- a/objects/oembitmap.c
+++ b/objects/oembitmap.c
@@ -5,7 +5,6 @@
  *
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include <string.h>
 #include <X11/Xlib.h>
@@ -482,9 +481,9 @@
         }
     }
 
-    if (hAndBits) GetBitmapBits( hAndBits, sizeAnd, (char *)(pInfo + 1) );
+    if (hAndBits) GetBitmapBits32( hAndBits, sizeAnd, (char *)(pInfo + 1) );
     else memset( (char *)(pInfo + 1), 0xff, sizeAnd );
-    GetBitmapBits( hXorBits, sizeXor, (char *)(pInfo + 1) + sizeAnd );
+    GetBitmapBits32( hXorBits, sizeXor, (char *)(pInfo + 1) + sizeAnd );
 
     DeleteObject32( hXorBits );
     DeleteObject32( hAndBits );
diff --git a/objects/palette.c b/objects/palette.c
index 5c38d23..9faca5f 100644
--- a/objects/palette.c
+++ b/objects/palette.c
@@ -6,7 +6,6 @@
  *
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include <string.h>
 #include <X11/Xlib.h>
@@ -572,10 +571,9 @@
 
 
 /**********************************************************************
- *	    UpdateColors	(GDI.366)
- *
+ *            UpdateColors16   (GDI.366)
  */
-int UpdateColors( HDC16 hDC )
+INT16 UpdateColors16( HDC16 hDC )
 {
     HWND32 hWnd = WindowFromDC32( hDC );
 
@@ -587,3 +585,12 @@
     return 0x666;
 }
 
+
+/**********************************************************************
+ *            UpdateColors32   (GDI32.359)
+ */
+BOOL32 UpdateColors32( HDC32 hDC )
+{
+    UpdateColors16( hDC );
+    return TRUE;
+}
diff --git a/objects/pen.c b/objects/pen.c
index 2cca576..f33b791 100644
--- a/objects/pen.c
+++ b/objects/pen.c
@@ -4,7 +4,6 @@
  * Copyright 1993 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include "pen.h"
 #include "metafile.h"
 #include "color.h"
diff --git a/objects/region.c b/objects/region.c
index 18e808d..3575132 100644
--- a/objects/region.c
+++ b/objects/region.c
@@ -4,7 +4,6 @@
  * Copyright 1993, 1994, 1995 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include <stdio.h>
 #include "region.h"
@@ -137,9 +136,20 @@
 
 
 /***********************************************************************
- *           SetRectRgn    (GDI.172) (GDI32.332)
+ *           SetRectRgn16    (GDI.172)
  */
-VOID SetRectRgn( HRGN32 hrgn, INT32 left, INT32 top, INT32 right, INT32 bottom)
+VOID SetRectRgn16( HRGN16 hrgn, INT16 left, INT16 top,
+                   INT16 right, INT16 bottom )
+{
+    SetRectRgn32( hrgn, left, top, right, bottom );
+}
+
+
+/***********************************************************************
+ *           SetRectRgn32    (GDI32.332)
+ */
+VOID SetRectRgn32( HRGN32 hrgn, INT32 left, INT32 top,
+                   INT32 right, INT32 bottom )
 {
     RGNOBJ * obj;
 
diff --git a/objects/text.c b/objects/text.c
index 1fcf622..ce7572b 100644
--- a/objects/text.c
+++ b/objects/text.c
@@ -401,10 +401,9 @@
 
     if (!cch) cch = lstrlen16( (LPCSTR)PTR_SEG_TO_LIN(lParam) );
     if (gsprc) return gsprc( hdc, lParam, cch );
-    current_color = GetTextColor32( hdc );
-    SetTextColor( hdc, GetSysColor32(COLOR_GRAYTEXT) );
+    current_color = SetTextColor32( hdc, GetSysColor32(COLOR_GRAYTEXT) );
     ret = TextOut16( hdc, x, y, (LPCSTR)PTR_SEG_TO_LIN(lParam), cch );
-    SetTextColor( hdc, current_color );
+    SetTextColor32( hdc, current_color );
     return ret;
 }
 
@@ -421,10 +420,9 @@
 
     if (!cch) cch = lstrlen32A( (LPCSTR)lParam );
     if (gsprc) return gsprc( hdc, lParam, cch );
-    current_color = GetTextColor32( hdc );
-    SetTextColor( hdc, GetSysColor32(COLOR_GRAYTEXT) );
+    current_color = SetTextColor32( hdc, GetSysColor32(COLOR_GRAYTEXT) );
     ret = TextOut32A( hdc, x, y, (LPCSTR)lParam, cch );
-    SetTextColor( hdc, current_color );
+    SetTextColor32( hdc, current_color );
     return ret;
 }
 
@@ -441,10 +439,9 @@
 
     if (!cch) cch = lstrlen32W( (LPCWSTR)lParam );
     if (gsprc) return gsprc( hdc, lParam, cch );
-    current_color = GetTextColor32( hdc );
-    SetTextColor( hdc, GetSysColor32(COLOR_GRAYTEXT) );
+    current_color = SetTextColor32( hdc, GetSysColor32(COLOR_GRAYTEXT) );
     ret = TextOut32W( hdc, x, y, (LPCWSTR)lParam, cch );
-    SetTextColor( hdc, current_color );
+    SetTextColor32( hdc, current_color );
     return ret;
 }