LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems running in CVI a DLL made in Visual c++ 2008

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?

 

0 Kudos
Message 1 of 3
(3,208 Views)

Could be a _stdcall/_cdecl linkage issue. Try:

 

DLLTYPE _stdcall RS232OpenPort(const char *Port, int* handle, int *iResult);

 

and see if that helps. 

 

JR

0 Kudos
Message 2 of 3
(3,198 Views)

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.

0 Kudos
Message 3 of 3
(3,167 Views)