Changeset 921 for trunk/src


Ignore:
Timestamp:
Sep 13, 1999, 4:31:06 PM (26 years ago)
Author:
sandervl
Message:

Win32Resource ctor bugfix

File:
1 edited

Legend:

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

    r816 r921  
    1 /* $Id: winres.cpp,v 1.15 1999-09-04 12:41:46 sandervl Exp $ */
     1/* $Id: winres.cpp,v 1.16 1999-09-13 14:31:06 sandervl Exp $ */
    22
    33/*
     
    2828#include <winres.h>
    2929#include <misc.h>
    30 #include <nameid.h>
    31 #include <winexe.h>
     30#include <winexepe2lx.h>
     31#include <windllpe2lx.h>
    3232#include "cvtresource.h"
    3333#include <vmutex.h>
    3434
    3535VMutex resmutex;
     36
     37char *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"};
    3641
    3742//******************************************************************************
     
    9297        os2resdata(NULL), winresdata(NULL), resType(RSRC_CUSTOMNODATA)
    9398{
    94   resmutex.enter();
    95   next           = module->winres;
    96   module->winres = this;
    97   resmutex.leave();
    98 
     99  next       = NULL;
    99100  module     = NULL;
     101
    100102  id         = -1;
    101103  type       = -1;
     
    109111//******************************************************************************
    110112//******************************************************************************
    111 Win32Resource::Win32Resource(Win32Image *module, HRSRC hRes, ULONG id, ULONG type) :
     113Win32Resource::Win32Resource(Win32ImageBase *module, HRSRC hRes, ULONG id, ULONG type) :
    112114        os2resdata(NULL), winresdata(NULL), resType(RSRC_PE2LX)
    113115{
     
    168170//******************************************************************************
    169171//******************************************************************************
    170 Win32Resource::Win32Resource(Win32Image *module, ULONG id, ULONG type,
     172Win32Resource::Win32Resource(Win32ImageBase *module, ULONG id, ULONG type,
    171173                 ULONG size, char *resdata) : hres(NULL),
    172174        os2resdata(NULL), winresdata(NULL), resType(RSRC_PELOADER)
     
    246248    case NTRT_MENU:
    247249    case NTRT_DIALOG:
    248         newid = module->getWin32ResourceId(id);
     250    {
     251//        newid = ((Win32Pe2LxImage *)module)->getWin32ResourceId(id);
    249252
    250253        rc = DosGetResource((HMODULE)module->hinstance, RT_RCDATA, (int)newid, (PPVOID)&resdata);
     
    256259        memcpy(winresdata, resdata, ressize);
    257260        break;
     261    }
    258262
    259263    //TODO:not yet implemented
     
    470474//******************************************************************************
    471475//******************************************************************************
    472 void Win32Resource::destroyAll(Win32Image *module)
     476void Win32Resource::destroyAll(Win32ImageBase *module)
    473477{
    474478 Win32Resource *res = module->winres, *next;
Note: See TracChangeset for help on using the changeset viewer.