In our previous episode, Reinier Olislagers said:
> >
> > Yes.
> >
> > Resource := FindResource(HInstance, 'SQLSCRIPT', RT_RCDATA);
>
> Thanks Paul; IIRC Linux barfed on RT_RCDATA; can't/won't test it right
> now as FPC trunk is broken...
uses resource;
_
27.05.13, 17:47, Reinier Olislagers пишет:
Resource := FindResource(HInstance, 'SQLSCRIPT', RT_RCDATA);
Thanks Paul; IIRC Linux barfed on RT_RCDATA; can't/won't test it right
now as FPC trunk is broken...
If you look at Lazarus source you may find that LCL uses similar code to
load forms da
On 27-5-2013 1:04, Paul Ishenin wrote:
> 25.05.13, 20:25, Reinier Olislagers пишет:
>
>> In the code above, I'm loading the resource from the executable.
>> However, Paramstr(0) is not reliable on all platforms.
>> Is there a better way of doing this?
>
> Yes.
>
> Resource := FindResource(HInsta
25.05.13, 20:25, Reinier Olislagers пишет:
In the code above, I'm loading the resource from the executable.
However, Paramstr(0) is not reliable on all platforms.
Is there a better way of doing this?
Yes.
Resource := FindResource(HInstance, 'SQLSCRIPT', RT_RCDATA);
if Resource <> 0 then
begin
On 25 May 2013, at 14:25, Reinier Olislagers wrote:
> In the code above, I'm loading the resource from the executable.
> However, Paramstr(0) is not reliable on all platforms.
It's worse: on Unix platforms, even if you know the full path it's unsafe
because the binary may have been unlinked sin
Hi list,
I've noticed some code of mine using resources needed the windows unit
(to get RT_RCDATA), Iand therefore wasn't cross-platform.
Tried rewriting using fcl-res, which seems to work ok at least on Windows:
uses
,resource
//resource readers
,resreader, coffreader, winpeimagereader, el