|
I don't know... idiots are everywhere
|
|
|
|
|
zqueezy wrote: Why is the local variable changed (temporarily) but not overwritten?
Don't you need to pass a reference (or a pointer) to a "node" to the Model::TraverseNodes
method if you want the changes to stick?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Well you're damn right!
thanks Man
I didn't think of that!!!!
|
|
|
|
|
Hi thre,
Could anybody tell me what/how is the best way to generate a HeartBeat for a C++ application to check the integrity of the socket connection to another server/client machine?
Thanks for the help
|
|
|
|
|
Check out the socket option "SO_KEEPALIVE" in your help.
Phil
|
|
|
|
|
Unfortunately there is none built-in (at least SO_KEEPALIVE won't give you a very useable solution), you probably want to implement an application specific keep-alive mechanism (e.g. for a faster detection time of dead connections). I can recommend reading the book "Effective TCP/IP Programming" from Jon Snader which discusses this topic among others. A book worth to have on a desk or book shelf not far away from you.
Anyway, I did't want to end the discussion here. One solution that I use in my own software: a timer that triggers sending short amount of data to the clients, in case the connection is down I will receive an error in my OnClose() handler. The timer intervall depends on your requirements, currently I use 120 seconds which gives my application reasonably quick notification.
[answered twice]
|
|
|
|
|
|
Hi thre,
Could anybody tell me what/how is the best way to generate a heartBeat for a C++ application to check the integrity of the socket connection to another server/client machine?
Thanks for the help
|
|
|
|
|
Send data in regular intervals, if the connection is down you will be notified (TCP write operation returns error).
|
|
|
|
|
I've been thinking about selecting a compiler out of many of those out there but cant decide upon. Suggestions?
|
|
|
|
|
<quote>The Codeproject, Your Visual Studio and .NET Resource</quote>
Visual C++ 7.1 mostly, but VC6 some times. i installed VS2005, but can't migrate to it for now
|
|
|
|
|
But what is the difference between VC6, VC7.1 or VS2005 or even .NET for that matter?
|
|
|
|
|
Code2326 wrote: VC6, VC7.1 or VS2005
Kind of obvious; they are different versions.
|
|
|
|
|
You're being a bit terse here aren't you? In response to your comment the question becomes, "what is the difference between the versions?"
Steve
|
|
|
|
|
I did but the second question was a side question. I was asking why use an older version when you can use a newer one with more features etc., thats why i asked why it was different.
|
|
|
|
|
I want to start an independent application with parameters
from my current application.
requirements:
1) Independent appllication should not have relationship with the current application
in the form of starting of application.
2) Application shuold function as it is started by the local user.
3) Many applications requires parameters to run i should able to set that parameters.
4) My application is the table of other applications from where at given time current
application will automatically starts independently with set parameters.
Viral Joshi
|
|
|
|
|
|
|
Try looking at _spawnlp and other spawn functions.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
hi!
How can i start command prompt from the VC application and
how can i give some commands to it.
Viral Joshi.
|
|
|
|
|
something like this ?
::ShellExecute(NULL, "C:\\a folder\\theApplication.exe", "some params here", NULL, NULL, SW_SHOWNORMAL);
-- modified at 14:20 Monday 16th April, 2007
|
|
|
|
|
Thanks for the rely
i ve tried it with following changed but it doesn't work
::ShellExecute(NULL, "C:\\Program Files\\Microsoft Office\\Office10\\WINWORD.exe ", "C:\\BillPrint\\6.doc", NULL, NULL, SW_SHOWNORMAL);
Viral Joshi.
|
|
|
|
|
my bad, i quoted it wrong.
change with this :
::ShellExecute(NULL,
_T("open"),
_T("C:\\Program Files\\Microsoft Office\\Office10\\WINWORD.exe"),
_T("C:\\BillPrint\\6.doc"),
NULL,
SW_SHOWNORMAL);
or even better, this (if word is the application registered with .doc extension) :
::ShellExecute(NULL, _T("open"), _T("C:\\BillPrint\\6.doc"), NULL, NULL, SW_SHOWNORMAL);
|
|
|
|
|
Thanks very much,
The code is working fine.
I am new to VC++ and supporter like you and codeproject makes me better
with every valuable inputs to me.
I really appreciate your valuable time you share for improving this community.
Viral Joshi.
|
|
|
|