Release 961117

Sun Nov 17 15:01:45 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [graphics/bitblt.c] [graphics/x11drv/bitblt.c]
	Moved BitBlt operations to the new graphics driver
	interface. Implemented PatBlt32, BitBlt32 and StretchBlt32.

	* [memory/global.c]
	Unified MemManInfo() and GlobalMemoryStatus().

	* [objects/text.c]
	Fixed ExtTextOut() to always use physical coords for clip rect.

	* [windows/dialog.c]
	Implemented DlgDirSelectEx() and Win32 version of DlgDirSelect*.

	* [windows/event.c]
	Avoid busy-looping in EVENT_WaitXEvent when no timer is pending
	(thanks to Thomas Koenig).

	* [windows/painting.c]
	Moved update region clipping for CS_PARENTDC windows to BeginPaint().
	
	* [windows/scroll.c]
	Implemented Win32 version of ScrollWindow() and ScrollDC().

Tue Nov 12 09:52:17 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [files/*.c] [win32/file.c]
	Some win32 filetime conversion functions added.
	Fixed behaviour with DOS drives pointing to UNIX /
	SetCurrentDirectory() may also get X:\xxx paths.
	Fixed FILE_Open when called from CreateFile().
	Added GetFileSize(), MapViewOfFile(), SetFileTime(), GetFileTime().

	* [misc/crtdll.c] [if1632/crtdll.spec]
	Added some new functions.

	* [if1632/user32.spec]
	Some thunks into win16 code added.

	* [win32/init.c]
	Added GetSystemInfo(), removed GetModuleFileName() stub.

	* [win32/code_page.c] [if1632/thunk.c]
	Added EnumSystemCodePages* (untested).

	* [objects/font.c] [if1632/thunk.c]
	Added EnumFontFamilies32*.
	
Mon Nov 11 14:50:24 1996  Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>

	* [controls/menu.c] [windows/mdi.c]
	Don't delete the MDI `windows' menu if it's already been deleted.

	* [misc/exec.c]
	Notepad always calls WinHelp(.., HELP_QUIT, ...) at termination
 	and complains if it returns FALSE.

	* [windows/winpos.c]
	Get maximized MDI child's nonclient area redrawn after resize.

Thu Nov  7 13:32:34 1996  Lee Jaekil <juria@seodu.co.kr>

	* [memory/global.c]
	Use /proc filesystem for GlobalMemoryStatus() on Linux.

Mon Nov  4 18:30:00 1996  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [windows/event.c]
	Added OffiX-style file drop handling. File paths must be
	DOS-mappable by Wine (via wine.conf).

	* [controls/combo.c]
        Added WM_GETTEXT handler.

	* [objects/palette.c]
	Added ResizePalette() (untested).

	* [objects/cursoricon.c]
	Implemented icon to cursor conversion.

	* [objects/color.c]
	Fixed crash on startup when no colorcells are writeable.

Mon Nov  4 00:49:41 1996  Ulrich Schmid  <uschmid@mail.hh.provi.de>

	* [rc/winerc.c]
	Added support for win32 output.

	* [library/libres.c] [include/libres.h] [loader/resource.c]
	Renamed LIBRES_FindResource to LIBRES_FindResource16.
	Added LIBRES_FindResource32.

Sun Nov 3 21:21:45 1996  Robert Pouliot <krynos@clic.net>

	* [loader/builtin.c] [if1632/Makefile.in] [if1632/wing.spec]
	Added the spec file for WinG, it's only stub for now, but it
	should be easy to do by someone with Windows programming
	knowledge. See: ftp.microsoft.com/SoftLib/MSLFILES/wing10.exe.

	* [if1632/crtdll.spec]
	Added some string and memory functions to make sfxed95.exe (of
 	Warcraft 2) almost work.
diff --git a/library/libres.c b/library/libres.c
index c3964ec..521f7c2 100644
--- a/library/libres.c
+++ b/library/libres.c
@@ -9,6 +9,7 @@
 #include "libres.h"
 #include "windows.h"
 #include "xmalloc.h"
+#include "string32.h"
 
 typedef struct RLE
 {
@@ -30,9 +31,9 @@
 }
 
 /**********************************************************************
- *	    LIBRES_FindResource    
+ *	    LIBRES_FindResource16    
  */
-HRSRC32 LIBRES_FindResource( HINSTANCE32 hModule, LPCSTR name, LPCSTR type )
+HRSRC32 LIBRES_FindResource16( HINSTANCE32 hModule, LPCSTR name, LPCSTR type )
 {
   int nameid=0,typeid;
   ResListE* ResBlock;
@@ -57,7 +58,7 @@
       typeid=atoi(type+1);
     else
     {
-      WINELIB_UNIMP("LIBRES_FindResource(*,*,type=string)");
+      WINELIB_UNIMP("LIBRES_FindResource16(*,*,type=string)");
       return 0;
     }
   }
@@ -77,6 +78,61 @@
   return 0;
 }
 
+/**********************************************************************
+ *	    LIBRES_FindResource32    
+ */
+HRSRC32 LIBRES_FindResource32( HINSTANCE32 hModule, LPCWSTR name, LPCWSTR type )
+{
+  int nameid=0,typeid;
+  ResListE* ResBlock;
+  const struct resource* const * Res;
+  LPSTR nameA, typeA;
+
+  if(HIWORD(name))
+  {
+    if(*name=='#')
+    {
+      nameA = STRING32_DupUniToAnsi(name);
+      nameid=atoi(nameA+1);
+      free(nameA);
+      name=NULL;
+    }
+  }
+  else
+  {
+    nameid=LOWORD(name);
+    name=NULL;
+  }
+  if(HIWORD(type))
+  {
+    if(*type=='#')
+    {
+      typeA = STRING32_DupUniToAnsi(type);
+      typeid=atoi(typeA+1);
+      free(typeA);
+    }
+    else
+    {
+      WINELIB_UNIMP("LIBRES_FindResource32(*,*,type=string)");
+      return 0;
+    }
+  }
+  else
+    typeid=LOWORD(type);
+  
+  for(ResBlock=ResourceList; ResBlock; ResBlock=ResBlock->next)
+    for(Res=ResBlock->Resources; *Res; Res++)
+      if(name)
+      {
+	if((*Res)->type==typeid && !lstrcmpi32W((*Res)->name,name))
+	  return (HRSRC32)*Res;
+      }
+      else
+	if((*Res)->type==typeid && (*Res)->id==nameid)
+	  return (HRSRC32)*Res;
+  return 0;
+}
+
 
 /**********************************************************************
  *	    LIBRES_LoadResource