?
Solved

Visual Basic WInsock Api..... "recv" is receiving zero bytes and zero data from my server..... the send works good!

Posted on 2003-03-12
5
Medium Priority
?
542 Views
Last Modified: 2013-12-25
IN a Visual Basic 6.0, Winsock API I was able to connect and send data to the server...... But my "recv" statement is getting zero data back from the server and zero bytes back! I was able to talk the server analyst and he verified that he was getting my request in and sending back data. But my "recv" couldn't see the data sent back! Any ideas? I verified the arguments in the "recv" and the data types.

Thanks

  Dim nFlags As Long
  Dim getData As String
  Dim ictr As Long
  ' s is an integer set with proper socket id
  nFlags = 0
 
  dwBytes = recv(s, ByVal getData, Len(getData), nFlags)
0
Comment
Question by:synrdyne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Expert Comment

by:Rajmafia
ID: 8126430
By the way how r u passing ur data? is it just a string message or from some kind of database??? it really matters how u r passing over/getting back. In some cases, it might NOT be the same.. Be specific a bit. maybe i could help u..
0
 

Author Comment

by:synrdyne
ID: 8136759
Thank you for your interest. I found that my recv buf area was defined correctly. I needed to give it a large allotment. Rick
0
 

Author Comment

by:synrdyne
ID: 8136768
Thank you for your interest. I found that my recv buf area was defined IN-correctly. I needed to give it a large allotment. Rick
0
 

Accepted Solution

by:
synrdyne earned 0 total points
ID: 8136790
Here it is.
Thanks
Rick

RetMsg = String(1000, 0)
   dwRc = recv(s, ByVal RetMsg, 1000, 0)
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9053243
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->PAQ - with points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 13 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question