Guys, partially resolved:
(...)
procedure TMainFPWebModule.TFPWebActions0Request(Sender: TObject;
ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);
var
VLazarusResourceStream: TLazarusResourceStream;
begin
VLazarusResourceStream := TLazarusResourceStream.Create('Image', 'PNG');
try
AResponse.Content := CustomTemplate(
'LSCaptcha', '<img src="data:image/png;base64,' +
LSStreamToBase64Str(TStream(VLazarusResourceStream)) + '">');
finally
VLazarusResourceStream.Free;
end;
end;
(...)
Is there a way to I test if the current project is a CGI module? For
example:
-------
unit LSUtils;
{$I lazsolutions.inc}
interface
uses
{$IFDEF MSWINDOWS}
DynLibs, Windows, JwaTlHelp32,
{$ENDIF}
{$IFNDEF CGIAPP} // Or CONSOLE?
Dialogs, ExtDlgs,
{$ENDIF}
LSConsts, LSMessages, SysUtils, Classes, ...
-------
--
Silvio Clécio,
*programmer* *ObjectPascal*
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus