But it crash when calling "doc.LoadFile(szBuf)".
...
TiXmlDocument doc;
extern "C" void __declspec(dllexport) LoadFile(HWND hwndParent, int string_size,
char *variables, stack_t **stacktop)
{
...
if (!doc.LoadFile(szBuf))
...
}
If I write like this:
all working fine, but "TiXmlDocument doc" need to be global for other functions.
...
extern "C" void __declspec(dllexport) LoadFile(HWND hwndParent, int string_size,
char *variables, stack_t **stacktop)
{
...
TiXmlDocument doc;
if (!doc.LoadFile(szBuf))
...
}
When I write console application no errors were occupied:
Any suggestions?
...
TiXmlDocument doc;
void loadit();
void parseit();
void saveit();
void main()
{
loadit();
parseit();
saveit();
}
void loadit()
{
...
if ( !doc.LoadFile(szBuf) )
...
}