Hello

I need to call a C/C++ DLL function using rundll32.exe. One of the arguments to this utility is the list of arguments actually passed to the exported (entry point) function.

Is it possible to pass the address of parameters or variables used in IB as argument to the exported function?

To put it in other words, what is the syntax to get the address of a parameter (or) variable in IB?

Thanks Kannan

asked 06 Aug '12, 08:51

kmanday's gravatar image

kmanday
1777
accept rate: 0%


Unfortunately it is not possible - InstallBuilder does not offer access to the variables' internal storage.

If you need to call a DLL with more complex data, we recommend creating a small .exe file that does the same thing and properly maps arguments to the binary to match the library's entry point arguments. It should then be just a <runProgram> to the rundll-like wrapper you create with the parameters/variables as arguments.

link

answered 06 Aug '12, 09:31

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Thanks for the quick response.

I am not sure if I have conveyed across my requirement. Let me put it again little differently.

The intention of passing the address of IB variable to the DLL function is to use the same IB variable with modified value as an input to a predefined action of IB for example to update a parameter in an INI file. Since the variable's value has to be captured in a screen which couldn't be designed using IB, we have to go for a DLL that provides the screen.

If my understanding is correct, it is not possible using IB right?

Thanks Kannan

(06 Aug '12, 09:43) kmanday

Thanks for the quick response.

I am not sure if I have conveyed across my requirement. Let me put it again little differently.

The intention of passing the address of IB variable to the DLL function is to use the same IB variable with modified value as an input to a predefined action of IB for example to update a parameter in an INI file. Since the variable's value has to be captured in a screen which couldn't be designed using IB, we have to go for a DLL that provides the screen.

If my understanding is correct, it is not possible using IB right?

Thanks Kannan

link

answered 06 Aug '12, 09:43

kmanday's gravatar image

kmanday
1777
accept rate: 0%

You can create a DLL or EXE and pass any input (i.e. current variable's value) to it.

Your DLL/EXE can simply print out results to stdout and you can get it using ${program_stdout}. If you need to report multiple values, you can use actions such as <setInstallerVariableFromRegEx> to retrieve individual values from the output.

(06 Aug '12, 09:53) wojciechka ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×41
×32
×2
×1

Asked: 06 Aug '12, 08:51

Seen: 1,809 times

Last updated: 06 Aug '12, 09:53