Home > Back-end >  Error reading XML file in the DLL
Error reading XML file in the DLL

Time:10-08

A read the XML file function in exe can perform well.
To COPY the function to a DLL file, use another program calls will die there.
In debugging problems found in the statement of 3 and 5

1 xDocument:=TXMLDocument. Create (nil);
2 xDocument. FileName:=a3xmlFileName;

3 xDocument. Active:=true;
4 messagedlg (' ABC 'mtwarning, [mbyes], 0).//randomly pop up a dialog box, and then close the dialog box procedure was no problem
5 rootNode:=xDocument. DocumentElement;//if hang line 4 commented out here have a problem in
6 nodelist:=rootNode..childnodes;


Who knows what reason be.

CodePudding user response:

Bold guess: dialog can do? Here it is the only thing that can think of is, delay, I think it is the XML loaded to a period of time!

CodePudding user response:

Using sleep tried, also not line.
XML file is small, the five elements.
If put this function in an exe file is no problem at all.

CodePudding user response:

XDocument this variable how to define the building Lord you please! Don't defined as TXMLDocument but is defined as: IXMLDocument

CodePudding user response:

Can debug DLL

CodePudding user response:

Into other process to debug

CodePudding user response:

This is very simple! Cannot use TXMLDocument, need to use IXMLDocument
Use TXMLDocument. Create (nil); Must be wrong!

It is ok that is defined as the IXMLDocument

CodePudding user response:

Out what??

CodePudding user response:

Could it be address pointer problem? You can check the building Lord, I have made such mistakes,
  • Related