Ignore:
Timestamp:
Jun 7, 1999, 10:58:22 PM (26 years ago)
Author:
sandervl
Message:

* empty log message *

File:
1 edited

Legend:

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

    r37 r46  
    1 /* $Id: resource.cpp,v 1.4 1999-06-06 12:25:49 cbratschi Exp $ */
    2 
    31/*
    42 *
     
    1412 */
    1513#include <os2win.h>
    16 #include "misc.h"
    17 
    1814#include "unicode.h"
    1915#include "winres.h"
    2016#include "winimage.h"
    2117#include "winexe.h"
    22 
    2318
    2419//******************************************************************************
     
    3126
    3227    dprintf(("FindResourceA %X", hModule));
    33     // EB: ->>> added real exe module handle
    34     if(hModule == 0 || hModule == -1 || (WinExe != NULL && hModule == WinExe->getOS2InstanceHandle()))
    35       module = (Win32Image *)WinExe;
    36     else
    37       module = (Win32Image *)Win32Dll::findModule(hModule);
     28    if(hModule == 0 || hModule == -1 || (WinExe != NULL && hModule ==
     29       WinExe->getOS2InstanceHandle()))
     30    {
     31         module = (Win32Image *)WinExe;
     32    }
     33    else module = (Win32Image *)Win32Dll::findModule(hModule);
    3834
    3935    if(module == NULL)
    40     return(NULL);
     36        return(NULL);
    4137
    4238    return module->findResourceA(lpszName, (LPSTR)lpszType);
     
    4541//******************************************************************************
    4642HRSRC WIN32API FindResourceW(HINSTANCE hModule, LPCWSTR lpszName,
    47                              LPCWSTR lpszType)
     43                             LPCWSTR lpszType)
    4844{
    4945 Win32Image *module;
    5046
    5147    dprintf(("FindResourceW %X", hModule));
    52     if(hModule == 0 || hModule == -1)
     48    if(hModule == 0 || hModule == -1 || (WinExe != NULL && hModule ==
     49       WinExe->getOS2InstanceHandle()))
     50    {
    5351         module = (Win32Image *)WinExe;
     52    }
    5453    else module = (Win32Image *)Win32Dll::findModule(hModule);
    5554
    5655    if(module == NULL)
    57         return(NULL);
     56        return(NULL);
    5857
    5958    return module->findResourceW((LPWSTR)lpszName, (LPWSTR)lpszType);
Note: See TracChangeset for help on using the changeset viewer.