Passing arrays with Call Library Function does not work after application builder

Calling a DLL with Call Library Function which requires an array of data works correctly in Labview, but after building an exe with application builder, the call no longer works.  Dereferecing the pointer in the DLL retuns all 0s and not the actual values.
Solved!
Go to Solution.
Attachments:
TEST.zip ‏28 KB

I did not run your code because it is a little unclear to me what it does.
Two things:
First, is the DLL you are calling the DLL-ified version of PopUpNames.vi? Then the problem is likely that the panel is not being built into the DLL.
When LabView builds an application / dll, it strips the front panel and block diagram from all VIs that it doesn't think need to show a panel at run time. This reduces file size and increases code security. The App Builder's panel inclusion logic can be overridden by Build Specifications -> Source File Settings -> Remove front panel. A better method is to put a property node on a control in a window you want to show marking it "visible"; this is sufficient to tell the App Builder it should keep the panel.
Currently Source File Settings shows "no dependencies" (clearly incorrect---another evil side effect of Express VIs I guess) but if you change the settings as shown below to keep ALL panels, one might hope the App Builder can figure it to keep the panel when it deconstructs the Express VI. (Alternatively convert the Express VI into a regular one.)
A second comment: I am a bit flummoxed at the larger goal here. You are calling LabView DLL from LabView, which doesn't make a lot of sense, so I assume your larger goal is to call LabView from C or vice-versa. In that case be aware that your DLL is x86 (32-bit) but you are passing 64-bit ints as your pointers. In this case it is 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers calling 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers, so it all works, but if your going to call this from C or whatnot you're going to have to follow that same design.
When calling C code the LabView Call Library Function does have a "unsigned pointer-sized integer" data type that always appears to be 64 bits in the dev env but which actually passes a 64 or 32-bit int to the DLL depending on the environment. The "pointer sized int" has to be 64 bits in the "LabView" part of the code because LabView's strong typing requires the data type to be determined at compile time. Casting all pointers to the largest data type in LabView makes it possible to write platform-independent code, but down at the Call Library level you still have to put the right number of bytes on the stack.

