GetValue problem

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

GetValue problem

Post by fleed » Mon Dec 10, 2007 8:37 pm

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?

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

Post by gruntman » Fri Jan 25, 2008 7:05 pm


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 Boyd
Technical Specialist

Post Reply