It's the type corresponding to SOCKET, to be used instead of the Int32 of my example. You should also be able to use UInt64. If neither of those work, I'm all out of ideas.
Cheers, Bart On Wed, Jul 13, 2016 at 8:59 AM Karli Kund <karli...@gmail.com> wrote: > What dose this mean? I try to google Libc.WindowsRawSocke Julia, but > nothing. How I can use that library? > > keskiviikko 13. heinäkuuta 2016 0.05.23 UTC+3 Bart Janssens kirjoitti: > >> OK, if it's a normal Windows socket you may be able to use >> Libc.WindowsRawSocket instead of an integer type. It seems to be an >> unsigned 64 bit integer on 64bit Windows, which may be why you got the >> change in value. >> > >> On Tue, Jul 12, 2016 at 3:12 PM Karli Kund <karl...@gmail.com> wrote: >> >>> In .h file it says "#define SOCKCAST (char *)", but i thing the function >>> MServerInit >>> is doing this:http://www.linuxhowtos.org/C_C++/socket.htm with server >>> side version. This is not familiar to me. Maybe I have to code the >>> "MServerInit" >>> from the start to Julia? >>> >>> >>> tiistai 12. heinäkuuta 2016 14.50.49 UTC+3 Bart Janssens kirjoitti: >>> >>>> What is the definition of SOCKET in your C code? >>>> >>> >>>> On Tue, Jul 12, 2016 at 1:43 PM Karli Kund <karl...@gmail.com> wrote: >>>> >>>>> Thanks a lot. It can call the function now and fills the sockfd(fd) >>>>> with output. But its wrong output. It should be 128, but in Julia set it >>>>> 552. I try different variables (8,16,32,64). nothing helps. Don't know if >>>>> its Julia problem or what. >>>>> >>>>> >>>>> tiistai 12. heinäkuuta 2016 0.31.46 UTC+3 Bart Janssens kirjoitti: >>>>> >>>>>> That looks very much like a plain C API, so I guess you'll get by >>>>>> with ccall. What to pass as socket depends on the type, but presumably >>>>>> you >>>>>> can pass a pointer to some integer type. Supposing SOCKET is a 32bit >>>>>> integer, something like this might work: >>>>>> fd = Array{Int32}(1) >>>>>> ccall((:MServerInit, your_lib), ..., (Ptr{Int32), ...), fd, ...) >>>>>> >>>>>> I'm assuming here that MServerInit initializes the value of fd, if >>>>>> you need to pass it a valid value you probably need to call another C >>>>>> function to obtain it first. >>>>>> >>>>>> >>>>>> Op ma 11 jul. 2016 11:28 schreef Karli Kund <karl...@gmail.com>: >>>>>> >>>>> >>>>>>> Found a solution or problem. My .dll file was 32-bit and Julia was >>>>>>> 64. So luckily I have 64-bit version of the library also, so now it >>>>>>> founds it. Now I have problem with variables that go in and returns. >>>>>>> Function that I'm calling is "int MServerInit(SOCKET *sockfd, int >>>>>>> port)". >>>>>>> It should return int. Problem is with that "SOCKET *sockfd" variable. >>>>>>> how >>>>>>> to I send that? In visual studio, if I pause it, it shows 128 number. So >>>>>>> it's bit rate? >>>>>>> >>>>>>> >>>>>>>>> >>>>>>>>>