error occurs with fpc 2.2.1, works ok with 2.0.4
I was thinking possible threading in relation to LCL access?
I have since found that the same code in the dll works ok if I call it
from a syncronised function in the main app.
Sergei Gorelkin wrote:
SteveG wrote:
Could anyone tell me why the following code fails within a dll?
Worked ok with Laz 9.14, but no longer with Laz 9.23 (WindowsXP)
The same code works fine out of the dll - seems to want to sync with
LCL thread I guess?
> Access Violation at the 'doc.Appendchild(N);' line
>
> var doc :TXMLDocument;
> N :TDOMNode;
>
> doc := TXMLDocument.create;
> N := TDOMNode.create(doc);
> N := doc.CreateElement('root');
> doc.Appendchild(N);
> writeXMLFile(doc, 'C:\Test.xml');
> FreeAndNil(doc);
>
It's hardly a threading issue, because XML package does not use
threading in any way.
What version of compiler do you use, 2.0.4 or 2.2.0?
Sergei
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives