Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

C# USB-845x Using Dllimport for ni845xSetIoVoltageLevel and get ErrorCode = -301706

Hi Sir, 

Need help on C# USB-845x.

I using C# to develop a program to communicate with USB-845x, when i try to import ni845xSetIoVoltage, i founded some error = -301706.

 

[DllImport("Ni845x.dll", EntryPoint = "ni845xSetIoVoltageLevel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
unsafe static extern Int32 ni845xSetIoVoltageLevel(
                                                                          UInt32 DeviceHandle,           //NiHandle DeviceHandle
                                                                           byte VoltageLevel);             //uInt8 VoltageLevel

 

here is my code.

Message 1 of 1
(5,921 Views)