HyperEngineer
Programmer
I have a Regular DLL with MFC with an exported function. When I call this function from a VB program it gives the error 453 can't find entry point in the DLL. I have this code in the .h file:
This is the code in the .cpp file:
In the VB code I have this as the declaration:
And this is the code to call the function:
I put the .DLL and .LIB files in the system32 folder. I tried to register the .DLL and it said it loaded it but couldn't find the entry point for the DLL.
Any ideas would be greatly appreciated.
thanks,
HyperEngineer
If it ain't broke, it probably needs improvement.
Code:
#define DLLexport __declspec(dllexport)
#ifdef __cplusplus
extern "C"
{
#endif
DLLexport int WINAPI SendCommand(int cCommand);
#ifdef __cplusplus
}
#endif
Code:
DLLexport int WINAPI SendCommand(int nCommand)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return 1;
}
In the VB code I have this as the declaration:
Code:
Public Declare Function SendCommand Lib "TelnetDLL" (ByVal cCommand As Integer) As Integer
Code:
Call SendCommand(2)
I put the .DLL and .LIB files in the system32 folder. I tried to register the .DLL and it said it loaded it but couldn't find the entry point for the DLL.
Any ideas would be greatly appreciated.
thanks,
HyperEngineer
If it ain't broke, it probably needs improvement.