Changeset 956 for trunk/src/kernel32/winres.cpp
- Timestamp:
- Sep 16, 1999, 1:39:08 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winres.cpp
r933 r956 1 /* $Id: winres.cpp,v 1.1 8 1999-09-14 16:56:08sandervl Exp $ */1 /* $Id: winres.cpp,v 1.19 1999-09-15 23:38:02 sandervl Exp $ */ 2 2 3 3 /* … … 28 28 #include <winres.h> 29 29 #include <misc.h> 30 #include < nameid.h>31 #include <win exe.h>30 #include <winexepe2lx.h> 31 #include <windllpe2lx.h> 32 32 #include "cvtresource.h" 33 33 #include <vmutex.h> 34 34 35 35 VMutex resmutex; 36 37 char *ResTypes[MAX_RES] = 38 {"niks", "CURSOR", "BITMAP", "ICON", "MENU", "DIALOG", "STRING", 39 "FONTDIR", "FONT", "ACCELERATOR", "RCDATA", "MESSAGETABLE", 40 "GROUP_CURSOR", "niks", "GROUP_ICON", "niks", "VERSION"}; 36 41 37 42 //****************************************************************************** … … 92 97 os2resdata(NULL), winresdata(NULL), resType(RSRC_CUSTOMNODATA) 93 98 { 94 resmutex.enter(); 95 next = module->winres; 96 module->winres = this; 97 resmutex.leave(); 98 99 next = NULL; 99 100 module = NULL; 101 100 102 id = -1; 101 103 type = -1; … … 109 111 //****************************************************************************** 110 112 //****************************************************************************** 111 Win32Resource::Win32Resource(Win32Image *module, HRSRC hRes, ULONG id, ULONG type) :113 Win32Resource::Win32Resource(Win32ImageBase *module, HRSRC hRes, ULONG id, ULONG type) : 112 114 os2resdata(NULL), winresdata(NULL), resType(RSRC_PE2LX) 113 115 { … … 168 170 //****************************************************************************** 169 171 //****************************************************************************** 170 Win32Resource::Win32Resource(Win32Image *module, ULONG id, ULONG type,172 Win32Resource::Win32Resource(Win32ImageBase *module, ULONG id, ULONG type, 171 173 ULONG size, char *resdata) : hres(NULL), 172 174 os2resdata(NULL), winresdata(NULL), resType(RSRC_PELOADER) … … 246 248 case NTRT_MENU: 247 249 case NTRT_DIALOG: 248 newid = module->getWin32ResourceId(id); 250 { 251 //TODO->!!!! 252 // newid = ((Win32Pe2LxImage *)module)->getWin32ResourceId(id); 253 //TODO->!!!! 249 254 250 255 rc = DosGetResource((HMODULE)module->hinstance, RT_RCDATA, (int)newid, (PPVOID)&resdata); … … 256 261 memcpy(winresdata, resdata, ressize); 257 262 break; 263 } 258 264 259 265 //TODO:not yet implemented … … 329 335 } 330 336 return os2resdata; 337 } 338 //****************************************************************************** 339 //return size of converted win32 resource 340 //****************************************************************************** 341 ULONG Win32Resource::getOS2Size() 342 { 343 switch(type) { 344 case NTRT_NEWBITMAP: 345 case NTRT_BITMAP: 346 return QueryConvertedBitmapSize((WINBITMAPINFOHEADER *)winresdata, ressize); 347 348 case NTRT_CURSOR: 349 return QueryConvertedCursorSize((CursorComponent *)winresdata, ressize); 350 351 case NTRT_ICON: 352 return QueryConvertedIconSize((WINBITMAPINFOHEADER *)winresdata, ressize); 353 354 case NTRT_GROUP_ICON: 355 case NTRT_GROUP_CURSOR: 356 case NTRT_ACCELERATORS: 357 case NTRT_NEWMENU: 358 case NTRT_MENU: 359 case NTRT_NEWDIALOG: 360 case NTRT_DIALOG: 361 case NTRT_FONTDIR: 362 case NTRT_FONT: 363 case NTRT_MESSAGETABLE: 364 case NTRT_RCDATA: 365 case NTRT_VERSION: 366 case NTRT_STRING: 367 default: 368 dprintf(("Win32Resource::getOS2Size SHOULDN'T BE CALLED for this resource type (%d) (NOT IMPLEMENTED)!!", type)); 369 break; 370 } 371 return 0; 331 372 } 332 373 //****************************************************************************** … … 435 476 //****************************************************************************** 436 477 //****************************************************************************** 437 void Win32Resource::destroyAll(Win32Image *module)478 void Win32Resource::destroyAll(Win32ImageBase *module) 438 479 { 439 480 Win32Resource *res = module->winres, *next;
Note:
See TracChangeset
for help on using the changeset viewer.