View Full Version : Add a DLL and call a function

06-27-2008, 01:25 PM
Hey there,

I want to add a DLL to the setup and then call it on the OnAppSearch() function. Not during the actual install process.

Perferably an example on where to add the file, how to call the dll, and pass / get results.

Where can I find documentation on how to do that?


06-27-2008, 02:21 PM
Alright I found the first part:

Behavior and Logic > Support Files/Billboards > Language Independent

And to call that sucker, you use SUPPORTDIR to get the correct path, not SourceDir.

Now can I reference a DLL that I created in C# and call a function and return some data? If so, how would I go about doing that?

06-27-2008, 02:23 PM
For a C-callable DLL in an InstallScript project, you'll want to look in the help and these forums for UseDLL and UnUseDLL, along with how to prototype an exported DLL function.

For calling C# methods in InstallScript, please look up DotNetCoCreateObject (and search older forums for CoCreateObjectDotNet).

06-27-2008, 03:45 PM

I got it all working nicely.

Thanks for the help!