[fpc-pascal] TEventLog, RegisterMessageFile and {$R fclel.res}

Michael Van Canneyt michael at freepascal.org
Sat Feb 16 12:26:27 CET 2013



On Sat, 16 Feb 2013, Reinier Olislagers wrote:

> Hi all,
>
> While adapting some code to use Eventlog I found RegisterMessageFile,
> which the help helpfully explains (it registers the file used by Windows
> to show certain strings in the event viewer).
>
> Decided I liked/needed that and did this:
>
> {$R fclel.res}
> ...
> FLog.RegisterMessageFile('');

That should be ParamStr(0) instead of empty string.

>
> However, on compiling I get a "can't open resource file" error.
>
> Is copying over
> ($fpcdir)\fcl-base\src\win\fclel.res
> to the application directory the best solution?

It is by far the easiest.

Michael.



More information about the fpc-pascal mailing list