|
Hi jhwurmbach,
Now my machine has 256MB ram.I think problem should be from my code.
1. My application is some times work properly that is only when i rebuild my application and then run my application, Xerces gives a correct solution.
2. But,when i compile my App.. and then run my App.., only one or two value of attributes would be displayed,then "can't read memory location 77oxx8...Reading voilation.." will be displayed.
what is problem actually...
|
|
|
|
|
surezu wrote: can't read memory location
In what function are you in at that time? Yours, or a Xerces function?
What is the last entry of the call stack you are recognizing as your code?
Very probably the error is there or a few steps "upstream".
You are not using delete on the pointers you get? You are correctly using release() as written here[^]?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hi,
Now i am following below link,
http://vipbase.net/xmlparser/[^]
There is give one example XML file, i can't get result even given example file. the same problem would arrive....
|
|
|
|
|
OK. You've even got a tutorial there. Maybe there is a problem with the Xerces Parser? Which VC++ version are you using?
Or maybe the XMLparser code is wrong?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Currently i'm using visual studio 8.
XercesParser giving good result, but sometimes it has been give the same error. Can you see that the XmlParser.cpp file, there is didn't delete the CXMLParser object in parese function.It's OK tell me your opinion.
|
|
|
|
|
surezu wrote: Currently i'm using visual studio 8.
With a XMLParser designed for VC6? Recommending a Xerces dating from 2003?
Hmm.
OK, I got the source here, but its not running due to the ancient old Xerces wanting some stuff from VC6.
Even the CXMLParser-part did not compile, as the author relied on VC6 deviations from the standard.
surezu wrote: Can you see that the XmlParser.cpp file, there is didn't delete the CXMLParser object in parese function.It's OK tell me your opinion.
Thats OK, because in the destructor of CXMLParser , first the Xerces parser member mParser is deleted, and subsequently XMLPlatformUtils::Terminate();
is called. Xerces is correctly shut down.
What exactly is going wrong?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
yah, some times it's bring good results when i run my application at first time but after that it will bring error ie.
1) "The instruction at "0x7c93..." referenced memory at "0x000000..". The memory couldnot be read.
2) The exeception unknown software exception (0xc0...)occured in the application at location 0x7c....
|
|
|
|
|
Where? Where in your Code?
I am asking this for the third time now!
You really need do debug your application and post the results!
Somewhere, somehow, there is a NULL-Pointer dereferenced.
Failure is not an option - it's built right in.
|
|
|
|
|
Sorry, i have used other one so..... sorry
|
|
|
|
|
|
when you add functions via class wizard you end up with
afx_msg void OnCalc();
if you want to add a function that does the same thing for several different control items on the dialog, instead of repeating code in several of the class wizard defined functions, do you just add it before the protected section of the class definition and without the afx_msg prefix (will look into what this does, is it some way that MFC keeps track of its own stuff?)
ie
void DoSomething();
so that you can call DoSomething in several different control item updates/key presses etc..
|
|
|
|
|
|
Have a look at ON_CONTROL_RANGE[^], an event handler for multiple control IDs.
Regarding afx_msg : this is only a prefix, but should be kept for portability reasons.
MSDN says: ClassWizard requires that you use the afx_msg keyword in your message map handler declarations.
You won't get any errors if you should omit afx_msg .
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
ldsdbomber wrote: ...is it some way that MFC keeps track of its own stuff?
Yes, its simply a marker that ClassWizard uses. The compiler doesn't even see it.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello !
I have a standard Win32 List View Control that uses two image lists, one for the item icons and one for the state image icons. Everything is working smooth and correct with all items.
My control does not need an item icon for the first column at all, only the state icons. However, I cannot seem to find a way to actually remove the item icons. If I set the item icon index to -1, then no icon is displayed, but the item is still indented inwards by the width of the icon. Setting the iIndent variable to a negative value does not solve the problem.
Any suggestions ? How can I tell the List View that the first column only uses state icons, and that each item in the first column should only be indented once to allow putting a state icon there, if necessary ?
- Antti Keskinen
------------------------------
Programming Windows is like
a box of assorted chocolates.
You never know what you're
going to get.
|
|
|
|
|
Hi
All
I am developing project in VC++ 6.0 and I want to use log file in my application, so this file to be create and how it use in project.
Thnaks
Atool
Atool
|
|
|
|
|
Hi
You can use the function below which opens a log.txt in your exe's local folder and writes whatever message you pass thro it . Its also threadsafe . If your application is single threaded then remove CSingleLock stuff ...
if flag is 0 then 'msg' is written to log only and not printed in console . If you want to do both - then pass flag =1...
int WriteMessage(CString msg,UINT flag){
int ret=0;
CSingleLock sLock(&sec);// remove this if your app is single threaded..
sLock.Lock();//remove this if your app is single threaded..
TRY
{
ret=logfile.Open("log.txt",CStdioFile::modeWrite );// try opening log.txt
if(ret==1)// if succeeded
{
logfile.SeekToEnd();//go to end of log file
CTime t = CTime::GetCurrentTime();// time stamp stuff
CString tim=t.Format("%m/%d/%Y %H:%M:%S : ");
tim=tim+msg+"\n";
logfile.WriteString(tim);//write to log with the message passed thro "msg"
logfile.Close();//close the file
if(flag)
{
cout<<tim.getbuffer(4098)<<endl;
tim.releasebuffer();
="" }
=""
="" catch(="" cfileexception,="" e="" )="" handle="" exceptions
="" {
="" #ifdef="" _debug="" cout="" <<="" "file="" could="" not="" be="" opened="" "="" e-="">m_cause << "\n";
#endif
}
END_CATCH
sLock.Unlock();//remove this if your app is single threaded..
return ret;
}
redindian
|
|
|
|
|
Hi
Dharani Thanks for help, but in your code you use logfile object to call WriteString and close(), so how this LogFile object, It belongs to which class?
Thanks
Atool
Atool
|
|
|
|
|
You can use std::basic_fstream for creating a log file. You can use open(), write() etc to write to the file. If multiple applications will use the log file, use some synchronization objects, for eg: Mutex.
|
|
|
|
|
|
|
Hello together,
this is very basic question. I am trying to write an MFC Application
that will take advantage of the automation features of Excel (NOT an add-in with vsto).
Now here is the poblem:
I have created a basic MFC application using the wizard. That worked fine.
Next step I added a MFC typelib class. I picked Microsoft Excel11 from registry.
Whenever I try to include the generated header files ( Worksheet, Workbook, ...)
and work with them the code will not compile. I get hundreds of errors from file
excel.tlh. And this one is automaticcaly generated.
I eliminated most of the warnings (by renaming, e. g. the "RGB" macro after the
#import statement). Though the 'excluding IFont' is still there.
I have also read a few tutorials and they almost all used the same approach
as I did. Am I missing something? Does anyone else have encountered similiar
problems?
Does anyone have a sample solution for VS2005? I found one
for VC6 but to get it to compile I had to 'hack' the afxmsg_.h file (yes, its a build in
system file for VS). I would prefer a 'clean' solution.
Please help.
Thanks in advance!
|
|
|
|
|
|
DFGM,N!
I've already exhausted that option.
|
|
|
|
|
Hai,
can anyone tell me what is the real problem in implementing malloc here
bmpsrc = (U8 *) malloc(bmpsize);
memset(bmpsrc, 0xff, 5);
Thanks
Harshadha
|
|
|
|