Compile with w32api...gift for Steven

svn path=/trunk/; revision=14486
This commit is contained in:
Alex Ionescu 2005-04-04 03:55:43 +00:00
parent 6514e33a95
commit ff0ad6c8cb
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ TARGET_SDKLIBS = pseh.a epsapi.a ntdll.a kernel32.a
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

View file

@ -282,7 +282,7 @@ InternalGetMappedFileName(BOOLEAN bUnicode,
}
/* 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 @@ InternalGetMappedFileName(BOOLEAN bUnicode,
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);