473,396 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with ISAXXMLReader in VS 2003 C++

1
I have followed the Sax2 JumpStart example (http://msdn2.microsoft.com/en-us/library/ms994335.aspx), to implement a xml Parser in my project. The projects uses DirectX to create a device and use it, and a console to show a log (the console only works in debug).

The parser works well, but when in close my application, the device closes correctly, but the console remains opened. Commenting the parser solves the problem. In release the application closes completely without problems.

I was wondering if the ISAXXMLReader i use, could be leaving something in memory, altough it is strange that in realese it works correctly. Is this normal? Should I really worry about this? It is really annoying to not be able to close the application correctly in debug.

The code that calls the parser is this:

bool CargadorMapasXML::parseaMapa(const char * nombreMapa, logica::Nivel *nivel, gui::NivelGui *nivelGui, EFlagParseo flag)
{
//We initiliaze the com
CoInitialize(NULL);
ISAXXMLReader* pRdr = NULL;

HRESULT hr = CoCreateInstance(
__uuidof(SAXXMLReader),
NULL,
CLSCTX_ALL,
__uuidof(ISAXXMLReader),
(void **)&pRdr);

//If it has not failed
if(!FAILED(hr))
{
try
{
//We create the handler and assign it to the reader
MapaXMLHandler * pMXH = new MapaXMLHandler();
hr = pRdr->putContentHandler(pMXH);

//Some information the handler needs
pMXH->setNivel(nivel);
pMXH->setNivelGui(nivelGui);
pMXH->setFlag(flag);

//Convert the name of the mpa to "static wchar_t"
static wchar_t URL[1000];
mbstowcs( URL, nombreMapa, 999 );
//#ifdef _DEBUG
//wprintf(L"\nParsing document: %s\n", URL);
//#endif

//We parse it
hr = pRdr->parseURL(URL);

//Free the reader
pRdr->Release();

//Destroy the reader
delete pMXH;
}
catch (int e)
{
return false;
}
}

if (FAILED(hr))
return false;

CoUninitialize();
return true;
}
Jan 22 '08 #1
0 1469

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Stephan & Saori | last post by:
I found a "weird" problem running windows 2003 Server. Maybe it's a know problem but I just wanted to make sure everyone knows. When running explorer to find the directories on my hard disk. It's...
5
by: Dave | last post by:
I am working with a proprietary database that records the date, time, location, and speed of a vehicle. It is pulling this information from GPS unit tied to a vehicle. The table is populated with...
5
by: Clifford W. Racz | last post by:
Has anyone solved the issue of translating lists in Word 2003 (WordML) into xHTML? I have been trying to get the nested table code for my XSLT to work for a while now, with no way to get the...
1
by: Rafael Campana | last post by:
Hi, I posted the messsage below last week, but no replies, I've reproduced the problem with a VB macro, just create one and paste the following code. Let me know of any workarounds you can...
2
by: Andrew Rawnsley | last post by:
Downloaded the eRServer 1.2 source (thanks, guys) and installed, and am having a problem. Anyone else dug into this yet? Situation: PG 7.3.4 on linux (master) Its been tried with 3 slaves,...
4
by: Developer | last post by:
CoInitialize(NULL); ISAXXMLReaderPtr pReader = NULL; CHR(pReader.CreateInstance(__uuidof(SAXXMLReader))); A1ContentHandler * pA1ContentHandler = A1ContentHandler::CreateInstance();...
6
by: FS Liu | last post by:
Hi, In my current ATL server project, I have to parse the input in the client application's request to find out the different combination of parameters, instead of using SOAP. For this reason,...
2
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.