[Lazarus] TLazIntfImage GetDataLineStart
theo
xpde at theo.ch
Sat Jul 17 23:07:59 CEST 2010
To make the file sharable at Windows you need to apply this patch to
lcl proc (and eventually rebuild LCL and Lazarus):
After that any program can read/write to the logging file
Index: lclproc.pas
===================================================================
--- lclproc.pas (revision 26528)
+++ lclproc.pas (working copy)
@@ -2051,6 +2051,8 @@
Result := ExpandFileNameUTF8(Result);
end;
+var
+ fm: Byte;
begin
DebugText := nil;
DebugFileName := GetDebugFileName;
@@ -2058,11 +2060,19 @@
(DirPathExists(ExtractFileDir(DebugFileName))) then begin
new(DebugText);
try
+ fm:=Filemode;
+ FileMode:=fmShareDenyNone;
Assign(DebugText^, DebugFileName);
if FileExistsUTF8(DebugFileName) then
Append(DebugText^)
- else
+ else begin
Rewrite(DebugText^);
+ // recreating the file to be sharable!
+ Close(DebugText^);
+ Assign(DebugText^, DebugFileName);
+ Append(DebugText^)
+ end;
+ Filemode:=fm;
except
Freemem(DebugText);
DebugText := nil;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lclproc.patch
Type: application/octet-stream
Size: 910 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100717/988c84fd/attachment-0004.obj>
More information about the Lazarus
mailing list