LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library Function Node or make my DLL and then call it?

Hi all. I'm following the "hostname.vi" example and calculator example. But seems that the Call Library Function Node is more suitable than the Invoke Node. I've code developed in c# wich basically one method calls the method in the DLL that  reads what is in USB buffer and write to those parameters. For example the read method in that DLL:

DWORD

_MPUSBRead(void* handle,void* pData,DWORD dwLen,DWORD* pLength,DWORD dwMilliseconds);

(PS-this method,from DLL, is called from my own method)

where the data read from the buffer is written to pData parameter. My doubt is: Should I create a DLL wich would have the method wich calls the _MPUSBRead? Or should I call the DLL with Call Library Function Node and everything else done in my own method I should do by "blocks". This is, creating every parameter that I send throw the _MPUSBRead method?

0 Kudos
Message 1 of 4
(2,598 Views)

In other hand, I'm also working tying the calculator.vi.  In the File>>VI Properties>>Documentation says that the .DLL file should be in the same directory of the vi (wich is). And should be assembly in Tools >> Advanced >> .NET Assembly References. But there is nothing like .Net Assembly Refecerences. I'm using LV8.0. There is only:

Mass compile; Edit Error Codes;Edit Pallete Set; Export Strings and Import strings.

0 Kudos
Message 2 of 4
(2,589 Views)
Hi Marcoadf,

In LV8.0, NI adds a relative path policy when using .NET interactions.
http://forums.ni.com/ni/board/message?board.id=170&message.id=165004&requireLogin=False

I send you also links about .NET assembly :
http://digital.ni.com/public.nsf/websearch/9E1CFF2B47EC4FD386257116005FAB3E?OpenDocument

For more explanations about the "Call Library Function" :
http://digital.ni.com/public.nsf/websearch/44E40ACF1644DB77862562990054D672?OpenDocument

I think this two one's should be helpfull 😄

Regards,
BRAUD Jean-Philippe
Field Sales Engineer - Nord et Centre France
LabVIEW Certified Developper
0 Kudos
Message 3 of 4
(2,544 Views)

Thank you jp_Braud.

 

Best regards.

0 Kudos
Message 4 of 4
(2,538 Views)