|
Check the return value from ReadFile() and the value of dwBytesRead to determine when EOF has been reached. GetLastError() may also return ERROR_HANDLE_EOF .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
Does anyone know the commands to execute CreateProcess, so that the command window is hidden
im currently running
if(CreateProcess(sPath,lpszBuf, 0,0,FALSE,CREATE_DEFAULT_ERROR_MODE, 0,0, &siStartupInfo,&piProcessInfo) == FALSE)
thanks
simon
|
|
|
|
|
Doens't initialing STARTUPINFO-->wShowWindow with SW_HIDE helps you ?
|
|
|
|
|
prasad_som wrote: Doens't initialing STARTUPINFO-->wShowWindow with SW_HIDE helps you ?
i have tried that it didnt work for me, perhaps im calling it in the wrong place ??
STARTUPINFO siStartupInfo;
PROCESS_INFORMATION piProcessInfo;
siStartupInfo.wShowWindow = SW_HIDE;
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
siStartupInfo.cb = sizeof(siStartupInfo);
if(CreateProcess......
any ideas ??
|
|
|
|
|
si_69 wrote: memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
You should call this before assigning values to structure.
|
|
|
|
|
prasad_som wrote: memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
You should call this before assigning values to structure.
i have tried placing
siStartupInfo.wShowWindow = SW_HIDE;
before and after that, but still the same
|
|
|
|
|
si_69 wrote: siStartupInfo.wShowWindow = SW_HIDE;
You need to use StartUpInfo.dwFlags to make it effective,
StartUpInfo.dwFlags = STARTF_USESHOWWINDOW;
StartUpInfo.wShowWindow = SW_HIDE;
|
|
|
|
|
si_69 wrote: PROCESS_INFORMATION piProcessInfo;
siStartupInfo.wShowWindow = SW_HIDE;
Why use Initialize before memset
|
|
|
|
|
Hi all,
I need to be parse the XML file. So, please send any light weight XML parser library in Visual studio 2005.
Already I have been tried one XML parser. But there is some memory problem would arrive whenever run my application. The name of that one is "Apache's Xerces C++ Parser" by Fengjun Lv.
Thanks in advance
|
|
|
|
|
|
CMarkup [^] in an alternative to the TinyXML mentioned above.
The memory problem with Xerces is in your code?
Or are you working on a very small (128K RAM) machine?
"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 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
|
|
|
|