View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005505 | JEDI VCL | 00 JVCL Components | public | 2011-03-03 09:51 | 2011-06-07 17:44 |
Reporter | martinit | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | duplicate | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0005505: JvGnuGettext.pas ... Function IsLibrary vs. ModuleIsLib | ||||
Description | In Initialization section of jvgnugettext.pas is used variable IsLibrary which is defined in SYSTEM unit. This variable IsLibrary is used in this test ... if IsLibrary then begin // Get DLL/shared object Filename SetLength(ExecutableFilename, 300); {$ifdef MSWINDOWS} SetLength(ExecutableFilename, GetModuleFileName(HInstance, PChar(ExecutableFilename), Length(ExecutableFilename))); {$endif} {$ifdef LINUX} // This line has not been tested on Linux, yet, but should work. SetLength(ExecutableFilename, GetModuleFileName(0, PChar(ExecutableFilename), Length(ExecutableFilename))); {$endif} {$ifdef CLR} ExecutableFilename := System.Diagnostics.Process.GetCurrentProcess.MainModule.FileName; {$endif} end else ExecutableFilename := ParamStr(0); Unfortunately this variable have bad value, when is used in library ... Variable is GLOBAL ... so if i using in DLL, then result is False, because variable tests *.exe file, not *.dll ... Much better is variable ModuleIsLib which is defined in unit SYSINIT ... this variable detect Library or package in which is jvgnugettext.pas used good. Thanks for fixing | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-03 09:51 | martinit | New Issue | |
2011-06-07 17:44 | obones | Note Added: 0018605 | |
2011-06-07 17:44 | obones | Duplicate ID | 0 => 5496 |
2011-06-07 17:44 | obones | Status | new => resolved |
2011-06-07 17:44 | obones | Resolution | open => duplicate |
2011-06-07 17:44 | obones | Assigned To | => obones |