I have a dll written with c++ which was written by another programmer. So I know very little about the dll other than the functions that I want to call. I can bring it up in visual c++ but since I'm not real familiar with c++ I don't understand it all. In any case I am trying to call the dll functions from a vb app and am getting errors.
In the dll's (Test.dll) .h file I have
#define EXPORT extern __declspec(dllexport) __stdcall
BOOL EXPORT Init(int Port1, int Port2);
In the dll's .cpp file I have something like
BOOL EXPORT Init(int Port1, int Port2)
{ <<code here>>
}
In Visual Basic I have the declaration
Public Declare Function Init Lib "Test" _
(ByVal port1 As Integer, port2 As Integer) As String
And I call the function with
blnRetVal = Init(1, 2)
Everything compiles fine but when I run it I get the following error.
"Can't find DLL entry point Init in Test"
I would appreciate any ideas anyone might have. Thanks
In the dll's (Test.dll) .h file I have
#define EXPORT extern __declspec(dllexport) __stdcall
BOOL EXPORT Init(int Port1, int Port2);
In the dll's .cpp file I have something like
BOOL EXPORT Init(int Port1, int Port2)
{ <<code here>>
}
In Visual Basic I have the declaration
Public Declare Function Init Lib "Test" _
(ByVal port1 As Integer, port2 As Integer) As String
And I call the function with
blnRetVal = Init(1, 2)
Everything compiles fine but when I run it I get the following error.
"Can't find DLL entry point Init in Test"
I would appreciate any ideas anyone might have. Thanks