a server sock s:
a client sock c:
but I can set any address and port that is pass to recvfrom () and recvfrom can receive data from client.;
so recvfrom do not use the parameter address and port ?
recvfrom(s,buf,256,0,(struct sockaddr FAR *)&from,(int FAR *)&fromlength);
I am working on VC++ for a simulation project.
i want to know for what most of the Reasons
Applications developed in VC++ will Crash.
and how to find the crash point for that Application i.e;
how to get into that particular line of code where my application has crashed.
To find the line whre your application crashes you can find out if you build your app in debug mode. At tis time your system will start your debugger at the line your code crashes. But sometimes application crashes only in release therefore you have to insert some debug messages into your code for example Beep or MessageBox. Most crash's causes of not initialized variables therefore you have to initialize all members with valid values.
Why bother using a MAP file? Just build the application with debug info (not a debug build, a release build with debug info). In fact the first changes I make to every project I make is to turn on .PDB generation for release builds.
Is there a way to give a piece of code exclusive access to the CPU without fear of interruption from Windows?
Something similar to a critical section, but across processes -- not just threads. And in user space... not kernel level or anything. If not, I imagine it's for stability reasons... but I figured there'd at least be *something*.
Any help would be very appreciated... thanks!
(I posted this in the Visual C++ because I'm using C to program this...)
Since OS's uses protected mode a program cannot use the processor exclusive (this is not a windows behavior). The function EnterCriticalSection can be used to protect code from reentering in another thread not for exclusive execution on the processor.