Ignore:
Timestamp:
Sep 14, 1999, 6:56:08 PM (26 years ago)
Author:
sandervl
Message:

* empty log message *

File:
1 edited

Legend:

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

    r932 r933  
    1 /* $Id: winres.cpp,v 1.17 1999-09-14 16:55:38 sandervl Exp $ */
     1/* $Id: winres.cpp,v 1.18 1999-09-14 16:56:08 sandervl Exp $ */
    22
    33/*
     
    2828#include <winres.h>
    2929#include <misc.h>
    30 #include <winexebase.h>
    31 #include <winexepe2lx.h>
     30#include <nameid.h>
     31#include <winexe.h>
    3232#include "cvtresource.h"
    3333#include <vmutex.h>
     
    9292        os2resdata(NULL), winresdata(NULL), resType(RSRC_CUSTOMNODATA)
    9393{
     94  resmutex.enter();
     95  next           = module->winres;
     96  module->winres = this;
     97  resmutex.leave();
     98
    9499  module     = NULL;
    95100  id         = -1;
     
    104109//******************************************************************************
    105110//******************************************************************************
    106 Win32Resource::Win32Resource(Win32ImageBase *module, HRSRC hRes, ULONG id, ULONG type) :
     111Win32Resource::Win32Resource(Win32Image *module, HRSRC hRes, ULONG id, ULONG type) :
    107112        os2resdata(NULL), winresdata(NULL), resType(RSRC_PE2LX)
    108113{
     
    163168//******************************************************************************
    164169//******************************************************************************
    165 Win32Resource::Win32Resource(Win32ImageBase *module, ULONG id, ULONG type,
     170Win32Resource::Win32Resource(Win32Image *module, ULONG id, ULONG type,
    166171                 ULONG size, char *resdata) : hres(NULL),
    167172        os2resdata(NULL), winresdata(NULL), resType(RSRC_PELOADER)
     
    241246    case NTRT_MENU:
    242247    case NTRT_DIALOG:
    243         newid = ((Win32Pe2LxImage *)module)->getWin32ResourceId(id);
     248        newid = module->getWin32ResourceId(id);
    244249
    245250        rc = DosGetResource((HMODULE)module->hinstance, RT_RCDATA, (int)newid, (PPVOID)&resdata);
     
    324329   }
    325330   return os2resdata;
    326 }
    327 //******************************************************************************
    328 //return size of converted win32 resource
    329 //******************************************************************************
    330 ULONG Win32Resource::getOS2Size()
    331 {
    332   switch(type) {
    333     case NTRT_NEWBITMAP:
    334     case NTRT_BITMAP:
    335         return QueryConvertedBitmapSize((WINBITMAPINFOHEADER *)winresdata, ressize);
    336 
    337     case NTRT_CURSOR:
    338         return QueryConvertedCursorSize((CursorComponent *)winresdata, ressize);
    339 
    340     case NTRT_ICON:
    341         return QueryConvertedIconSize((WINBITMAPINFOHEADER *)winresdata, ressize);
    342 
    343     case NTRT_GROUP_ICON:
    344     case NTRT_GROUP_CURSOR:
    345     case NTRT_ACCELERATORS:
    346     case NTRT_NEWMENU:
    347     case NTRT_MENU:
    348     case NTRT_NEWDIALOG:
    349     case NTRT_DIALOG:
    350     case NTRT_FONTDIR:
    351     case NTRT_FONT:
    352     case NTRT_MESSAGETABLE:
    353     case NTRT_RCDATA:
    354     case NTRT_VERSION:
    355     case NTRT_STRING:
    356     default:
    357         dprintf(("Win32Resource::getOS2Size SHOULDN'T BE CALLED for this resource type (%d) (NOT IMPLEMENTED)!!", type));
    358         break;
    359   }
    360   return 0;
    361331}
    362332//******************************************************************************
     
    465435//******************************************************************************
    466436//******************************************************************************
    467 void Win32Resource::destroyAll(Win32ImageBase *module)
     437void Win32Resource::destroyAll(Win32Image *module)
    468438{
    469439 Win32Resource *res = module->winres, *next;
Note: See TracChangeset for help on using the changeset viewer.