Release 961222
Sun Dec 22 13:30:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [graphics/metafiledrv/init.c] [graphisc/metafiledrv/mapping.c]
Added mapping functions.
* [if1632/gdi.spec] [objects/*.c] [include/windows.h]
Added a lot of Win32 functions.
* [memory/heap.c]
Added HEAP_strdupAtoW and HEAP_strdupWtoA.
* [misc/lstr.c] [memory/string.c]
Moved OEM<->Ansi conversion to string.c. Fixed a couple of bugs.
* [object/font.c]
Avoid uppercasing font names.
* [windows/hook.c]
Set ds = ss before calling hook procedure.
Sat Dec 21 21:44:17 1996 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [objects/color.c]
Use colors allocated by other clients.
* [windows/caret.c]
Set default blink time to 500.
* [windows/win.c] [windows/event.c]
Delete X context before XDestroyWindow().
* [windows/keyboard.c]
Fixed GetKeyState() once more.
Fri Dec 20 08:26:33 1996 Eric Youngdale <eric@sub2304.jic.com>
* [debugger/*.c]
Lots of built-in debugger improvements: parse Win32 EXEs debug
information, display local variables, source files and line
numbers, get symbols directly from the Wine executable, etc.
Tue Dec 17 22:39:42 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [misc/winsock_async.c]
Extern declaration added for h_errno.
Tue Dec 17 21:29:34 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/message.c]
Added two more CBT hook calls: HCBT_CLICKSKIPPED/HCBT_KEYSKIPPED.
diff --git a/loader/resource.c b/loader/resource.c
index 200406f..3ae6821 100644
--- a/loader/resource.c
+++ b/loader/resource.c
@@ -16,6 +16,7 @@
#include "windows.h"
#include "gdi.h"
#include "global.h"
+#include "heap.h"
#include "neexe.h"
#include "accel.h"
#include "module.h"
@@ -23,8 +24,6 @@
#include "stddebug.h"
#include "debug.h"
#include "libres.h"
-#include "string32.h"
-#include "xmalloc.h"
#define PrintId(name) \
if (HIWORD((DWORD)name)) \
@@ -85,13 +84,17 @@
LPWSTR xname,xtype;
HANDLE32 ret;
- if (HIWORD((DWORD)name)) xname = STRING32_DupAnsiToUni(name);
- else xname = (LPWSTR)name;
- if (HIWORD((DWORD)type)) xtype = STRING32_DupAnsiToUni(type);
- else xtype = (LPWSTR)type;
- ret = FindResourceEx32W(hModule,xname,xtype,lang);
- if (HIWORD((DWORD)name)) free(xname);
- if (HIWORD((DWORD)type)) free(xtype);
+ if (HIWORD((DWORD)name))
+ xname = HEAP_strdupAtoW( GetProcessHeap(), 0, name );
+ else
+ xname = (LPWSTR)name;
+ if (HIWORD((DWORD)type))
+ xtype = HEAP_strdupAtoW( GetProcessHeap(), 0, type);
+ else
+ xtype = (LPWSTR)type;
+ ret = FindResourceEx32W( hModule, xname, xtype, lang );
+ if (HIWORD((DWORD)name)) HeapFree( GetProcessHeap(), 0, xname );
+ if (HIWORD((DWORD)type)) HeapFree( GetProcessHeap(), 0, xtype );
return ret;
}
@@ -494,12 +497,11 @@
LPWSTR uni;
HACCEL32 result;
if (HIWORD(lpTableName))
- uni=STRING32_DupAnsiToUni(lpTableName);
+ uni = HEAP_strdupAtoW( GetProcessHeap(), 0, lpTableName );
else
- uni=(LPWSTR)lpTableName;
- result=LoadAccelerators32W(instance,uni);
- if (HIWORD(uni))
- free(uni);
+ uni = (LPWSTR)lpTableName;
+ result = LoadAccelerators32W(instance,uni);
+ if (HIWORD(uni)) HeapFree( GetProcessHeap(), 0, uni);
return result;
}
@@ -607,13 +609,15 @@
INT32
LoadString32A(HINSTANCE32 instance,UINT32 resource_id,LPSTR buffer,int buflen)
{
- LPWSTR buffer2 = buffer?(LPWSTR)xmalloc(buflen*2):NULL;
- INT32 retval = LoadString32W(instance,resource_id,buffer2,buflen);
+ INT32 retval;
+ LPWSTR buffer2 = NULL;
+ if (buffer) buffer2 = HeapAlloc( GetProcessHeap(), 0, buflen * 2 );
+ retval = LoadString32W(instance,resource_id,buffer2,buflen);
- if (!retval) return 0;
- if (buffer) {
- STRING32_UniToAnsi(buffer,buffer2);
- free(buffer2);
+ if (buffer)
+ {
+ lstrcpynWtoA( buffer, buffer2, buflen );
+ HeapFree( GetProcessHeap(), 0, buffer2 );
}
return retval;
}
@@ -712,16 +716,17 @@
/**********************************************************************
* LoadMessage32W (internal)
*/
-INT32
-LoadMessage32W(
- HINSTANCE32 instance,UINT32 id,WORD lang,LPWSTR buffer,int buflen
-) {
- LPSTR buffer2 = buffer?(LPSTR)xmalloc(buflen):NULL;
- INT32 retval = LoadMessage32A(instance,id,lang,buffer2,buflen);
-
- if (buffer) {
- STRING32_AnsiToUni(buffer,buffer2);
- free(buffer2);
+INT32 LoadMessage32W( HINSTANCE32 instance, UINT32 id, WORD lang,
+ LPWSTR buffer, int buflen )
+{
+ INT32 retval;
+ LPSTR buffer2 = NULL;
+ if (buffer) buffer2 = HeapAlloc( GetProcessHeap(), 0, buflen );
+ retval = LoadMessage32A(instance,id,lang,buffer2,buflen);
+ if (buffer)
+ {
+ lstrcpynAtoW( buffer, buffer2, buflen );
+ HeapFree( GetProcessHeap(), 0, buffer2 );
}
return retval;
}