06-10-2009 12:18 AM
Hello,
I have made a DLL in visual c++ 2008.
The function declaration prottypes are defined as:
#define DLLTYPE void __declspec(dllexport)
#ifdef __cplusplus
extern "C" {
#endif
DLLTYPE RS232OpenPort(const char *Port, int* handle, int *iResult);
#ifdef __cplusplus
}
#endif
Calling the function in cvi always generates an General Protection Fault at address 6865A1C8.
The dll was tested succesfully in Visual c++ 2008.
Anyone has a solution for that?
06-10-2009 03:16 AM
Could be a _stdcall/_cdecl linkage issue. Try:
DLLTYPE _stdcall RS232OpenPort(const char *Port, int* handle, int *iResult);
and see if that helps.
JR
06-12-2009 02:03 PM
Already tried that but with no success.
By mistake I have created a duplicate topic in the Measurement Studio for VC++ .
In that topic I have received an answer (NOT THE SOLUTION).
I will close this topic and continue on the other one.