Marshal Error

  • Thread starter Thread starter Tibby
  • Start date Start date
T

Tibby

Here's the C prototype:

int* CHARtoINT(char* input)

and here's my VB.NET decleration:

<DllImport("DGRE.dll")> _
Public Shared Function CHARtoINT(ByVal input As String) As
Integer()
End Function

I get the error "Can not marshal return value", so, I'm at a loss.

Thanks,
Tibby
 
Here's the C prototype:

int* CHARtoINT(char* input)

and here's my VB.NET decleration:

<DllImport("DGRE.dll")> _
Public Shared Function CHARtoINT(ByVal input As String) As
Integer()
End Function

If the function is returning an address, try defining it as "IntPtr":

Public Shared Function CHARtoINT(ByVal input As String) As IntPtr
 
If the function is returning an address, try defining it as "IntPtr":

Public Shared Function CHARtoINT(ByVal input As String) As IntPtr
In retrospect, it's a mute point because I need it to return String()
to vb, so I have to go and learn some more C++ now.

Thanks again Patrick,
Tibby
 
Back
Top