|
-
May 5th, 2007, 02:49 PM
#1
Thread Starter
Addicted Member
[HELP NEEDED] Socket + UDT + CopyMemory...
I'm having some serious problems using CopyMemory to receive data from a socket... and a true solution is becoming more and more urgent... I have to receive from a socket a series of message types, each one with different variable types (done in C).
Currently I use a static byte array (static because some of the messages are rather large and arrive in several packages), and once I know I've received the whole message I use copymemory with a UDT, and treat it...
The thing is the net where it's working seems to have some serious problems, and the messages end overlaping and sometimes CopyMemory makes my program to wholy crash...
While now what I do is using another static variable so if I'm already receiving some data the next package waits till the end, but then if some DoEvents enters in action the wait is skipped and the program may crash anyway... Also, the messages don't have some start chain per se...
Please, I'd love to receive some help. Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|