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

How to pass a string in the dialog runtime


3 replies to this topic

Irina

Irina
  • Members
  • 227 posts

Posted 17 July 2001 - 22:37

Hello,
I have the c++ dll routine, in which I gather some information about the installed product at the end of the installation and write this information into the string (e.g strMsg). I want to create a dialog and pass this string in it. I mean I want to create the summary dialog after the installation, and insert this dialog in the Sequence before the last dialog (SetupComplete..).
How can I do that?

Thank you for advance,


80LPJ

80LPJ
  • Members
  • 22 posts

Posted 18 July 2001 - 18:14

One way to do it is to pass a string pointer to your dll.
here is a stub function (in C) on how to do it

-------mydll.dll---------
extern "C" long  _declspec(dllexport) _stdcall GetNextRecord( char* strMsg)
{
    strcat(strMsg,"mystring");
    return (ERROR_SUCCESS);
}
------------------------------

In your custom action (I use ISWI, so I'm not quite sure how to do this with ORCA), create the following action:

---------------------
type        131072
source   mydll.dll
target     NUMBER=[MYDLL]mydll::GetNextRecord(inout STRING=[MYPROPERTY])
---------------------

make sure that the string that you pass in your custom action is an inout string.  I also like returning numbers to make sure that the operation is sucessful.  If you don't want to do that, just change the function from long to void, and then make sure to remove the variable NUMBER in your custom action.

I omitted other steps here.  I'm assuming you know how to export your dll and know how to create custom actions using dlls.

Hope this helps, let me know if you got it working.

80LPJ
ISWI user


Irina

Irina
  • Members
  • 227 posts

Posted 18 July 2001 - 20:03

Hi,
Thank you for the answer.
A couple of things:
I need to create the deffered custom action to get this info string. I don't know how can I pass this string into the Windows Installer dialog at the end of my installation?
If anybody knows post reply please.
Thanks,