03-26-2008 08:46 AM
03-26-2008 08:53 AM
Sorry, the post was sent before I had finished it.
I am trying to use the "void *callbackData" parameter to hold the value that was passed in that parameter in ConnectToTCPServer.
I have not been successful. It appears that callbackData always contains the same values (junk?) no matter what value I pass in ConnectToTCPServer.
Has anyone ever successfully used the callbackData parameter?
03-26-2008 11:55 AM
You need to make sure that your variable test is not a local variable. Because if it is, then the address that you're storing in the callback data is just a stack address that will become invalid as soon as the function in which you connected to the server exits.
If you're already using a global variable, then let me know, and we'll see if we can investigate further.
Luis
03-26-2008 12:48 PM
Thanks Luis. You are correct. My normal variable is global, but the test variable I experimented with was not. That took care of my problem.
Thank you very much. I appreciate your help.