Las funciones se exportan con:
Código:
extern GoInt32 PrintHello(char* p0, char** p1);
extern GoInt32 PrintBye(char** p0);
extern GoInt32 LenString(char* p0);
Obviamente el tipo GoInt32 es propio de Golang, en VB6 lo puedo leer perfectamente como Long.extern GoInt32 PrintBye(char** p0);
extern GoInt32 LenString(char* p0);
En teoría debería poder usar estos metodos en VB6 con la siguiente declaración:
Código:
Declare Function PrintHello Lib "testDLL.dll" (ByVal Nombre As String, ByRef Output As String) As Long
Declare Function PrintBye Lib "testDLL.dll" (ByRef Output As String) As Long
Declare Function LenString Lib "testDLL.dll" (ByVal Nombre As String) As Long
Declare Function PrintBye Lib "testDLL.dll" (ByRef Output As String) As Long
Declare Function LenString Lib "testDLL.dll" (ByVal Nombre As String) As Long
Pero no, no consigue otro mensaje que "Bad DLL calling convention". Hice otros métodos, que devuelven char* en lugar de GoInt32 (extern char* OutString() y FUNCIONAN con VB6 como Strings (Declare Function OutString Lib "testDLL.dll" () As String), pero no como parámetro.
Gracias!!