08-13-2008 11:58 AM
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
08-14-2008 03:39 AM
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.
08-14-2008 06:38 AM
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