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

Launch a dialog from CA


3 replies to this topic

kc

kc
  • Members
  • 8 posts

Posted 10 October 2001 - 08:39

Hi,
I am trying to call a dialog from CA using MsiDoAction(); Got a few clue from newsgroup but still doent work.

I try:
MsiDoAction(hMSI, "MyDialog");

The dialog, MyDialog dint appears and MsiDoAction returned 1626.

Anything that is missing? Pls help me. Thanks

KC


BobRouse

BobRouse
  • Members
  • 82 posts

Posted 10 October 2001 - 16:46

1) Put your code in a function (eg: "DisplayDialog")
2) Declare the function with
   Prototype DisplayDialog(HWND)
This is important so that the install handle gets passed in.
3) The function itself should be coded something like:

Function DisplayDialog(hInst)
begin
   MsiDoAction(hInst, "MyDialog");
end;

If the function is called from another function, the install handle should be passed in. If it is made into a Custom Action, the handle is passed in automatically.


BobRouse

BobRouse
  • Members
  • 82 posts

Posted 10 October 2001 - 16:48

One more thing... Make sure you have this line in your script:

#include "CustomDlg.h"