Socket programming error MFC
-
Hi I am doing network programming in MFC. Problem is that i am trying to send a buffer to server using send(...) function. But there is an error. When i use WSAGetLastError() to check error code, it gives error code 0. Please can anyone tell me where can problem lie. Thank you We Believe in Excellence www.aqueelmirza.cjb.net
-
Hi I am doing network programming in MFC. Problem is that i am trying to send a buffer to server using send(...) function. But there is an error. When i use WSAGetLastError() to check error code, it gives error code 0. Please can anyone tell me where can problem lie. Thank you We Believe in Excellence www.aqueelmirza.cjb.net
Aqueel wrote:
Problem is that i am trying to send a buffer to server using send(...) function. But there is an error.
And that error would be what?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
Aqueel wrote:
Problem is that i am trying to send a buffer to server using send(...) function. But there is an error.
And that error would be what?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
Yah i just wanted to know that in which scenerio, 0 is returned. what can be problem? I went on msdn. There is a list of error codes. But they are lables not integer values. How can i determine this one. Thank you We Believe in Excellence www.aqueelmirza.cjb.net -- modified at 10:33 Wednesday 7th June, 2006
-
Hi I am doing network programming in MFC. Problem is that i am trying to send a buffer to server using send(...) function. But there is an error. When i use WSAGetLastError() to check error code, it gives error code 0. Please can anyone tell me where can problem lie. Thank you We Believe in Excellence www.aqueelmirza.cjb.net
if it is a network related error u will definitely get the error code. check your code first. i think there should have some problems with your code. r u using multiple threads? CSocket is designed to serve for per thread basis. if u r creating a sample application. follow the steps provided in MSDN. for the basic implementation, u can try with the sample code provided in MSDN SaRath.
"Don't Do Different things... Do Things Differently..." Understanding State Pattern in C++ -
Yah i just wanted to know that in which scenerio, 0 is returned. what can be problem? I went on msdn. There is a list of error codes. But they are lables not integer values. How can i determine this one. Thank you We Believe in Excellence www.aqueelmirza.cjb.net -- modified at 10:33 Wednesday 7th June, 2006
Aqueel wrote:
There is a list of error codes. But they are lables not integer values. How can i determine this one.
Have you looked in
winerror.h
?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
Yah i just wanted to know that in which scenerio, 0 is returned. what can be problem? I went on msdn. There is a list of error codes. But they are lables not integer values. How can i determine this one. Thank you We Believe in Excellence www.aqueelmirza.cjb.net -- modified at 10:33 Wednesday 7th June, 2006
-
After you obtained the error code with "
DWORD error = WSAGetLastError();
" and stopped the program at a breakpoint, you can see a textual description of the error by adding the following value to Watch panel or QuickWatch window: "error,hr".Sorry i debugged it and saw that error code is 183. What is that? We Believe in Excellence www.aqueelmirza.cjb.net
-
Sorry i debugged it and saw that error code is 183. What is that? We Believe in Excellence www.aqueelmirza.cjb.net