Build DLL Programmatically - Change Function Name

I'm using the VIs in the AppBuilder\AB_API folder to create DLLs for VIs in a project. Everything is working, but I'd like to be able to change the function name in the VI Prototype dialog box. I can't find anything in the API to accomplish this.
I found VIs in AppBuilder\AB_Classes\Source\ExportedVI that look like they can do what I want called Get_Source_ExportedVI_Data.vi and Set_Source_ExportedVI_Data.vi, but they're part of a different class and I can't seem to get the class object that they want as an input from the DLL API.
Does anyone know how to do this? 

Hi Marc,
This is a really good question. Let me look into this a bit more and get back to you.
I also suggest posting on this forum too:
http://forums.ni.com/ni/board/message?board.id=170&thread.id=475309&view=by_date_ascending&page=2
FLash
National Instruments
Applications Engineer

Similar Messages

  • DLL Adapter: Change function name & params without unloading the DLL

    Hi,
    I'm using teststand adapters API to dynamically build a DLL call step. Each dll function is called thru this "DLL Manager" sub-sequence. 
    Tried 2 methods (here is an abstract of the code): 
    1. ActiveX steps: 
    CommonCModule.ModulePath = myDllpath
    CommonCModule.FunctionName = myFunction  (note: this call unload the previously loaded DLL)
    Module -> LoadPrototype
    for( to set params)
    2. Statement steps: 
    RunState.Sequence.Main["Call DLL function"].TS.SData.Call.LibPath = myDllpath
    RunState.Sequence.Main["Call DLL function"].TS.SData.Call.Func = myFunction (note: this one not, but the info seems to not be updated => The new function is not called properly)
    Module -> LoadPrototype
    for( to set params)
    The two methods don't have exactly the same behavior, but work well for the 1st function that I call or work well if I unload the dll after step execute. 
    However, is there a way to use these steps (or others) to setup the step, but without unloading the DLL between each call. In my test sequence, I have to OpenConnection with the UUT before launching my commands, so the dll must not be unloaded to keep the connection opened... 
    e.g. 
    1) OpenConnection()  => This function keeps the communication handle with the device
    2) myCommand1()
    3) myCommand2()
    4) CloseConnection()
    Thank you for help
    C.
    Solved!
    Go to Solution.

    Hi all, 
    To recap:
    I'm looking for a method to dynamically loads and executes C/C++ DLL functions without unloading the DLL between each call. I already have a DLL manager that dynamically loads and executes dll functions, but it unloads the DLL between each call even if I set the unload option to: "Unload when sequence file is unloaded"...
    The problem is: 
    When I change the name of the function to execute (using the CommonCModule.FunctionName property), teststand automatically unloads the DLL before applying the change. Therefore, I can't open a connection handle with my UUT using one function and sends my commands with the others...
    To help you with the understanding of my issue:
    I created a simple example that will let you experiment the problem that I try to describ... You will notify that TestStand unloads the dll even if I don't request it... 
    1) download the attached zip file
    2) extract it anywhere
    3) open sequence file "dll_called_dynamically.seq"
    4) read comment of the first step of the sequence
    >> To analyse the case:
    >> 1) Break and run the sequence using step-by-step (use F10)
    >> 2) Run one iteration of the loop to execute the dll once, ,
    >> 3) Execute launch_listdlls.bat and verify in the outputfile.txt that the dll has been loaded (search for testlib.txt)
    >> 4) Then, step over the step "Set Dll Function Name to call"
    >> 5) Execute launch_listdlls.bat and you will notify that the dll has been unloaded... ...
    The testlib.dll file provided in the zip file is a basic dll that I used to confirm my test engine. Mainly, it only performs additions on the variables passed as argument to the dll. 
    The provided batch file executes the free application ListDlls.exe and create an outputfile.txt listing all currently loaded dll.
    Please note that I use TestStand 2013
    Thank you very much for your help,
    C.
    Attachments:
    dll_unexpected_unload_ex.zip ‏313 KB

  • I'm getting a "The procedure entrypoint ssSr192x__​ssSr192drv​ssSrReset could no be located in the dynamic link library ssSR192x.d​ll" because the ActiveX instrument driver DLL doesn't have the function names in the export table.

    Is there a way for my CVI project to reference the functions in the ActiveX without including the instrument .fp in the project?
    Thanks much.
    I'm confused on how CVI uses ActiveX components and hope someone can help.
    I'm using an ActiveX driver from an instrument manufacturer and I use the .TLB to generate a .fp, .c, and .h file. If I register the .dll and load the .fp in my project, all is well. Unfortunately in my application the functions to control this instrument are in another DLL whose .lib I include in my CVI projec
    t. Running the CVI project this way gives me "The procedure entrypoint ssSr192x__ssSr192drvssSrReset could no be located in the dynamic link library ssSR192x.dll" because the instrument function names aren't in the export table in the instrument DLL. Non-ActiveX DLLs have the export tables so everything works for them.
    Program structure with non-ActiveX DLLs:
    CVI project (.exe with common.lib in project list)
    |
    V
    Common DLL (MeasDMM() with hp1234.lib in project list)
    |
    V
    Instrument DLL (hp1234_measure())
    Since I get a .c and .h file from the .TLB, I've tried recompiling the DLL (.dll and .lib produced) and the functions seem to work, but I get "Class not registered" errors unless I play games with the registry so I'm obviously violating numerous Microsoft rules!
    Is there a way for my CVI project to reference the functions in the ActiveX without including the instrument .fp in the project? Thanks much.
    Jeff Fish
    Advisory Test Engineer
    StorageTek

    Hello Jeff,
    Where were your getting the .lib file for the ActiveX DLL? Did you use the "hp1234"
    ActiveX driver generated by the "Create ActiveX Automation Controller" CVI Tool to build a static library? If you open an include file and choose Options >> Generate DLL..., it will generate source code or a static import library to load the specified DLL and load functions specified in the include file (this only works if the functions are exported from a DLL). However, in the case of our ActiveX Automation Controllers, ActiveX calls are used to access a DLL. This means that you do not need an import library. You should be able to open the "hp1234" source file and click Options >> Create Object File. Simply #include "hp1234.h" and add "hp1234.obj" to your Common DLL project;
    the .fp file is not necessary. If this does not answer your questions or if you experience further difficulty, please post further details on what you are doing and the errors that are being encountered ("play games with the registry" and "recompiling 'the' DLL" are a bit vague in this case).
    Jeremiah
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Can I create a dll from labview with more that one function name

    I know that when I create a dll from C and then call it in labview using the call library function node I can see the different functions on the configuration screen. Is there a way to create a dll in labview to have more than one function name? No matter how many functions happen in my VI it seems to build into a dll under the same function name requiring inputs for every function, can this be avoided somehow?
    Thanks,
    Dave

    Each function corresponds to a separate VI. When creating the dll, on the Source Files tab of the app builder, click the Add Exported VI for each VI that you want. SubVIs of a main are not automatically exported and will not be available as separate function calls.

  • Change User Function Name

    Hi all,
    I'm trying to create menus & responsibilities using data loader so that I don't need to recreate it manually but data loader crashed because some of the user function name are the same.
    For example, open Sysadmin -> Application -> Menu -> AP_PAYMENTS_ENTRY_GUI12 in Vision. In Seq. 3 we have Payments menu with AP_APXPAWKB_CHECK_MENU submenu and Payments functions. Tried to search in Functions LOV and we'll get some User Function Name equal to Payments but different Function Name.
    I'd tried to change some User Function Name and all the menus that directed to it changed too, the referential integrity worked I think :P but I want to ask whether it will caused any trouble if I changed it in Test & Production environment?
    Thx.

    I don't consider those to be "hacks" in my book
    They are just bad design approaches:
    In the first case, you will loose the audit trail to the caller.
    In the second case you will be forced to grant authority to the end user to open a step in another user's context. That will open another backdoor for them as well in SM37 etc...
    > PS: If the real problem is just that you cannot grant the authorization on a certain function module as it is used in different standard applications so the authorization for your program would result in to powerful authorizations in sap standard transactions, the I would copy the function module and use it. This Z fm could be authorized bypassing this problem.
    A better option with less coding involved, would be to use SU24. This way you keep the audit trail and isolate the transaction as being an exception to the standard checks for one specific object. An auditor might wonder why a user can release a PO when they don't have one of the required objects, but they will easily find it if they know where to look.
    It is also easy to do this in a secure way, such that you can document it for the auditor and give it to them upfront to understand. A good auditor should understand and appreciate that.
    If you achieve this programmatically with tricks, you will have a tough time... (as will the auditor).
    I have done many audits and also hunted down some dodgey coding in my time. The idea should not be to run away from the auditors, but rather expect that they know what they are talking about and make your design compliant with their and your client's control requirements.
    This should be the approach regardless of whether or not you can change sy-uname as a developer.
    The original question might also have been: "Can I pass a backdated authority-check against a user who once had the authorizations way back when?" Same thing... bad idea...
    Cheers,
    Julius

  • Programmatically Changing Build Version

    We are wanting to automate our build process and we have a particular problem. We have been looking into the Jenkins tool and quite possibly, LabVIEW 2011 may help us out when we upgrade, not sure though.  But before we look outside of LabVIEW for a solution, we want to run this dilemna by some of the LabVIEW users. We are using the Unit Test Framework and let's say we have some unit tests in our project. We wrote a wrapper VI that will do the following:
    1) progammatically execute the unit tests using the Run Tests from File.vi.
    2) unbundle the test status from the output cluster array and look for a "Passed" result
    3) if the result is indeed "Passed" then this means that the overall results for the unit tests are OK and go ahead and call the Build Targets Programmatically.vi with the appropriate path, name of build and target. The name of the build is set in the properties of the build specification in the project.
    This works fine. What we want is the ability to either auto-increment the version number (which the checkbox is selected in the build properties) or set a version for the build. Only when you press the Build button in the build specification properties does the version get incremented automatically, not via programmatically.

    In versions before LabVIEW 2014, this was truly difficult, as the Version Number for a particular Build Spec is stored deep within the XML that is part of a Project (modify at your own risk).  There are also some inconsistencies in the XML Tags, in particular whether the third dotted number of the Build Spec is called "Fix" or "Patch".
    LabVIEW 2014 introduced a Set Build Specification Version that allows you to set the Build Spec within the Project by supplying the name of the Target (usually "My Computer"), the name of the Build Spec, and the path to the Project file.  There is also in LabVIEW 2012 and higher (I don't know if this is present in LabVIEW 2011) a Build option called a Pre-Build Action, whereby you can specify a VI to run before the Build takes place.
    In my LabVIEW implementation, my LabVIEW Projects live inside folders that are part of a SubVersion repository.  I wrote a utility that, given the path to the Project File, can return the SubVersion Build number.  Using the Pre-Build Action, I can call this Utility, get the SVN Build Number, and use Set Build Specification Version (or other LabVIEW code to diddle the Project XML file directly).
    This, in fact, works, but there's a bug -- the file that results from this Build does not have the Build number specified by the Pre-Build Action.  It turns out that as part of the Build process, the Version is cached first, then the Pre-Build Action is applied (updating the Version, perhaps), then the Build takes place using the cached Version.  The "simple fix" is to Build twice -- the first time to save the SVN Version into the Build Version number, the second time to use this saved Version number in accomplishing the Build.
    I've alerted NI to this conundrum.  I didn't get the sense that they are willing or eager to change this behavior.
    Bob Schor

  • I found the solution to a Mavericks bug on the Mail program. How can I share it? Several of my mail boxes stopped functioning properly when I updated to Mavericks. After long hours, I discovered that if I change the name of the mailbox, the content works.

    I found the solution to a Mavericks bug on the Mail program. How can I share it? Several of my mail boxes stopped functioning properly when I updated to Mavericks. The title of the mails stored in the mailbox appear, but the content was unavailable.
    After 4 long hours at the phone with the Apple staff unable to help me, I discovered that if I change the name of the mailbox, the contents of the mails stored there become available.
    Please, make this solution available to other people!

    You have found the the way to share it.   Include your problem and its solution in a forum post in the Mavericks forums.   Then mark you own post with a green solved star.
    Note.  You won't get any points for that; points are only awarded where you mark someone else's post as either helpful or solved.

  • How do I programmatically change the plot legend names on my xy graph?

    I have a need to change the names/labels on my XY Graph's Legend at run time.  This is because plot 0 is not always the same set of data.  I have searched high and low for a couple days now to no avail.  The closest thing I've seen is overlaying a string over the plot legend, but I would prefer to do change the property of this box.  Any help would be appreciated.

    Hello Ben,
    with waveforms this also works for me fine. So where is the pitfall? (if always all works fine, one don't really gets experience)
    greets, Dave
    P.S. @ J.B. I used the Code Capture Tool from the Starware Thread, this made me so fast. If I could do, I would give it five stars each time I use it.
    Btw. would it be possible to programmatically give ratings with LV? Here it should be used. Thanks again to tst & the others
    Message Edited by daveTW on 06-14-2007 09:13 AM
    Greets, Dave
    Attachments:
    Example_FP.png ‏5 KB

  • Batch file rename.  I have multiple files I want to rename, that have a date in their name in the mm/dd/yy format. The slashes seem to freak out the batch rename function.  Any workarounds that would help me avoid manually changing each name?

    OS X Yosemite 10.10.2, Macbook Air,
    Finder batch file rename function. I have multiple files I want to rename, that have a date in their name in the mm/dd/yy format. The slashes seem to freak out the batch rename function and it won't work.  I took out the slashes and worked fine.  Any workarounds that would help me avoid manually changing each name?  I should point out that I want to leave most of the name intact just change the first word in each name.  Also the files I'm working with are in PDF format.

    That's a comment in the file. It has no effect at all.

  • HT204053 Our Apple ID is ok and functioning.  However, I just came on as the IT for the group and cannot find how to change the name.

    Our Apple ID is ok and functioning.  However, I just came on as the IT for the group and cannot find how to change the name.

    Assuming you mean the personal name associated with the account, as opposed to the login (which you can change if it's not an @icloud.com. @me.com or @mac.com address) you can change this at http://appleid.appla.com . Click on 'Manage your account' and then on 'Edit' next to 'Your name' and the name currently associated with the ID.

  • [svn:osmf:] 9830: Changing a function name.

    Revision: 9830
    Author:   [email protected]
    Date:     2009-08-31 06:47:49 -0700 (Mon, 31 Aug 2009)
    Log Message:
    Changing a function name.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/composition/CompositeViewableTrai t.as

    Have you consulted the documentation in the SDK about what methods are available? It will show you how to get the list of fields and/or the proper count for iteration.
    IIRC you can't change the name via VBA

  • Change Driver Function Names

    Greetings,
    I have a IVI Custome Specific Driver where I intially chose a name for the Class and its Functions. The driver works and I am good. I want to change the names of the Class and its functions. I did a search and replace within the C and H file, but I can't seem to change the links between the *.fp file and the code. Is there an easy way to change the names?
    Thanks
    Minesh

    Hi Minesh,
    The way to change the *.fp files is to change them inside those files. You can expand the function panel tree and right click on the individual nodes. There is an option for edit the function panel node and edit node. Edit function panel node will allow you to change the look of the function panel and edit node will allow you to change the name. I have not been able to find a better process than this but I will let you know if I do.
    Patrick H | National Instruments | Software Engineer

  • Flex Builder 3 error when changing project names

    When you create a Flex 3 project (ex. Test1) and then rename
    the project (ex. Flickr) the URL settings for the project do NOT
    change. The stay as the original. Using the examples provided the
    are originally:
    http://localhost:3000/Test1/flex_bin/FlickrRIA.html
    Even after changing the name of the project the URL settings
    still default to the above and not to:
    http://localhost:3000/Flickr/flex_bin/FlickrRIA.html

    Found the problem in the FlexBuilder.ini file. I had to reduce the memory settings like this:
    -Xms768m
    -Xmx768m
    Also see here: http://www.blog.techsplice.com/archives/38

  • Change the name of the BP in partner function

    Hi everyone,
    We are using one-time BP's in opportunity creation.
    Users enter the BP number 100000 and change the name of the customer and save the transaction.
    The process works fine in SAP GUI.
    Unfortunately it does not in PCUI.
    Neither in Overview tab, nor in Partners tab, can you change the name of the BP. The field comes read-only.
    I checked the related field groups (OPP_PARTNER and OPP_OVERVIEW_PARTNER_50), but there is no read-only check.
    Any comments?
    Thanks.

    Hi,
    Please check the read-only flag set for the field group field involved here in both the transactions- CRMC_BLUEPRINT(for the standard setting) and CRMC_BLUEPRINT_C(for customer setting). In either of this you may find that the field is set as read-only. If you wish to make it an editable field, remove this setting and re-generate the layout for this field group. Also note that you may be referring to a wrong field group if it's a multi field group, you may need to go further and get all the list of field groups involved in that. I hope it helps.
    Cheers,
    Gyan.

  • What will happen if I change the name of my Apple Id?

    I have only one Apple Id, which is my email address "[email protected]". My Apple Id and primary email are the same. I now have a new email address, and want to change my Apple Id to my new email address. I've been to the Apple Id support page, and have found out how to change the Apple Id on the Apple Id support webpage. I've been reluctant to go through with the process, because I'm unsure as to what the consequences will be if I change my Apple Id. I have an iPhone and an iPad as well as two Macs and an Apple TV hooked up to my Apple Id. My iMac is the main computer used for storing all files and syncing my iOS devices. In addition my contacts and calendar is in the iCloud. I hope someone with the know-how or experience can help me answer the following questions:
    1. iPhone and iPad: Once I change my Apple Id, have I understood it correctly when the next thing I do is that I go to General settings -> Store, and sign out from my "old" Apple Id, and then sign in with the new name for my Apple Id? Will my previous purchases of music, ibooks and apps be connected to the new name of my Apple Id, and will I still be able to get previously purchased apps updated? As for iCloud, what must I do on my iPhone and iPad to make sure that contacts and calendars keep in sync?
    2. iCloud: Will changing the name of the Apple Id on the Apple Id support webpage be the only thing I need to do, or are there more steps to follow?
    3. iMac and MacBook Pro: Am I right in assuming that all I need to do is sign out from the old named account and then sign in with the new name in AppStore, iTunes, FaceTime and Messages app? Is the Apple Id in use by any other apps or functions?
    4. Apple TV: Once my iMac is up and running with the new name of the account, I sign out from the old named account, then sign in with the new name, will streaming music and photos etc. work just as before the name change?
    5. I still haven't activated Mail in iCloud. As I understand, once you do that you will be prompted to register a @me.com or @icloud.com email address. Will this address now be possible to use instead of my new email address as the name for my Apple Id?
    A lot of questions, still I'd be grateful for some answers.

    Yinghai wrote:
    Hi, everyone,
    I just began to use TM to back up my mac. I already have a full backup. Now I want to exclude some folder from backup. I can do this in the option dialog of TM. But I wonder what will happen after I add a new exclude folder. Will TM begin to build a new full backup or just continue to back up incrementally from the older full copy? Thanks.
    Time Machine will continue to do incremental backups.
    It won't immediately delete previous backups of the items you exclude (but it will, eventually). You can do that yourself, if you want, per #12 in the Frequently Asked Questions *User Tip,* also at the top of this forum.

Maybe you are looking for

  • Financial reporting studio compatibility

    Hi, We have two Hyperion projects( 1st team uses 11.1.1.3 and 2nd team uses 11.1.2.1) in the company . Now Financial reporting developer wants to create reports for both the projects using same FR studio. Please advice how to connect to Essbase 11.1.

  • Can't turn on icloud

    Can't seem to turn icloud on or off as icloud option in settings is greyed out Can't add or amend email accounts either as the settings options are greyed out Same for Facetime and Facebook and twitter Any ideas??

  • I'm having trouble viewing video's on my macbook.

    Greetings all. I have a macbook and for some reason, I've been having trouble viewing online video's.  And it happens with all sites, youtube, dog world, ect. The video stops and has that circle in the center, then plays a little more, then stops aga

  • No Movies in Purchased

    I recently purchased a couple of movies - one from my Mac and one from my Windows box. They were both purchased from my account and show up in my purcahse history. iTunes tells me that both machines are authorized. I would now like to download the mo

  • Is form builder changed in R12 ?

    Dear members, Oracle recently released its new version R12. I am not sure what will be Form Builder like in R12. I heard that there is no more Form bulider in R12 and It is being replaced by oracle applications frame work. Is this true ? I request al