don't allocate movable memory and use the returned handle as a pointer, allocate fixed memory instead

svn path=/trunk/; revision=12379
This commit is contained in:
Thomas Bluemel 2004-12-28 13:11:02 +00:00
parent 3ad6d76cf9
commit 59951cd18f

View file

@ -62,7 +62,7 @@ RosAllocAndLoadStringA(LPSTR *lpTarget, HINSTANCE hInst, UINT uID)
ln = RosLenOfStrResource(hInst, uID);
if(ln++ > 0)
{
(*lpTarget) = (LPSTR)LocalAlloc(LHND, ln * sizeof(CHAR));
(*lpTarget) = (LPSTR)LocalAlloc(LMEM_FIXED, ln * sizeof(CHAR));
if((*lpTarget) != NULL)
{
int Ret;
@ -94,7 +94,7 @@ RosAllocAndLoadStringW(LPWSTR *lpTarget, HINSTANCE hInst, UINT uID)
ln = RosLenOfStrResource(hInst, uID);
if(ln++ > 0)
{
(*lpTarget) = (LPWSTR)LocalAlloc(LHND, ln * sizeof(WCHAR));
(*lpTarget) = (LPWSTR)LocalAlloc(LMEM_FIXED, ln * sizeof(WCHAR));
if((*lpTarget) != NULL)
{
int Ret;