in vb6, how do I retrieve a char* parameter from a C dll?
问题 I am calling a C dll from my VB6 application. The dll has a function call signature as follows. void WINAPI geterrstr(char* foo); where foo is a string that has to be returned. In my VB6 application, I have tried calling my dll by using the following syntax, but it returns an empty string. Declare Sub geterrstr Lib "technopnp.dll" (ByRef lpbuffer As String) Any ideas? 回答1: You should be able to; Declare Sub geterrstr Lib "technopnp.dll" (ByVal lpbuffer As String) ... dim buff as string buff