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);



Which brings me to another question :)
When using a dll, there are many functions / operations which require access via LCL - therefore syncing necessary
Is there any way to 'sync' without using another thread ?
As a (possibly bad) example, the only part of the above code that seems to need sync is the 'appendchild' line.
How to 'sync' just this function, not the complete code block
(have other examples if necessary)

Thanks

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to