Ignore:
Timestamp:
Oct 27, 1999, 12:35:42 PM (26 years ago)
Author:
sandervl
Message:

Color cursor changes + dll loading fixes

File:
1 edited

Legend:

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

    r1410 r1475  
    1 /* $Id: winimagepeldr.cpp,v 1.8 1999-10-23 12:34:48 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.9 1999-10-27 10:35:42 sandervl Exp $ */
    22
    33/*
     
    4444#include "initterm.h"
    4545#include <win\virtual.h>
     46#include "oslibdos.h"
    4647
    4748char szErrorTitle[]     = "Odin";
     
    6768//******************************************************************************
    6869//******************************************************************************
    69 Win32PeLdrImage::Win32PeLdrImage(char *szFileName, int loadtype) :
     70Win32PeLdrImage::Win32PeLdrImage(char *pszFileName, int loadtype) :
    7071    Win32ImageBase(-1),
    7172    nrsections(0), imageSize(0),
     
    7475    pResSection(NULL), fImgMapping(0)
    7576{
     77 HFILE  dllfile;
     78
    7679  loadType = loadtype;
    7780
    78   strcpy(this->szFileName, szFileName);
     81  strcpy(szFileName, pszFileName);
     82  strupr(szFileName);
     83  if(!strchr(szFileName, (int)'.')) {
     84        strcat(szFileName,".DLL");
     85  }
     86  dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
     87  if(dllfile == NULL) {//search in libpath for dll
     88        strcpy(szModule, kernel32Path);
     89        strcat(szModule, szFileName);
     90        strcpy(szFileName, szModule);
     91  }
     92  else  OSLibDosClose(dllfile);
    7993
    8094  strcpy(szModule, OSLibStripPath(szFileName));
Note: See TracChangeset for help on using the changeset viewer.