View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005902 | JEDI VCL | 00 JVCL Components | public | 2012-06-07 17:14 | 2012-09-10 14:15 |
Reporter | Arioch | Assigned To | AHUser | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | OS | Windows | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.46 | |||
Summary | 0005902: LoadDLL was sent into death spirale | ||||
Description | // $Id: JvJCLUtils.pas,v 1.174 2006/02/16 20:28:05 ahuser Exp $ function LoadDLL(const LibName: string): THandle; var ErrMode: Cardinal; begin ErrMode := SetErrorMode(SEM_NOOPENFILEERRORBOX); Result := LoadLibrary(PChar(LibName)); SetErrorMode(ErrMode); if Result < HINSTANCE_ERROR then OSCheck(False); end; --------------- // $Id: JvJCLUtils.pas 13219 2012-02-24 10:56:45Z obones $ {$IFDEF MSWINDOWS} { Service routines } function LoadDLL(const LibName: string): THandle; begin Result := SafeLoadLibrary(LibName); if Result <> 0 then OSCheck(False); end; | ||||
Steps To Reproduce | I don't know WHO did THIS simplification, but after half a day spent into gu.. Okay, i should spot that simple error earlier. Problem is that simple errors are hard to believe hence hard to spot - What should this function return ? - DLL Handler. - Is DLL Handler zero ? - No. - When will this function return without raising error ? - Only when DLL failed to load. | ||||
Additional Information | I believe that the condition should be reverted. function LoadDLL(const LibName: string): THandle; begin Result := SafeLoadLibrary(LibName); if Result < HINSTANCE_ERROR then OSCheck(False); end; | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-06-07 17:14 | Arioch | New Issue | |
2012-06-09 11:02 | AHUser | Note Added: 0019810 | |
2012-06-09 11:02 | AHUser | Status | new => resolved |
2012-06-09 11:02 | AHUser | Fixed in Version | => Daily / SVN |
2012-06-09 11:02 | AHUser | Resolution | open => fixed |
2012-06-09 11:02 | AHUser | Assigned To | => AHUser |
2012-09-10 14:15 | obones | Fixed in Version | Daily / SVN => 3.46 |