I am struggling with the problem of using tinyXML within a DLL. The XML file I want to read has to be in a resource file. However, tinyXML needs the path to the xml file. I haven't found a way to make that work. Did anyone so far try that?
Would be really glad for some information that points me into the right direction.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am struggling with the problem of using tinyXML within a DLL. The XML file I want to read has to be in a resource file. However, tinyXML needs the path to the xml file. I haven't found a way to make that work. Did anyone so far try that?
Would be really glad for some information that points me into the right direction.
In case someone else might be facing the same problem, this seems to do the trick:
HRSRC rsrc = FindResourceA (GetInstance (), "data.xml", "XML");
HGLOBAL src_txt = LoadResource(GetInstance (), rsrc);
char * src_char = (char *) LockResource(src_txt);
TiXmlDocument doc;
bool loadOkay = doc.Parse(src_char);