GetValue problem

Post your .Net discussions here
Post Reply
fleed
Newbie
Posts: 1
Joined: Mon Dec 10, 2007 8:29 pm

GetValue problem

Post by fleed »

I wrote this extern function:

Code: Select all

[DllImport("adc1632.dll", EntryPoint = "adc16_get_value")]
private static extern short GetValue(out int value, short port, short channel);

But when I try using it, it always return 0.
Where's the problem? Is my declaration correct?
Thanks

gruntman
Advanced User
Advanced User
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Post by gruntman »

Fleed,

Can you post up the rest of your code? Your calling function appears to be correct, with the rest of the code I can look at it to see what the error is. If you don't want to post it publicly you can email it to me at richard@pc-oscilloscopes.com.

Regards,

Richard Boyd
Technical Specialist
http://www.pc-oscilloscopes.com

Post Reply