Post your .Net discussions here
- Posts: 1
- Joined: Mon Dec 10, 2007 8:29 pm
I wrote this extern function:
But when I try using it, it always return 0.
Code: Select all
[DllImport("adc1632.dll", EntryPoint = "adc16_get_value")]
private static extern short GetValue(out int value, short port, short channel);
Where's the problem? Is my declaration correct?
- Advanced User
- Posts: 109
- Joined: Thu Sep 28, 2006 3:50 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 firstname.lastname@example.org.