|
Question: How to I Debug a class that lockup during runtime usng the debug function in MS VS 6.0? At the "Start Debug" option there are "GO", "Step Into" and "Run Cursor".
I tied to click on the Go option and get a message saying the the FileName.exe not found. Although the project was complied without any errors.
Thanks!
|
|
|
|
|
you could start your DEBUG application directly from explorer and use the "attach to process" (if that existed in VC6) to start debugging it. Watched code never compiles.
|
|
|
|
|
Thanks, I can now run the debuger and see the error log bellow. How will I know which part of the code the application locks up? The step into is grayed out once the debuger startes. The logs dont really tell you where it locks up in the code It show the dll that are beening loaded at runtime.
Thanks again.
|
|
|
|
|
If I don't remember bad, when you are debugging you can press F11 and it will go deeper into the calls and code that it is being called although it may be not your own code (for instance the MFC code). In other words, if you run debugger with F10 you stay in the same class getting the return of a function but if you use F11 you get into the called function.Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
WSADATA wsd;
SOCKET cs = INVALID_SOCKET;
char ref[512];
char rb[512];
int iResult, ires, recvbuflen;
struct sockaddr_in sin;
char ctrl[3] = {'\r','\n','\0'};
string str;
str="";
iResult = WSAStartup(MAKEWORD(2,2), &wsd);
if(iResult!=0) { alert("Cannot init Winsock"); return; }
cs = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = inet_addr("127.0.0.1");
sin.sin_port = htons(27015);
bind(cs,(SOCKADDR *)&sin, sizeof(sin));
BOOL optval = TRUE;
int bOptLen = sizeof(optval);
int sokres = setsockopt(cs,SOL_SOCKET,SO_REUSEADDR, (char *)&optval,bOptLen);
txtMeans.setText("waiting...");
listen(cs,1);
int aks = accept(cs,NULL,NULL);
do {
ires = recv(cs,rb,512,0);
if(ires>0)txtMeans.setText(rb);
else if(ires==0)txtMeans.appText("Connection Closed");
else {
txtMeans.appText("Receive failed");
recvbuflen = WSAGetLastError();
getes(recvbuflen);
if(SOCKET_ERROR==ires)alert("yes");
alert(rb);
}
}while(ires>0);
closesocket(cs);
WSACleanup();
txtMeans.appText("Doni");
This is blocking and listening in the specified port...
i created another app which connects to that port and sends data.
as soon as the data is sent i the recv does its work and i get -1 but when i checked for
last error using wsagetlasterror it returns zero. then how am i supposed to find the problem?
for ease i created the sender using PHP by having appache in localhost
$cs = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
socket_connect($cs,'127.0.0.1',27015);
socket_write($cs,"hehehe");
socket_close($cs);
txtMeans is a wrapper to a multiline edit control
alert and pint are wrappers for msgbox
to be precise i run this program... it listens to that specified port.
blocking mode. then i run my php program it connects to that ip,port it sends the data
here in the server i get the alert like i have stated above.
-1 is returned but wasgetlasterror returns zero which mostly not supposed to.Today's Beautiful Moments are
Tomorrow's Beautiful Memories
modified on Monday, February 22, 2010 12:29 PM
|
|
|
|
|
I think you should be using recv on the "aks" socket returned from accept
|
|
|
|
|
haha, yes, exactly. thank you.
just now i found that and i was about to rejoice here to tell people that i made a little [misteyk]. now it is working. i should have refreshed the codeproject page so that i would have found the reply earlier and would have saved the time... Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
i want to know the code to add image in my c++ program
|
|
|
|
|
Where in your application ? on a button ? as the background of a dialog ? as a background of a CView derived class ?
Do you know how to load an image ?
Do you know how to display an image (in general)?Watched code never compiles.
|
|
|
|
|
|
How can i support MFC OLE drag and drop with image between two windows?
|
|
|
|
|
...with an aplication's mouse cursor[^]
|
|
|
|
|
|
when i change the digit substitution from "Control panel>Regional and Language Options>Regional Options>Customize" in (win xp), to "Natinal", all the numbers of my program change to other language.
How should i prevent changing the numbers of my program or how should i change the "digit substitution" to "Context" in mfc?
|
|
|
|
|
|
|
Hi all,
i m working on SMS sending application using AT commands.
for sms sending send +CMGS command than it return > to enter message,now this time if i stop the sending process,and than if i send message again from starting when i connect the port its return >.
please tell me how can i clear the previous command value,and fresh start for each new msg sending process.
thanks in advance.
|
|
|
|
|
Your question is not clear, can you try to explain again, or post some code to show what is not working? If you are just having trouble with the 'AT' commands themselves then you need to check your syntax is correct. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
I mean what command can i use for reset.
|
|
|
|
|
One of these[^] should have the answer you need. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
My problem is that.
i m sending cmgs command
AT+CMGS="+91986857485"<cr>
than it return ">"
here process is stop without completing the last command.
when again i want to communicate starting from sending AT command.
its return here also > instead of OK.
i want when i stop the process or whether start new process its start from initial.
so i want to reset this.
please help me for this.
thanks.
|
|
|
|
|
Le@rner wrote: i m sending cmgs command
AT+CMGS="+91986857485"
I don't see this command in the modem command set anywhere. I suggest you follow the link I gave you earlier, or consult the documentation for your modem to see what is the correct format.txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Sir +CMGS is command to sending sms.
|
|
|
|
|
It's waiting for you to enter the data to send. That's what the > prompt means. Enter the data then use ^Z to end the input. It should then execute the command, display a return status and return to the waiting for next command state
JudyBe wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
Hello Friends
I am using visual Studio 2008 .net for creating c++ application on windowsXP but now I have to migrate our project in Linux.
Can u Please suggest me that which enviorement is suitable and professional to run application in Linux.
I saw on Internet and they suggest "Use the Visual Studio .NET IDE and Grasshopper to Deploy .NET Apps on Linux!" I hv no idea abt even GrassHopper and Is tht much for professionals?
Please suggest me something so I can proceed.
Thanks In Advance.
Regards
Yogesh Sikri
|
|
|
|