Changeset 2007 for trunk/src


Ignore:
Timestamp:
Dec 7, 1999, 1:28:41 PM (26 years ago)
Author:
sandervl
Message:

memory map + string resource fixes

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/mmap.cpp

    r2001 r2007  
    1 /* $Id: mmap.cpp,v 1.24 1999-12-06 21:31:43 sandervl Exp $ */
     1/* $Id: mmap.cpp,v 1.25 1999-12-07 12:28:41 sandervl Exp $ */
    22
    33/*
     
    327327                goto fail;
    328328        }
     329        if(hMemFile == -1 && !image) {//commit memory
     330                VirtualAlloc(pMapping, mSize, MEM_COMMIT, PAGE_READWRITE);
     331        }
    329332  }
    330333  mapview = new Win32MemMapView(this, offset, (size == 0) ? mSize : size, fdwAccess);
  • trunk/src/kernel32/winres.cpp

    r1885 r2007  
    1 /* $Id: winres.cpp,v 1.22 1999-11-30 14:15:55 sandervl Exp $ */
     1/* $Id: winres.cpp,v 1.23 1999-12-07 12:28:41 sandervl Exp $ */
    22
    33/*
     
    7171  this->type     = type;
    7272  this->ressize  = size;
    73   winresdata     = (char *)malloc(size);
     73  winresdata     = (char *)malloc(size+sizeof(WCHAR)); //+2 for 0 terminator (string res)
    7474  if(winresdata == NULL) {
    7575    DebugInt3();
     
    7979
    8080  if(type == NTRT_STRING) {
    81     memcpy(winresdata, resdata, size-sizeof(WCHAR));
    82     ((USHORT *)winresdata)[size/sizeof(WCHAR)-1] = 0;
     81        memcpy(winresdata, resdata, size);
     82        ((USHORT *)winresdata)[size/sizeof(WCHAR)] = 0;
    8383  }
    8484  else  memcpy(winresdata, resdata, size);
  • trunk/src/kernel32/wprocess.cpp

    r1975 r2007  
    1 /* $Id: wprocess.cpp,v 1.55 1999-12-05 10:02:31 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.56 1999-12-07 12:28:41 sandervl Exp $ */
    22
    33/*
     
    606606  }
    607607
    608   eprintf(("KERNEL32:  GetModuleHandle %s returned %X\n", lpszModule, hMod));
     608  dprintf(("KERNEL32:  GetModuleHandle %s returned %X\n", lpszModule, hMod));
    609609  return(hMod);
    610610}
Note: See TracChangeset for help on using the changeset viewer.