LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Division by zero while loading panel created in LabWindows 7.0

When I click on Button with function InitUIForDLL() I get this error (Both LabW. and Bulder compilers shows no errors), I have tried with panel that does nothing ( no button ect) and there is the same error. What can I do to avoid Division by 0 error?
0 Kudos
Message 1 of 4
(2,627 Views)
Hello Wojtek,

From what you've said, it sounds like your program is trying to build a DLL file. What are you doing in the DLL? Is there any chance that somewhere in the DLL you may be dividing by zero?

The code for InitUIForDLL() is generated by Codebuilder to load and display the startup panels in the source code for the DLL. If you look at the following tutorial, it talks a bit more about what is going on in that code.

How to Integrate 32-Bit LabWindows/CVI 4.0 Libraries into Microsoft Visual C/C++ or Borland C/C++
http://zone.ni.com/devzone/conceptd.nsf/webmain/A32E309A55A45CA08625686900623295?OpenDocument

It might help to take a look at a couple of example projects that shipped with CVI as well. Guidll.prj and cvidll.prj in particular may prove
to be helpful.

Check those out, and let me know if you have any further questions about this issue.

Scott Romine,
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,627 Views)
I have created a dll using this tutorial :)( i had to change the onoff.dll filename to export.dll, to use in in Builder) and later I've made a dll based on a clean ( with no functions) panel (in LabWindows). In both of them there are no math functions so there can not be a division by zero.
0 Kudos
Message 3 of 4
(2,627 Views)
Wojtek,

Have you tried commenting out the code that makes reference to that function call? It sounds like we need to narrow down the cause of the error. Perhaps you could insert some breakpoints in the code so that we can find out exactly when the error is being generated.

Scott Romine
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,627 Views)