LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FATAL RUN-TIME ERROR : Unknown Source position,thread id 0x00001F98 ,the program has caused a 'General Protection' fault at 0x06C3081F

Hi 

 i created some C wrappers ,i have used one of  basic( MTL.dll) call call  and lib file in another  application dll call.The application dll was written  in cvi 2010 to interface with labview.Some of call working properly,when i executing the below call i getting "FATAL RUN-TIME ERROR : Unknown Source position,thread id 0x00001F98 ,the program has caused a 'General Protection' fault at 0x06C3081F".When i used debug mode the below call after return function encounter this problem.I have read the documentation in ni forum but i am unable to over come this error.Please guide me how to procude to next.

 

 

shambhu

0 Kudos
Message 1 of 2
(4,469 Views)

Hi Shambhu,

 

Based on the symptom you are describing, I suspect that you have a calling convention mismatch for your exported function.

I see that you don't specify an explicit calling convention, which means that the code will be generated with the default one specified in your project.

For example, a CVI project by default has __cdecl (Options >> Build Options) but it is possible that your other application uses __stdcall convention, therefore you have a mismatch.

If you are using the CVI-built DLL from LabVIEW through the Call Library Function node, please ensure the Function prototype and Calling convention are the same as your C code.

 

Regards,

Alpar

Message 2 of 2
(4,351 Views)