mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 03:24:33 +00:00
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:
parent
3ad6d76cf9
commit
59951cd18f
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ RosAllocAndLoadStringA(LPSTR *lpTarget, HINSTANCE hInst, UINT uID)
|
||||||
ln = RosLenOfStrResource(hInst, uID);
|
ln = RosLenOfStrResource(hInst, uID);
|
||||||
if(ln++ > 0)
|
if(ln++ > 0)
|
||||||
{
|
{
|
||||||
(*lpTarget) = (LPSTR)LocalAlloc(LHND, ln * sizeof(CHAR));
|
(*lpTarget) = (LPSTR)LocalAlloc(LMEM_FIXED, ln * sizeof(CHAR));
|
||||||
if((*lpTarget) != NULL)
|
if((*lpTarget) != NULL)
|
||||||
{
|
{
|
||||||
int Ret;
|
int Ret;
|
||||||
|
@ -94,7 +94,7 @@ RosAllocAndLoadStringW(LPWSTR *lpTarget, HINSTANCE hInst, UINT uID)
|
||||||
ln = RosLenOfStrResource(hInst, uID);
|
ln = RosLenOfStrResource(hInst, uID);
|
||||||
if(ln++ > 0)
|
if(ln++ > 0)
|
||||||
{
|
{
|
||||||
(*lpTarget) = (LPWSTR)LocalAlloc(LHND, ln * sizeof(WCHAR));
|
(*lpTarget) = (LPWSTR)LocalAlloc(LMEM_FIXED, ln * sizeof(WCHAR));
|
||||||
if((*lpTarget) != NULL)
|
if((*lpTarget) != NULL)
|
||||||
{
|
{
|
||||||
int Ret;
|
int Ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue