Jump to content

How to get list of dymanic VIs included in an executable?


Recommended Posts

With the development system I can get a list of dymanic VIs (they start with a unique string) by using List Folder VI. These VIs are displayed to the user.

When I built the executable I put all the dynamic VIs in the Always Included box on the Source Files tab. So now I assume they should be contained within the exe. How do I get a list of the dymanic VIs from the executable?

George

Link to comment

Hmm - maybe list the VIs included in the exe, and then compare the list with the all VIs in memory - those not listed are dynamic? I can see how there would be exceptions though. Or maybe you could open each VI in the exe and get it's caller - those without callers are dynamic? No, because you'd be the caller. Requires more thought I think...

Link to comment

If they are include in the EXE, I think they are in memory when the EXE is loaded. Try and let me know.

That is almost surely wrong. When the EXE loads and executes, the startup VIs load and run, and that's it. There is no mechanism for dynamic VIs to be loaded unless you write code to load them.

George, by nature it should be hard to browse the EXE for VIs. It used to be really easy, since it was just an LLB, but finally NI tightened the security. No offense intended, but I don't want you or anyone else looking into our executables and harvesting the names of our proprietary routines. But if it's your code, you have some options. You can drop all of your dynamic VIs into "Dynamic VI Container.vi", and include that as the only Dynamic VI in your project. Then code running in your EXE could load it and get its callees from its VI reference.

If that's too ugly and/or slow, you could mantain a list of those VIs (you could actually get that from the lvproj build specs with property nodes, but it might be easier to just maintain your own list). Store the list as a default value of a simple subvi and build that into your EXE.

Link to comment

That is almost surely wrong. When the EXE loads and executes, the startup VIs load and run, and that's it. There is no mechanism for dynamic VIs to be loaded unless you write code to load them.

George, by nature it should be hard to browse the EXE for VIs. It used to be really easy, since it was just an LLB, but finally NI tightened the security. No offense intended, but I don't want you or anyone else looking into our executables and harvesting the names of our proprietary routines. But if it's your code, you have some options. You can drop all of your dynamic VIs into "Dynamic VI Container.vi", and include that as the only Dynamic VI in your project. Then code running in your EXE could load it and get its callees from its VI reference.

If that's too ugly and/or slow, you could mantain a list of those VIs (you could actually get that from the lvproj build specs with property nodes, but it might be easier to just maintain your own list). Store the list as a default value of a simple subvi and build that into your EXE.

Yes, it's definitely wrong. I tried it. What did work was this (although it isn't as elegant as I'd like):

1. All dynamic VIs are put in the Always Included box on the Source Files tab.

2. On the Source File Settings tab I set the Destination for each of the dynamic VIs as Support Directory. This loads each of the dynamic VIs to the support directory. I guess this would be a problem if you wanted to keep all you VIs secret, but all my stuff is in-house.

3. Getting a reference to the dynamic VIs requires some different code for the run time system vs the development system.

George

Link to comment

That is almost surely wrong. When the EXE loads and executes, the startup VIs load and run, and that's it. There is no mechanism for dynamic VIs to be loaded unless you write code to load them.

You are right, I've never test this because I use an another way to load dynamic VIs.

If you use Static VI Reference (see attachment) :

- You don't have to add explicitly your dynamic VI in your build specification

- You can rename your dynamic VI worriless

- Your dynamic VI is hidden from end-users

- code is the same in development or runtime

As far as I've understood the question, I think this can fit with the issue.

Regards,

post-853-005243000 1288342383_thumb.png

Link to comment

You are right, I've never test this because I use an another way to load dynamic VIs.

If you use Static VI Reference (see attachment) :

- You don't have to add explicitly your dynamic VI in your build specification

- You can rename your dynamic VI worriless

- Your dynamic VI is hidden from end-users

- code is the same in development or runtime

As far as I've understood the question, I think this can fit with the issue.

Regards,

Yes, if you can use static VI refs, that is far easier than any other method. You only need to load stuff by name if it's important to take it in and out of memory under programmatic control.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.