Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Pass parameter to custom action 17


1 reply to this topic

dbcn

dbcn
  • Full Members
  • 4 posts

Posted 06 February 2008 - 22:59

Hi there, is it possible to create a custom action to call a dll function with one or more parameters? The msdn documentation says that the prototype for the dll function you can call has to be UINT __stdcall MyDllFunction(MSIHANDLE hMsi).
Is there a way to have a function like UINT __stdcall MyDllFunction(MSIHANDLE hMsi, string param1, int param2)?


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 07 February 2008 - 00:16

That's not possible.
The preferred solution is to have the exported function ask for the extra parameters, using MsiGetProperty(). This solution assumes that the parameters can be stored inside a property, meaning that they can be represented by a string. Usually that is not a problem.