Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Examples using USB-8452 with C#

I would like to use the NI USB-8452 with Microsoft C# and Visual Studios 2013.

I found the  NI Knowledge Base paper: "How Can I Access USB-845x API Function from a C/C++ Program?"

 http://digital.ni.com/public.nsf/allkb/F997E364CFAA63F6862573540064C028

Although This was very helpful, I am still having trouble converting it to C#.

Does anyone have any examples, specific to C#, that they can share with me?

Thanks,

Ken

0 Kudos
Message 1 of 3
(2,134 Views)

Hey,

That document describes the location of ni845x.dll, which contains the functions. I believe you can access them using C#.

 

Access a method from a DLL from C# program

Call function from DLL?

0 Kudos
Message 2 of 3
(2,107 Views)

NI Package Manager indicates NI-845x v21.3.0 is installed.

Ni845x.dll is in C:\Windows\System32.

 

Visual Studio 2019 does NOT offer anything with NI845x as a Reference for adding to a C# project.

Attempts to browse and install either ni845x.dll or ni845x.lib result in "A reference [...] could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.".

 

Examples and instructions for use instruct to "add to project"... as if it were actually possible, with no explanation (including what name to look for).

 

Please advise known reasons for not finding a Reference, when installation software indicates the driver was installed successfully.

 

Thank you!

 

0 Kudos
Message 3 of 3
(251 Views)