I have a source written in C that uses a lot of sender and socket listener calls, and then a few working functions. The socket is multicast as well as uni cast.
It has many read operations. I compiled it using cygwin, generated exe, and it worked fine on all window options. Meanwhile, when I generated a dll from the same and tried to use it in C # via DLLimport, it works fine until it reaches the next line
if((sendFd = socket(AF_INET,SOCK_DGRAM,0)) < 0)
Visual studio gives an error message:
Attempt to read write protected memory, or other memory is corrupt.
Without all the socket files or fork (), it works just fine, performing basic operations like string manipulations, etc.
source share