This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Invalid handle from MsiGetProperty fn
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jul 08, 2008
09:25 AM
Invalid handle from MsiGetProperty fn
Hi,
I'm invoking a dll using my installscript from a inscript execution "Immediate" custom action.
The following code inside the dll gives an error as ERROR_INVALID_HANDLE:
MsiGetPropertyA(hInstall, g_Prop[eProp].pPropname, &g_PropBuffer[nLenUsed], &nLenUsedorFree);
I found this out by debugging the code, any help or suggestion would be highly appreciated.
Thanks.
I'm invoking a dll using my installscript from a inscript execution "Immediate" custom action.
The following code inside the dll gives an error as ERROR_INVALID_HANDLE:
MsiGetPropertyA(hInstall, g_Prop[eProp].pPropname, &g_PropBuffer[nLenUsed], &nLenUsedorFree);
I found this out by debugging the code, any help or suggestion would be highly appreciated.
Thanks.
(3) Replies
‎Jul 08, 2008
10:57 AM
The MsiGetProperty function should be used instead of MsiGetPropertyA. The handle passed to a script custom action is not directly passed to MsiGetPropertyA by the InstallScript engine.
‎Jul 10, 2008
10:39 AM
Where is the hInstall variable declared? Is it the parameter passed to your script custom action function? Can you reproduce this behavior in a sample project?