HyperEngineer
Programmer
This is a strange problem. If I run the VB6 program from the IDE it generates a run time error 49, bad DLL calling convention. However, if I compile the VB6 program and run the .exe file it does not generate the error.
The VB declare statement in a module:
Code:
Public Declare Function LogOnToTelnet(ByVal cIP As String,
ByVal iPort As Integer,
ByVal cPrompt As String,
ByVal cUsername As String,
ByVal cPassword As String) As Integer
The calling statement in a form (which generates the error):
Code:
iRet = LogInToTelnet(cIP, iPort, cPrompt, cUsername, cPassword)
And the function in VC++6
Code:
extern "C" DLLexport int LogInToTelnet(char* cIP,
int nPort,
char* cPrompt,
char* cUsername
cahr* cPassword)
{
.....
}
thanks,
HyperEngineer
If it ain't broke, it probably needs improvement.