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

Call a dialog from DLL when a MSI page is shown


3 replies to this topic

SOWI

SOWI
  • Full Members
  • 29 posts

Posted 24 July 2002 - 08:52

I have a complex custom dialog inside a DLL.
I want to call that DLL as a Custom Action if a certain MSI dialog page is displayed.
How can I start that CA?
I can trigger a DoAction event on a push button but I didn't found a possiblity to fire such an event on "InitDialog" or something like that.
My favorite solution would be to start the CA (and the dialog) when the MSI dialog is displayed the first time and unload the DLL (and destroy the dialog) when the MSI page is destroyed.
Any suggestion would be helpful.
Frank Dering

Irina

Irina
  • Members
  • 227 posts

Posted 30 July 2002 - 21:35

Hi,
You can import your dialogs from DLL to the MSi project. Do this:
1. Compile MyProject.rc to MyProject.res with the following command-line statement:
>rc MyProject.rc
2. Build a DLL with the following command:
>link /DLL /NOENTRY /NODEFAULTLIB /MACHINE:iX86 /OUT:MyProject.dll MyProject.res
3. Open your .ism project.
4. Right-click the All Dialogs folder and select "Import Dialogs from Resource DLL".
Best wishes,
Irina Shirinsky
Software Engineer, Heroix Corporation
http://www.heroix.com

SOWI

SOWI
  • Full Members
  • 29 posts

Posted 31 July 2002 - 13:15

Hi,
your are right. But my goal is to reuse the whole dialog logic (message handlers etc.) and not only the resource of the dialog. ;-|
Frank Dering

Generous

Generous
  • Members
  • 53 posts

Posted 13 August 2002 - 09:39

Quote
I can trigger a DoAction event on a push button but I didn't found a possiblity to fire such an event on "InitDialog" or something like that.


You need create and export from your dll function that create and execute your dialog. Then you need create custom action (i.e. type 1) and call this action from DoAction.

Quote
My favorite solution would be to start the CA (and the dialog) when the MSI dialog is displayed the first time and unload the DLL (and destroy the dialog) when the MSI page is destroyed.


When you call custom action from dll each time this dll unpacked, loaded, called, unloaded and deleted automaticaly.

You can't load this dll at start installation and unload this at and of installation.

Another way - using casto bootstrap application (setup.exe) that load your dll, ru your installation package and at end unload your dll.


sorry my english...


Evgeny Ushkaloff

Senior Software Developer / Setup Coordinator
Aelita Software Corporation
www.aelita.com