[Lazarus] Web Module not works on Linux
silvioprog
silvioprog at gmail.com
Sat Nov 20 15:14:41 CET 2010
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*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20101120/e0342a35/attachment-0003.html>
More information about the Lazarus
mailing list