Can I call a C++ function from an imported DLL in InstallBuilder?

Comments

1 comment

  • Avatar
    juanjo

    We do not have a built-in action to call functions from dlls but you could use execute them using the rundll32 command. The basic usage is:

    RUNDLL32.EXE <dllname>,<entrypoint> <optional arguments>
    

    Or using InstallBuilder code:

     <runProgram>
        <program>rundll32</program>
        <programArguments>${installdir}/lib/your.dll,entryPointToYourFunction ${args}</programArguments>
     </runProgram>
    

    For example, to open the control panel applet for configuring the display properties center:

     <runProgram>
        <program>rundll32</program>
        <programArguments>shell32.dll,Control_RunDLL desk.cpl,,0</programArguments>
     </runProgram>
    

    The only requirement is that you must implement your functions as entry points. You can find additional information here.

Please sign in to leave a comment.