Hi fellow developers I have a slight problem when compiling the custom rF2 plugin x64 for my live timing app. Changed all the linking libraries to x64 and it compiles ok. However, the x64 version is crashing :/ When I debug it, it crashes on this line: memcpy(&sad.sin_addr, ptrh->h_addr, ptrh->h_length); Below is the error screen shot. When compiled 32 bit all works well. My C++ knowledge is very limited and I can't figure out what is wrong. Thanks! View attachment 13699
If you use gethostbyname function. This function is obsolete and will not provide the result in your ptrh struct in 64bit. So your memcpy will fail as the pointer is invalid. Look at my two turorials Send UDP trame and receive UDP trame. http://isiforums.net/f/showthread.php?p=286432 http://isiforums.net/f/showthread.php?p=286528