○VB6にてDLLの読み出し
■読み出すdllの説明
vbtestdll.dllは実行ファイルの横に置かれています。
vbtestdll.dllはVC6 Win32Dll にて作成されています。
vbtestdll.dllの中にあるメソッドは、-----------------------
extern "C" __declspec(dllexport) void setStr(char*a);
extern "C" __declspec(dllexport) char* getStr();
extern "C" __declspec(dllexport) int getInt(void);
extern "C" __declspec(dllexport) int setInt(int b);
extern "C" __declspec(dllexport) char* out(char*a,char*b);
■上のDLLを読み出すVB6のAPI宣言
Public Declare Sub setStr Lib "vbtestdll.dll" (ByVal a As String)
Public Declare Function getStr Lib "vbtestdll.dll" () As String
Public Declare Function getInt Lib "vbtestdll.dll" () As Integer
Public Declare Function setInt Lib "vbtestdll.dll" (ByVal b As Integer) As Integer
Public Declare Function out Lib "vbtestdll.dll" (ByVal a As String, ByVal b As String) As String