Changeset 597 for trunk/src/kernel32/winres.cpp
- Timestamp:
- Aug 20, 1999, 1:52:44 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winres.cpp
r589 r597 1 /* $Id: winres.cpp,v 1. 9 1999-08-19 19:50:41sandervl Exp $ */1 /* $Id: winres.cpp,v 1.10 1999-08-20 11:52:44 sandervl Exp $ */ 2 2 3 3 /* … … 8 8 * 9 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 10 11 * 11 12 */ … … 31 32 #include "cvtresource.h" 32 33 34 //****************************************************************************** 35 //****************************************************************************** 33 36 static ULONG CalcBitmapSize(ULONG cBits, LONG cx, LONG cy) 34 37 { … … 155 158 return; 156 159 } 157 memcpy(winresdata, resdata, size); 160 OS2ResHandle = 0; 161 162 if(type == NTRT_STRING) { 163 memcpy(winresdata, resdata, size-sizeof(WCHAR)); 164 ((USHORT *)winresdata)[size/sizeof(WCHAR)-1] = 0; 165 } 166 else memcpy(winresdata, resdata, size); 158 167 } 159 168 //****************************************************************************** … … 253 262 254 263 if(winresdata == NULL) { 255 rc = DosGetResource((HMODULE)module->hinstance, os2type, id, (PPVOID)&resdata);256 if(rc) {257 dprintf(("Can't find original string!!!\n"));258 return(NULL);259 }260 winresdata = (char *)malloc(ressize);261 memcpy(winresdata, resdata, ressize);264 rc = DosGetResource((HMODULE)module->hinstance, os2type, id, (PPVOID)&resdata); 265 if(rc) { 266 dprintf(("Can't find original resource!!!\n")); 267 return(NULL); 268 } 269 winresdata = (char *)malloc(ressize); 270 memcpy(winresdata, resdata, ressize); 262 271 } 263 272 if(resdata) 264 DosFreeResource(resdata); 273 DosFreeResource(resdata); 274 265 275 return winresdata; 266 276 } … … 321 331 case NTRT_FONT: 322 332 case NTRT_MESSAGETABLE: 323 case NTRT_STRING:324 333 case NTRT_RCDATA: 325 334 case NTRT_VERSION: 335 case NTRT_STRING: 336 break; 337 326 338 default: 327 339 break;
Note:
See TracChangeset
for help on using the changeset viewer.