Similar Messages

  • "Find Resources" does not work after Application Builder Installer

    I use Lv Full 6.1 / Appl.Builder 6.1
    VISA:"Find Resources" acts properly as long as a built application is installed on a PC that has LV installed.
    as soon as only the runtime eng. is installed no resources are found.
    Who helps?

    Thank you Dennis for your reply. I tried to install the VISA runtime engine via the "Run executable after installation" but it appears to run the Visa-runtime-engine-installer before ending the application installation. So I had to run that installer manually. Nevertheless you pushed me in the right direction.
    THANKS

  • Mail search function does not work after reinstalling

    Hello!
    I recently had to re-install Leopard on my MacBook Pro.
    I made a clean install so, I manually copied the Mail folder and preferences from my old home folder to the new one.
    All mails are present, and everything works great, apart from the fact that the search function does not work.
    I can search for new mails (that came after the reinstall) but the old ones "dont exist" as far as the mail.app goes.
    What can I do about it ?

    It would probably be easier to do the entire hard drive. The App Store also uses Spotlight, so updating it will help there also. It takes some time to re-index and your computer will/may run slower until it is done.
    Direct answer to your question is go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Then go to System Preferences/Spotlight per the linked article and in your user folder, select Library/Mail/V2.
    Thanks to leonie for some information contained in this.

  • Passing array to call library function running on VxWorks (cRIO)

    Hello,
    I am using a cRIO 9012 running VxWorks.
    I have a Call library function VI in my application and I want to pass arrays of doubles to this function.
    The problem is that I can not access the values in the array.
    Here is the source code of my function:
    #include "D:\\Programme\\National Instruments\\LabVIEW 8.5\\cintools\\extcode.h"
    double avg_num(double *in1, double *out1)
        double ret;
        ret = in1[0] + out1[0];
        return ret;
    The value of in1[0] and out1[0] is always.
    When passing no arrays but single values, all is fine. But since my application is more complex than this example, I need to pass arrays.
    The block diagram and parameter specification is as shown in the attached screenshots.
    I am compiling the source code with the Gcc 6.3 which is available here:
    http://zone.ni.com/devzone/cda/tut/p/id/5694
    What am I doing wrong?
    Or is passing arrays not supported on cRIO?
    Maybe the makefile needs to be modified?
    Thank you.
    Best regards,
    Christian
    Attachments:
    vi.JPG ‏88 KB
    parameter.JPG ‏41 KB

    I guess I have solved the problem.
    The key was to set the parameter "Minimum size" for all function parameters to <None>.
    Having this, I can read the passed arrays. I do not know why this works but at the moment, it is ok for me.
    Thank you all.

  • MS office report function does not work after building the appication

    I use the MS office report function  with a custom excel template my application.
    It works properly in de developstate, but after building the application it does not work .
    I use office 2000  and Windows XP

    jmq wrote:
    I use the MS office report function  with a custom excel template my application.
    It works properly in de developstate, but after building the application it does not work .
    What error message if any did you get? It could be a couple things:
    1. Did you include the Report Toolkit's dynamic vis in the app's build process?
    Ref: Error 7 when Running an .EXE Using VIs from Report Generation Toolkit for MS Office
    2. How are you giving the path to you custom template, as a relative or an absolute path? The path will be different for the .exe. You have to strip twice.
    Ref: Why Can't My Executable Load My Included File When I Use Relative Path Encoding?
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."

  • HT1192 caps lock function does not work after latest update

    Hi there,
    I have a Macbook 13" Early 2011 and recently after updating my operating system to Mac OS X 10.7.4, i have found that the caps lock button isn't functioning.
    At present if i hold or press the button, it is failing to light up or function at all.
    Is there a fix for this issue, as i have read that there was an update by Apple to stop accidental pressing of this key, however not being able to access its function at all seems to be unusual.
    Your thoughts and opinions would be much appreciated,
    Thanks,
    Robsterhill101

    My Macbook Pro Early 2011 15"  (base model) did this to me last night.
    I did a PRAM Reset, the generic "Cure All Procedure" for Macs. It worked after, but I noticed that the button had to be pressed at just the right angle and with enough pressure. The light would come on and off and Caps Lock functions properly. Continued as normal.
    I put the computer to sleep by simply closing the lid, and then put myself to sleep as well.
    This morning, just before I came on here, my computer would NOT wake from sleep (a whole other issue). Would not wake up by pressing the power button. So I had to do a hard reset, hold the power button down, and press it again after...grrr I never feel good being forced to do this.
    Anyways long story a little bit shorter, I restarted my computer and low-and-behold the Cap Lock is not working again. No Bueno, Cupertino.
    No, sorry, no liquid damage on the keys, and I don't have kids, nor share my computer with anyone but myself.
    Its one of the few things that bug me about this computer. The other is the issue of the computer not being able to wake from sleep. Too often.
    SHOULDA BOUGHT THE APPLE CARE
    Simply Because, perfect timing after the years original warranty, you will experience problems. After all, they do want you to be a repeat customer. IYKWIM

  • Oracle Discoverer integrate with SSO, SYS_CONTEXT function does not work?

    Here is the summary of steps I have already completed:
    1. Following the Discoverer configuration guide, I modified mod_osso.conf file.
    2. So right now, when I typed
    http:\\host: 7778\discoverer\plus, it will direct me to the single-sign-on page.
    3. Then I login as "orcladmin" (a user in OID), and I will be direct to the standard Connection page.
    4. And I already create a private connection using database user "EDW".
    5. So when I click the private connection, I can run the workbook and see all the data. So far so good.
    6. Now is the problem, since I am going to use VDP to restrict the data that SSO user can see. (for example, "orcladmin" can only see school1 data, but not school2 data) So I need to use some sort of function to return value "orcladmin" in the database so that I can use it to create security context and policy (for example, when "orcladmin" login, the SQL query discoverer generated will have a where clause school_id=1). And according to the configuration guide, if I run the following SQL, I should get back "orcladmin":
    Select SYS_CONTEXT('USERENV', 'CLIENT_IDENTIFIER') from dual;
    But instead, I got null. What is the problem? BTW, when I ran the above SQL, I login into the database as EDWPRD, who owns all the base tables that underlying all the workbooks.
    Thank you in advance for your help!!
    Ren

    Hi Ren
    When you say that you are testing this in SQL presumably you are doing this in SQL Plus. If this is true then the answer you got back is correct because connections to SQL Plus do not use the App Server SSO login and so the CLIENT_IDENTIFIER attribute will always return NULL. Try switching this to OS_USER and you should see the user name from the operating system. Switching this to SESSION_USER will tell you the database user name, while switching it to TERMINAL will tell you the name of the machine that you are logged on, and so on.
    For a full list of attribute values to SYS_CONTEXT take a look here:
    http://www.psoug.org/reference/sys_context.html
    To take advantage of any of this inside Discoverer you would have to register the PL/SQL SYS_CONTEXT function with Discoverer.
    Hope this helps
    Regards
    Michael

  • Mac Lion. Search function does not work in mails.

    Hello,
    I already wasted several hours trying to find solution for a problem which appeared with Lion, search function does not work, in mail at least.
    I was not using Leopard before and I am not a mac expert.
    (search function was already bad in the normal it was already bad in the normal 10.7 set up but at least it was working in mac mails).
    I tried reindexing via spotlight privacy settings (adding and removing HD) but does not work much better.
    I don't want to go to terminal, as as mentioned I don't know enough about mac to try this.
    What to do?
    Thanks,
    C.

    Anyone? Any ideas?

  • Problem with Call Library Function. Want to pass a string and return a string, but my compiler does not recognize "CStr" and Labview does not recognize my "char *function()" callout

    Hi, I'm trying to use a .DLL I wrote in Visual C++ .NET. The Call Library Function generates a function prototype of "CStr Parser(CStr arg_raw)"
    but my compiler won't accept this. So I change it to how C normally deals with strings "char *Parser(char *arg_raw). Now the Call Librafy Function does not find "Parser" in my .DLL though it is definitely there!
    Help!
    -Fong

    Hello
    You will need to include extcode.h in your C file. You can find this under ..\LabVIEW\cintools folder.
    The include has all the defines you will need.
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • Call multiple functions from same dll with call library function

    hi,
    i am working on a project in wich we need to make a UI to read out a sensor network.
    the UI should be usable in any project, but every node needs a different piece of code depending on the type of sensor with wich it is equipt.
    so i need to be able to call different pieces of code when i need them, and still be able to use the UI in future projects with possibly new types of node we now don't have.
    so someone told me to use DLL's, cause then i would be able to call the code i need the moment i need it.
    but i have never worked with DLL's (just learned about this option 3 day's ago) so i have a question.
    i know i can dynamicly change the DLL i call with the call library function, but can i dynamicly change the function i call from that DLL ?
    or do i have to put a new call library function for each function i want to call, even if its from the same DLL ?
    kind regards,
    stijn

    nazarim wrote:
    ok so there is no (easy and ubderstandable) way for me to dynamicly change wich function i want to call from a certain DLL.
    but now i started wondering, the path on the call library function is not ment to dynamicly change a DLL
    but it does work so, if i am carefull, can i use it for that purpose or will labview give me a series of problems once i start using it in larger programs ?
    Thepath on the Call Library Node can be used to load a different DLL. Obviously since you can't change the function name your other DLL would have to export exactly the same function name and of course with the same parameters. This is seldom the case so it is not the main use of the path input to the Call Library Node. It's main use is as indicated to load DLLs at runtime rather than at load time of a VI. So that an application can run even when the DLL is missing, until the moment the functionality from that DLL is needed.
    If you can make sure that all your DLLs export the same function name with the same parameter you can use the Call Library Node to call into different DLLs through the path input. If however you would need to call different function names you would have to resolve to some DLL which does do the dispatching and invocation using LoadLibrary() and GetProcAddress(). But unless you need to go with DLLs for some reason using the Call By Reference Node can give you an even more flexible approach. 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • HT201335 when using apple tv with my ipad, the mirroring function does not work, screen goes black, what is the issue?

    when using apple tv with my ipad, the mirroring function does not work, screen goes black, what is the issue?  My son's Ipad(same as kind as mine) works ok with the apple tv but mine does not.  Any suggestions?

    Hello Nina Izurin,
    While written for the iPhone, the troubleshooting below can help resolve issues with your iPad's camera, as well.
    Camera isn't functioning or has undesired image quality
    If the screen shows a closed lens or black image, force quit the Camera app.
    If you do not see the Camera app on the Home screen, try searching for it in Spotlight. If the camera does not show up in the search, check to make sure that Restrictions are not turned on by tappingSettings > General > Restrictions.
    Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
    Cases can interfere with the camera and the flash. Try gently cleaning the lens with a clean dry cloth or removing the case if you see image or color-quality issues with photos.
    Try turning iPhone off and then back on.
    Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
    Try to remain steady while focusing:
    Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center.
    Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
    Video: Adjust focus before you begin recording. You can also tap to readjust focus while recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll.
    Note: Video-recording features are not available on original iPhone or iPhone 3G.
    If your iPhone has a front and rear camera, try switching between them to verify if the issue persists on both.
    My issue is still not resolved. What do I do next?
    Contact Apple Support.
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Cheers,
    Allen

  • Palm Desk Top 6.2 Address Look Up Function Does Not Work In Windows 7

    I recently upgraded my desk top computer's operating system from Windows Vista Home Premium to Windows 7 Home Premium.  I synchronize with a Palm Tx PDA.  HP PalmOS customer support Chat helped me work through a compatibility issue that was preventing display of Address, Calendar, Memo and To Do items on my desk top computer via the Palm Desk Top 6.2 application.  I now find that the address look up function does not work (although it worked fine when I was running Vista).  Without success, I tried running the repair tool as well as reloading the software (both overlay and clean reinstall).  I would appreciate any help or suggestions to fix?
    Post relates to: Palm TX

    Hi,
    844869 wrote:
    CREATE TABLE TEST_EMPLOYEES
    FIRST_NAME VARCHAR2(26 CHAR),
    GRADE VARCHAR2(5 CHAR)
    INSERT INTO TEST_EMPLOYEES (FIRST_NAME, GRADE) VALUES ( 'William', 45 ); ...Thanks for posting the CREATE TABLE and INSERT statements; that's very helpful.
    William&45     1
    Robin 43     1
    Raymond          43     1
    Richard          43     1
    Karen          28     1
    Michelle               1
    Jonathan               1
    Mark               1
    Ann               1You may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (such as query results) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    This is one of the many helpful things found in the forum FAQ {message:id=9360002}
    Are the results above what you're getting with some existing query, or are they the results you want? 
    If those are your current results, post your query.  In that case, what are the results you want?  Do you want this?FIRST_NAME GRADE RNK
    William 45 1
    Robin 43 2
    Raymond 43 2
    Richard 43 2
    Karen 28 5
    Michelle 6
    Jonathan 6
    Mark 6
    Ann 6
    Edited by: Frank Kulash on Feb 21, 2013 2:39 PM
    I see you've added the desired results to your original message.
    Here's one way to do that:SELECT first_name
    ,     grade
    ,     RANK () OVER (ORDER BY grade NULLS FIRST)     AS rnk
    FROM     test_employees
    ORDER BY grade          DESC     NULLS LAST

  • New iMac (10.9.4) & now my HP Photosmart 6520 "scan to computer" function does not work

    Recently upgraded to a new iMac running 10.9.4.  Printing works well from this computer and all other devices (iPad, iPhone, etc.).  However, the "scan to computer" function does not work.  In the "Scan" section of HP Utility when I click on "Scan to Computer" the error message reads "Scan to Computer Cannot Be Enabled. The software required for Scan to Computer could not be located on this computer. Please download and install the latest HP recommended software for your device from http://www.hp.com/support, and then try again.
    Of course I have done this... twice... still no luck.  Also ran Software Update and there was an update, but it made no difference.

    Yes, did all that... in order.  It did not resolve the problem.  However, I did find what appears to be the answer.  After re-installing the driver software DO NOT immediately follow the prescribed steps.  Instead, quit the installer, restart the Mac, and an Apple software update will appear after restart.  Install that software update, and even though the computer and software do not call for it, restart the Mac again.  Only then add the printer and follow the balance of the steps.  It works!   Thank you for your help.

  • My search function does not work. How can I fix it?

    Hello
    I need help I just bough a macbook 13 inch, with snow leopard
    and the search function does not work.
    The window opens but when I write the name i searh it gives me no results.
    How can i fix it?
    Do i need really to re install all snow leopard?
    thanks
    pt

    Hello paola t & welcome to the forums
    I need help I just bough a macbook 13 inch
    It may be that Spotlight hasn't completed indexing just yet - is there a dot (indicates busy) inside the magnifying icon top right?
    Also, check System Preferences/Spotlight to see what if any exclusions are configured, etc.

  • Continuous with the problem, the headphone does not work after having my iphone ios 8.0.2 updated

    the headset does not work after having my iphone ios 8.0.2 updated to me is very annoying to have to be answering speakerphone is not private and can not go with the hands-free all the time

    I had the same issue until I updated my apps through iTunes. I had over 100 updates, but none of them showed on my iPod. After they updated everything started syncing like it is supposed. Go to the apps library and check for updates. After everything syncs leave your iPhone/ipod/ipad connected if the spinning arrows at the top is still spinning. It means that things are still being added. If you go to settings > general > about, you will see it loading songs, videos, photos, etc. If you back out of "about" and then go back to it you will see the numbers for each one change.

Maybe you are looking for

  • Reporting spam in private messages?

    G'day (I'm cross-posting this from here: http://forums.adobe.com/message/2677169#2677169) On forum messages, there's a button to report it as spam.  I cannot see any similar feature to report a private message as spam.  Anyone know how to bring spam

  • Web Gallery templates

    Hi, I am trying to find out if anyone has the template the files for the lightroom HTML gallery. Or where would I get them. I wanted to start building custom gallery files and figure this is a great place to begin. cheers

  • Java 7.13

    Hello. I'm trying to install the new update of Java (7.13 i guess) but it fails. It says instalation complete but when i run "java -version" on Terminal it comes back as 1.06 build. I read that Apple has marked Java updates as a malware but i'm wonde

  • Help ON Using Applets

    Hello, I've written an applet that is supposed to allow users to use my program on the Internet. The applet works alright but the problem is that when the applet containing the program is loaded, the functions(close, open file, and so on) doesn't wor

  • When importing photos (raw) from my 5d mkII they are turning up black in iPhoto - any ideas why?

    Photos imported from my 5d mk II are black in iPhoto - this was not the case before today.