LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL function map one cluster to another

this is the call that you would make from the C++ side of the DLL.
bind(sock, (struct sockaddr *)&sin, sizeof(sin));

I am wondering if there is a good way of doing it in labview.

Thanks
0 Kudos
Message 1 of 6
(2,984 Views)
lorman,

What are you trying to accomplish here? Bind is a function that is part of the socket library that gives a socket its name. Do you want to connect to a socket in LabVIEW? You can use the TCP/IP functions. Or, you can create a shared library (.dll or .so) to run this C++ code for you and use the results in LabVIEW.
Please provide as much information as you can.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 6
(2,984 Views)
What I am trying to do is call bind from Labview. I need to listen to Multicast Messages, and Labview Does not provide that capability. At least not that I could find. If it does then I do'nt have to worry. I have written up VI's that do most of the calling to the functions that I need to create a Multicast Socket. There are some Options that need to be set which I can do through c++ dll that are not available in LabView. I am looking for iether a way to call the DLL directly, or to create my own DLL and call that one. So far I have not been able to get anywhere with the creation of my own DLL but if you have resources on that I would appreciate them as well.

Thanks

Eugene
0 Kudos
Message 3 of 6
(2,984 Views)
Eugene,

You can use the Call Library Function node in Functions>>Advanced. This is how you can call a function in a DLL (in this case, probably the winsock dll).
Please refer to the Using External Code in LabVIEW manual here.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 6
(2,984 Views)
Can I then Use a CIN to call the DLL? Also is there a good example of a CIN that I can take a look at?

Thanks

Eugene
0 Kudos
Message 5 of 6
(2,984 Views)
Eugene,

You would use a CIN in the case that you want to imbed your C code into the VI. We are moving away from this. You use the Call Library Function (NOT Code Interface Node) to call a shared library (a dll in Windows, a so in most other OSes). I would just call the DLL directly or build a DLL to do all of the work you intend.

Randy Hoskin
0 Kudos
Message 6 of 6
(2,984 Views)