Guys, partially resolved:<div><br></div><div>(...)</div><div><div>procedure TMainFPWebModule.TFPWebActions0Request(Sender: TObject;</div><div> ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);</div><div>var</div>
<div> VLazarusResourceStream: TLazarusResourceStream;</div><div>begin</div><div> VLazarusResourceStream := TLazarusResourceStream.Create('Image', 'PNG');</div><div> try</div><div> AResponse.Content := CustomTemplate(</div>
<div> 'LSCaptcha', '<img src="data:image/png;base64,' +</div><div> LSStreamToBase64Str(TStream(VLazarusResourceStream)) + '">');</div><div> finally</div><div> VLazarusResourceStream.Free;</div>
<div> end;</div><div>end;</div><div>(...)</div><div><br></div><div>Is there a way to I test if the current project is a CGI module? For example:</div><div><br></div><div>-------</div><div><div>unit LSUtils;</div><div><br>
</div><div>{$I lazsolutions.inc}</div><div><br></div><div>interface</div><div><br></div><div>uses</div><div>{$IFDEF MSWINDOWS}</div><div> DynLibs, Windows, JwaTlHelp32,</div><div>{$ENDIF}</div><div>{$IFNDEF CGIAPP} // Or CONSOLE?</div>
<div> Dialogs, ExtDlgs,</div><div>{$ENDIF}</div><div> LSConsts, LSMessages, SysUtils, Classes, ...</div></div><div>-------</div><br>-- <br>Silvio Clécio,<br><div><span style="font-family:arial"><div><div><span style="font-family:arial"><div>
<b><span style="color:rgb(204, 204, 204)"><span style="background-color:rgb(68, 68, 68)">programmer</span></span></b><span style="font-family:arial"><span style="font-family:arial"><span style="color:white"><span style="color:rgb(204, 204, 204)"><span style="background-color:rgb(68, 68, 68)"> </span></span><b><span style="color:rgb(68, 68, 68)"><span style="background-color:rgb(68, 68, 68)"><span style="color:rgb(106, 168, 79)">ObjectPascal</span></span></span></b></span></span></span></div>
</span></div></div></span></div>
</div>