[Lazarus] Laz trunk+FPC trunk Windows - experiences with help
Reinier Olislagers
reinierolislagers at gmail.com
Tue Jul 29 10:54:53 CEST 2014
On 28/07/2014 17:27, Michael Van Canneyt wrote:
> On Mon, 28 Jul 2014, Reinier Olislagers wrote:
>> On 22/07/2014 08:51, Reinier Olislagers wrote:
> The problem can well be that lhelp needs to be adapted.
Yes, as I said, I agree with that.
In \components\chmhelp\lhelp\lhelpcore.pas (patched with [1] but
shouldn't really matter), if I do
uses
...lazloggerbase, lazlogger...
procedure THelpForm.ServerMessage(Sender: TObject);
var
BytesRead: LongInt;
UrlReq: TUrlRequest;
FileReq: TFileRequest;
ConReq: TContextRequest;
MiscReq: TMiscRequest;
MustClose: boolean=false;
Stream: TStream;
Res: LongWord;
Url: String='';
begin
if fInputIPC.PeekMessage(5, True) then begin
Res := Ord(srError); //fail by default
Stream := fInputIPC.MsgData;
Stream.Position := 0;
FillByte(FileReq{%H-},SizeOf(FileReq),0);
BytesRead := Stream.Read(FileReq, SizeOf(FileReq));
if BytesRead<SizeOf(FileReq) then
begin
debugln('lhelpcore error: expected at least
filereq('+inttostr(SizeOf(FileReq))+' bytes); got '+inttostr(BytesRead));
exit;
end;
case FileReq.RequestType of
rtFile : begin
Url := 'file://'+FileReq.FileName;
Res := OpenURL(URL);
debugln('lhelpcore: got rtfile, filename
'+filereq.filename);
end;
the log shows
lhelpcore error: expected at least filereq(520 bytes); got 0
so seems like an empty message.
HTH,
Reinier
More information about the Lazarus
mailing list