<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 'DisplayPanel' fails via DLL? in LabWindows/CVI</title>
    <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513817#M29068</link>
    <description>Hey Twitch,&lt;BR /&gt;&lt;BR /&gt;This is a kind of a shot in the dark because I am not familiar with ADA, but in the CVI code are you using LoadPanel or LoadPanelEx.&amp;nbsp; If you are building your CVI code into a DLL, you need to make sure to use LoadPanelEx instead of LoadPanel. With LoadPanelEx it is possible to specify the calling module handle where CVI should look for panel callback functions.&amp;nbsp; The help for LoadPanelEx explains this in a little more detail as well.&amp;nbsp; Hope this helps!&lt;DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 27 Apr 2007 15:43:39 GMT</pubDate>
    <dc:creator>Patrick_P.</dc:creator>
    <dc:date>2007-04-27T15:43:39Z</dc:date>
    <item>
      <title>'DisplayPanel' fails via DLL?</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/512567#M29011</link>
      <description>&lt;DIV&gt;Hi-&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I've created a DLL using LW/CVI 7.1 containing many interfaces, one of which opens a .UIR GUI for manually controlling an instrument for use&amp;nbsp;in an ADA (uggh) application.&amp;nbsp; All of the CVI DLL interfaces work ok from the ADA program except the one that runs the GUI.&amp;nbsp;&amp;nbsp; When 'DisplayPanel' is called, I see the my panel with its proper title (but no controls) briefly appear,&amp;nbsp;and then it quickly&amp;nbsp;disappears.&amp;nbsp; A Constraint_error is raised in my ADA app, but it occurs before I can collect any CVI status info from the call to 'DisplayPanel'.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;As a test I created a separate CVI application that only makes calls into the DLL.&amp;nbsp; It&amp;nbsp;runs all DLL interfaces including the GUI perfectly.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'm pretty stuck here ...&amp;nbsp; Any ideas!?&amp;nbsp; &amp;nbsp;Any thoughts on a troubleshooting approach&amp;nbsp;would also be appreciated.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks!&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;-Twitch&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Apr 2007 19:00:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/512567#M29011</guid>
      <dc:creator>Twitch</dc:creator>
      <dc:date>2007-04-25T19:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: 'DisplayPanel' fails via DLL?</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/512613#M29013</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Don't you be knocking my ada. &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://ni.lithium.com/i/smilies/16x16_smiley-very-happy.gif" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;
&lt;P&gt;Can you run the ada in debug and trap the error any better?&amp;nbsp; Constraint errors are most commonly caused by array out of bounds.&amp;nbsp; C will let this happen.&amp;nbsp; Ada catches it.&amp;nbsp; That would be my first area to check.&lt;/P&gt;
&lt;P&gt;You could also put in an exception handling block in your ada so that it does not bomb off.&amp;nbsp; My guess is that you would then see your panel with controls drawn up until the point of exception (like seeing 3 out of 9 controls or whatever).&lt;/P&gt;
&lt;P&gt;Message Edited by scomack on &lt;SPAN class="date_text"&gt;04-25-2007&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;03:07 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Message Edited by scomack on &lt;SPAN class="date_text"&gt;04-25-2007&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;03:07 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2007 20:06:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/512613#M29013</guid>
      <dc:creator>scomack</dc:creator>
      <dc:date>2007-04-25T20:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: 'DisplayPanel' fails via DLL?</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/512952#M29026</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Ok, sorry "Ada is the best!"&amp;nbsp; "I love Ada!".&amp;nbsp; There, happy now ?! &amp;nbsp;&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://ni.lithium.com/i/smilies/16x16_smiley-tongue.gif" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;
&lt;P&gt;I have an Ada constraint error trap wrapping the call into the DLL.&amp;nbsp; I use the Ada debugger to single-step this call. &amp;nbsp;The routine in the DLL simply loads and displays my .UIR panel, then starts the user interface.&amp;nbsp; I put statements in the DLL to write to a DOS window between each of these steps, so I can see where the error occurs.&amp;nbsp; The DLL runs the LoadPanel routine successfully but when the DisplayPanel procedure runs, program control is returned directly to the Ada with constraint error raised.&amp;nbsp; The CVI code never completes the call to DisplayPanel because I never see my subsequent debug statement print to the DOS window.&amp;nbsp; I see my .UIR panel frame flash and then disappear, thats it.&lt;/P&gt;
&lt;P&gt;Is there any insight into how the DisplayPanel library routine runs?&amp;nbsp; How I might be voilating an array boundary here?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help scomack, I appreciate your efforts.&lt;/P&gt;
&lt;P&gt;-Twitch&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2007 11:39:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/512952#M29026</guid>
      <dc:creator>Twitch</dc:creator>
      <dc:date>2007-04-26T11:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: 'DisplayPanel' fails via DLL?</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513817#M29068</link>
      <description>Hey Twitch,&lt;BR /&gt;&lt;BR /&gt;This is a kind of a shot in the dark because I am not familiar with ADA, but in the CVI code are you using LoadPanel or LoadPanelEx.&amp;nbsp; If you are building your CVI code into a DLL, you need to make sure to use LoadPanelEx instead of LoadPanel. With LoadPanelEx it is possible to specify the calling module handle where CVI should look for panel callback functions.&amp;nbsp; The help for LoadPanelEx explains this in a little more detail as well.&amp;nbsp; Hope this helps!&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Apr 2007 15:43:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513817#M29068</guid>
      <dc:creator>Patrick_P.</dc:creator>
      <dc:date>2007-04-27T15:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: 'DisplayPanel' fails via DLL?</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513896#M29072</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi Patrick-&lt;/P&gt;
&lt;P&gt;Yes, I'm using LoadPanelEx, thanks for contributing.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I've actually made some progress here.&amp;nbsp; It turns out that if I use a .UIR file with "Classic" controls, I don't get the error.&amp;nbsp; If I use any of the newer style controls (ones that have 3-dimensional shading) I see the error.&amp;nbsp; I've found that this applies to GenericPopup message boxes also, where the command buttons are the new shaded type.&amp;nbsp; I need to replace them with my own interfaces using Classis command buttons to get it to work.&lt;/P&gt;
&lt;P&gt;I'm in the process of reproducing my .UIR panels to use all classic controls and have so far been successful.&amp;nbsp; Its painful and tedious but at least I think I'll have something that will work.&lt;/P&gt;
&lt;P&gt;If anyone has any insight into why this might be happening, I'd sure like to hear it!&lt;/P&gt;
&lt;P&gt;-Twitch&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2007 17:45:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513896#M29072</guid>
      <dc:creator>Twitch</dc:creator>
      <dc:date>2007-04-27T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: 'DisplayPanel' fails via DLL?</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513922#M29076</link>
      <description>The run-time engine relies on mesa.dll (National Instruments\Shared\Mesa\mesa.dll) to render the 3D-shaded UI elements, whereas the "classic" UI elements are rendered completely by the run-time engine.&amp;nbsp; It's possible your problem is related to the (failed) loading of this DLL, but I couldn't speculate beyond that.&lt;BR /&gt;&lt;BR /&gt;Mert A.&lt;BR /&gt;National Instruments&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Apr 2007 18:26:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/DisplayPanel-fails-via-DLL/m-p/513922#M29076</guid>
      <dc:creator>Mert_A.</dc:creator>
      <dc:date>2007-04-27T18:26:03Z</dc:date>
    </item>
  </channel>
</rss>

