cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Marc_Morin
Level 2

SendMessageTimeout and Basic MSI with IS2008

From a Basic MSI, within IS2008, I am trying to create an InstallScript to call SendMessageTimeout. It was suggested that this code (see below) would take care of the issue, however, when I try to compile, I get an Error 'SendMessageTimeout' : undefined identifier.

SendMessage is listed under the Help for IS2008, but SendMessageTimeout is not. Is it something I can use with IS2008 Basic MSI? I created the setup.rul file and added the RefreshEnvironment() function under MyFunction(hMSI). But the build doesn't look like it can find the SendMessageTimeout. Am I missing a .h file? If yes, which one and where can I get it.


//////////////////////////////////////////
function RefreshEnvironment()
STRING sParam;
POINTER pParam, pResult;
LONG lResult;

begin
sParam = "Environment";
pParam = &sParam;
pResult = &lResult;

SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, pParam, SMTO_ABORTIFHUNG, 100, pResult);

end;
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

You might need to prototype the SendMessageTimeout API function yourself; searching these forums for "prototype SendMessageTimeout" should turn up some examples. The InstallShield documentation on prototyping external API functions and DLL functions should explain what's going on.
0 Kudos