Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: sscanf: parsing a file Pin
Tim Craig27-Mar-10 8:13
Tim Craig27-Mar-10 8:13 
AnswerRe: sscanf: parsing a file Pin
David Crow26-Mar-10 4:47
David Crow26-Mar-10 4:47 
QuestionAdler32 Algorithm Doubts Pin
rupeshkp72825-Mar-10 23:42
rupeshkp72825-Mar-10 23:42 
QuestionRe: Adler32 Algorithm Doubts Pin
CPallini26-Mar-10 1:09
mveCPallini26-Mar-10 1:09 
AnswerRe: Adler32 Algorithm Doubts Pin
tom groezer26-Mar-10 1:38
tom groezer26-Mar-10 1:38 
GeneralRe: Adler32 Algorithm Doubts Pin
CPallini26-Mar-10 1:44
mveCPallini26-Mar-10 1:44 
AnswerRe: Adler32 Algorithm Doubts Pin
rupeshkp72828-Mar-10 19:19
rupeshkp72828-Mar-10 19:19 
QuestionWxWidgets question about wxFileSystem and wxFSFile Pin
brdavid25-Mar-10 21:28
brdavid25-Mar-10 21:28 
I posted this in the XML forum but now this is definitely a code question.

In the following code using wxWidgets I am trying to access a file inside a zip archive. As you see I have the archiveURL variable set and pass that OpenFile() method.

[code]
wxString archiveURL = _("file:/C:/RM-XML.zip#zip:RM-XML/Attacks.xml");
wxFileSystem* fileSystem = new wxFileSystem;
wxFSFile* file = fileSystem->OpenFile(archiveURL);

if (file)
{
wxInputStream* stream = file->GetStream();
wxXmlDocument xmlFile;
xmlFile.Load(*stream);
if(xmlFile.IsOk())
wxMessageBox(_("Did open xml File"));
else
wxMessageBox(_("Did Not open xml File"));
}
[/code]

The issue is with the variable file. It's corrupted or something because the if(file) comes back false and if I try to access it file->GetLocation() I get a delayed crash after about 7 seconds. I'm pretty sure the zip file is okay and I can use Windows explorer to get the file if I copy and paste the archiveURL string (without the #zip: into the search bar. So I'm stumped. Not sure how to proceed in fixing the variable file. Any ideas?

Thanks!

AnswerRe: WxWidgets question about wxFileSystem and wxFSFile Pin
Stuart Dootson25-Mar-10 21:54
professionalStuart Dootson25-Mar-10 21:54 
GeneralRe: WxWidgets question about wxFileSystem and wxFSFile Pin
brdavid26-Mar-10 0:26
brdavid26-Mar-10 0:26 
Questionlocalization issue Pin
Member 59031025-Mar-10 21:27
Member 59031025-Mar-10 21:27 
AnswerRe: localization issue Pin
KarstenK25-Mar-10 22:47
mveKarstenK25-Mar-10 22:47 
GeneralRe: localization issue Pin
Member 59031025-Mar-10 23:26
Member 59031025-Mar-10 23:26 
GeneralRe: localization issue Pin
Eugen Podsypalnikov25-Mar-10 23:35
Eugen Podsypalnikov25-Mar-10 23:35 
GeneralRe: localization issue Pin
Member 59031025-Mar-10 23:54
Member 59031025-Mar-10 23:54 
GeneralRe: localization issue Pin
Eugen Podsypalnikov26-Mar-10 0:03
Eugen Podsypalnikov26-Mar-10 0:03 
GeneralRe: localization issue Pin
Member 59031026-Mar-10 0:06
Member 59031026-Mar-10 0:06 
Questionrun under CScript Pin
john563225-Mar-10 20:37
john563225-Mar-10 20:37 
AnswerRe: run under CScript Pin
Richard MacCutchan26-Mar-10 0:29
mveRichard MacCutchan26-Mar-10 0:29 
QuestionRe: run under CScript Pin
David Crow26-Mar-10 4:54
David Crow26-Mar-10 4:54 
QuestionMigrate a dll from 32bit to 64bit OS Pin
002comp25-Mar-10 20:02
002comp25-Mar-10 20:02 
AnswerRe: Migrate a dll from 32bit to 64bit OS Pin
«_Superman_»25-Mar-10 21:00
professional«_Superman_»25-Mar-10 21:00 
GeneralRe: Migrate a dll from 32bit to 64bit OS Pin
002comp25-Mar-10 22:16
002comp25-Mar-10 22:16 
GeneralRe: Migrate a dll from 32bit to 64bit OS Pin
«_Superman_»25-Mar-10 22:19
professional«_Superman_»25-Mar-10 22:19 
GeneralRe: Migrate a dll from 32bit to 64bit OS Pin
002comp26-Mar-10 1:39
002comp26-Mar-10 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.