Compile with w32api...gift for Steven
Modified: trunk/reactos/lib/psapi/makefile
Modified: trunk/reactos/lib/psapi/psapi.c
_____
Modified: trunk/reactos/lib/psapi/makefile
--- trunk/reactos/lib/psapi/makefile 2005-04-03 21:36:15 UTC (rev
14485)
+++ trunk/reactos/lib/psapi/makefile 2005-04-04 03:55:43 UTC (rev
14486)
@@ -11,7 +11,7 @@
TARGET_CFLAGS = -I./include -Wall -Werror
# require os code to explicitly request A/W version of
structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS -D_SEH_NO_NATIVE_NLG
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -D_SEH_NO_NATIVE_NLG -D__USE_W32API
TARGET_LFLAGS = -nostartfiles -nostdlib
_____
Modified: trunk/reactos/lib/psapi/psapi.c
--- trunk/reactos/lib/psapi/psapi.c 2005-04-03 21:36:15 UTC (rev
14485)
+++ trunk/reactos/lib/psapi/psapi.c 2005-04-04 03:55:43 UTC (rev
14486)
@@ -282,7 +282,7 @@
}
/* allocate the memory */
- pmsnName = PsaiMalloc(nBufSize + offsetof(MEMORY_SECTION_NAME,
NameBuffer));
+ pmsnName = PsaiMalloc(nBufSize + sizeof(MEMORY_SECTION_NAME));
if(pmsnName == NULL)
{
@@ -315,7 +315,7 @@
if(bUnicode)
{
/* destination is an Unicode string: direct copy */
- memcpy((LPWSTR)lpName, pmsnName->NameBuffer,
pmsnName->SectionFileName.Length);
+ memcpy((LPWSTR)lpName, pmsnName + 1,
pmsnName->SectionFileName.Length);
PsaiFree(pmsnName);
Show replies by date