Call a function in a Windows Installer DLL
Posted 03 December 2001 - 16:45
I am trying to call a function in a Windows Installer DLL stored in the Binary table.
I did a Custom Action to call this funcion.
When I place this Custom Action during the Execute Sequence, it works correctly.
When I place this Custom Action during the UI Sequence, the funcion is called, executed and then it happens an internal error 2735. This Windows Installer error means "Custom action terminated prematurely".
May I not use this kind of Custom Action during the UI Sequence?
What else can I do?
Thank you for your help,
Ajawl
Posted 03 December 2001 - 19:25
What does this custom action do? I seems to me you coudln't use some MSI function in UI sequence.
Posted 04 December 2001 - 11:35
Originally, the DLL function called by the Custom Action executes API functions and then the MSI function MsiSetProperty( ).
Just to test, I compiled again the DLL without code inside the same funcion. But then I had the same Windows Installer Internal Error 2735 while trying to execute the Custom action (which called the empty function) during the UI sequence.
My Custom Action is defined as follows:
Type: 65
Source: NewBinary1 (the DLL is saved at the Binary Table)
Target: MyFunction
The definition of "MyFunction" in the DLL is as follows:
__declspec(dllexport) void MyFuncion (MSIHANDLE hInstHandle)
{// empty function
}
Is it not possible?
Thank you for your help,
Ajawl
Posted 04 December 2001 - 12:37
{// empty function
return ERROR_SUCCESS;
}
Posted 04 December 2001 - 14:42
I compiled "MyFunction" with the calling convention _stdcall and now the Custom Action is working.
Ajawl