Code: Select all
<files>
<file src="1.jpg" />
<file src="2.jpg" />
</files>
Code: Select all
wxStringInputStream sis(msg);
wxXmlDocument doc(sis);
wxXmlNode *root=doc.GetRoot();
wxXmlNode *group = root->GetChildren();
while(group)
{
wxXmlNode *child = group->GetChildren();
while(child)
{
char fbuf[1024];
//wxFile code start
wxString imgsrc=friends->GetAttribute(wxT("src"),wxT(""));
wxFile fl;
fl.Open(imgsrc);
fl.Read(fbuf,fl.Length());
fl.Close();
//wxFile code end
child=child->GetNext();
}
group=group->GetNext();
}
However,if I comment the wxFile codes, it can runs correctly, can somebody tell me how to resolve this problem?0xC0000005: Access Violation.