none
getting error message on p/invoke function call RRS feed

  • Question

  • I have a third party Dll that i need to reference.  I have created a wrapper function using p/invoke in my vb.net project.  I am getting an error on a function that looks like this in the dll:

    functionName( char *valueINeedToRead)  

    Then wrapper function that i have created looks like this:

    Declare Auto Function functionName Lib "thirdParty.dll" (ByRef valueINeedToRead As String) as Integer

    If i pass the parameter byval instead of byref i do not get an error but i do not get the value of the string that i need to see.  Any ideas on how to fix this?

    thanks.
    Tuesday, November 10, 2009 3:34 PM

Answers

  • Try this: 
      Declare Auto Function currentVersion Lib "thirdParty.dll" (ByVal version As StringBuilder) As Integer
    
    • Marked as answer by eryang Monday, November 16, 2009 3:38 AM
    Tuesday, November 10, 2009 4:16 PM

All replies