LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

fatal error KERNEL.146640 while using DLL on PXI-8196

Hello everyone,

 

I think I posted this to the wrong board:

PXI: fatal error KERNEL.146640 while using DLL

 

 

Maybe someone around here can help me.

 

Thanks,

 

 dead bug 

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

If the DLL is intended to run on a RT target, you don´t need the DLLmain. All you need is the RTmain, which is the entry-point of your RT application. So place all your initialiation inside the RTmain, and remove the DLLmain. You can not have both. Use RTmain for Realtime-Applicvations, and DLLmain for standard DLLs.

 

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

The problem is that we have a fairly big part of our project written in C which we now start as RTmain and we also use a LabView VI. We want to use the DLL to pass data very fast between these two, so the LabWindows/CVI program and the LabView VI must be able to call functions from the DLL. Due to that I can not simply put everything into the RTMain function.

Apart from that I don't really understand why the system crashes. As far as I understand this, there is nothing wrong in what I am doing. Every DLL must have a DLLmain function, which may do some initialisation, but does not have to, and returns TRUE if the DLL can be loaded. So, if I leave it away, there must be one automatically generated by LabWindows and I cannot see what it should do in the simple case of a DLL that only exports a function that actually does nothing. Anyway the system is only crashing when I use the explicite written DLLmain.

 

Of course I could try to work around this, but I would really like to understand the problem.

 

   dead bug
 

 

 

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