Original Post
Ok, so i have a SAXXML parser I made. I use it on one computer and it works just fine. Every time. I bring the EXACT code over to a separate computer and its new purpose is apparently to curl into a ball and whimper before promptly dying. Causing an memory reading exception. The computers have the same version of .NET, the same OS, the same code, totally different result. I never get to parse the file or even load it as the reader is broke. The code below is where i break:
void CXMLParser::LoadXMLMap(char *szFile)
{
ISAXXMLReader *pReader = NULL;
wchar_t wcBuffer[1024];
// COM Setup
CoInitialize(NULL);
CoCreateInstance(__uuidof(SAXXMLReader40), NULL, CLSCTX_ALL, __uuidof(ISAXXMLReader), (void**)&pReader);
pReader->putContentHandler(this); //ON THIS LINE IS WHERE I CRASH!!
// Build wchar string of file and start parsing
mbstowcs(wcBuffer, szFile, 1023);
pReader->parseURL(wcBuffer);
pReader->Release();
CoUninitialize();
}
I crash because pReader is NULL after it was just "created" so CoCreateInstance() is clearly failing in its one purpose. Anyone have any idea as to what I could be forgetting to do(which is most likely the case) or maybe something I may have overlooked? Any help is greatly appreciated.