I have a function from this VB.net that needs to be imported to C#. I have tried various VB.NET to C# converters but it does not work correctly with the imported dll associated with this function. Anyone knows how to convert correctly for the following VB function to C#:
<DllImport("E5KDAQ.dll")> _
Public Function E5K_ReadDIStatus(ByVal id As Short,<[In](),Out()> ByRef chnval As Integer) As Short
End Function
Using an online converter, it gives the following: Convert c# which has error
[DllImport("E5KDAQ.dll")]
public static extern short E5K_ReadDIStatus(short id, [In()] out int chnval);