Some kind person show me how to call this in C#?

In VB6 I use:

VB Code:
  1. Declare Function GX_GetDTMFKey Lib "GxVoice.dll" (ByVal ChannelNo As Integer, ByVal DTMFCount As Integer, ByRef DTMFString As Byte) As Integer
  2.  
  3. ...
  4. Dim DtmfBuffer(10) As Byte
  5. Dim itemp As Integer
  6. Dim ChannelNo As Integer
  7.  
  8. ChannelNo = 5
  9.  
  10. itemp = GX_GetDTMFKey(ChannelNo, 1, DtmfBuffer(0))

Works great.

In C# I try

VB Code:
  1. [DllImport("GxVoice.dll", CharSet = CharSet.Auto)]
  2.   public extern static ushort GX_GetDTMFKey(ushort ChannelNo, ushort     DTMFCount, char[] DTMFKey);
  3.  
  4. ...
  5.  
  6. char[] DTMFKey = new char[1];
  7. ushort i = GxVoiceAPI.GX_GetDTMFKey(5, 1, DTMFKey);

And i comes back with an error code.

Something to do with passing DTMFKey by reference?

The DLL is unmanaged legacy code.