PDA

View Full Version : Calling a function from a Custom Action



huntant
04-03-2002, 02:02 PM
I've written a function that I call from a custom action. Can someone tell me what is wrong. I always get the following error when it is called: "Error 1723: There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run."

Here is my function:
UINT __stdcall TestFunction( MSIHANDLE hInstall )
{
MessageBox( GetForegroundWindow(), "Beginning of function", "", MB_OK );

return ERROR_SUCCESS;
}

I've done a dumpbin on the DLL and the function has been exported.



Anthony

Bloomerville
04-04-2002, 07:34 AM
When you set up your custom action, what choices did you make? For example, are you exporting from a standard windows library or windows installer library(dll). I am assuming that you are getting the function from a dll that is stored in the binary table, because depending on where you sequenced your action, the file is not on the target machine (is you chose "Installed with Product".

Answers to these questions, will give a better idea on the issue.

huntant
04-04-2002, 09:09 AM
Turned out to be the dll that I was working with. I was trying to modify an existing one, and it contains methods that work under WinNT, but I'm testing on WinXP. I greated and

Thanks for the help though.



Anthony