Hi, I'm writing a DLL in C/C++ that needs to export a couple of functions to be used by a Visual Basic program. However, I'm having some trouble getting the Visual Basic to read the exported C functions.
They are very simple functions, eg:
extern "C" __declspec(dllexport)
void test_get_string(char* str)
{
strcpy(str,"Hello World!");
}
extern "C" __declspec(dllexport)
int test_get_number(void)
{
return 123456;
}
The problem is that I don't know VB at all but that's all my client uses. He says I'm not exporting the functions correctly in the DLL because he's getting a "453" error (whatever that is!).
It was my understanding that simple C functions (as above) inside a DLL could be called from VB no problem.
Is it something I did wrong or is the client doing something wrong? Either way, how do I fix it?
Many thanks!
They are very simple functions, eg:
extern "C" __declspec(dllexport)
void test_get_string(char* str)
{
strcpy(str,"Hello World!");
}
extern "C" __declspec(dllexport)
int test_get_number(void)
{
return 123456;
}
The problem is that I don't know VB at all but that's all my client uses. He says I'm not exporting the functions correctly in the DLL because he's getting a "453" error (whatever that is!).
It was my understanding that simple C functions (as above) inside a DLL could be called from VB no problem.
Is it something I did wrong or is the client doing something wrong? Either way, how do I fix it?
Many thanks!