I am attempting to call a test DLL created by someone at my company (see source at end of email). The MS Visual C++ project creates 'MyTest.DLL' and 'MyTest.LIB' when compiled. In my basic IS Dev project, I have tried calling the DLL from the binary table (immediate execution after CostFinalize and deferred execution after InstallFinalize) as well as "installed with the product" (immediate execution after FileTransfer and deferred execution after InstallFinalize). I am not getting any type of error message during the install. The test dll is supposed to display a message box showing the value of the retrieved property.
Any ideas here? Is it my installer or the DLL itself (code below)?
MyTest.DLL source:
#include <windows.h>
#include <msiquery.h>
UINT __stdcall My_TestCA(MSIHANDLE hInstall)
{
TCHAR* szValueBuf = NULL;
DWORD cchValueBuf = 0;
UINT uiStat = MsiGetProperty(hInstall, TEXT("MY_TEST_PROPERTY"), TEXT(""), &cchValueBuf);
if (ERROR_MORE_DATA == uiStat)
{
++cchValueBuf; // on output does not include terminating null, so add 1
szValueBuf = new TCHAR[cchValueBuf];
if (szValueBuf)
{
uiStat = MsiGetProperty(hInstall, TEXT("MY_TEST_PROPERTY"), szValueBuf, &cchValueBuf);
}
}
if (ERROR_SUCCESS != uiStat)
{
MessageBox(GetForegroundWindow( ),
TEXT("There was an error"),
TEXT("Value of MY_TEST_PROPERTY"), MB_OK | MB_ICONINFORMATION);
return ERROR_INSTALL_FAILURE;
}
MessageBox(GetForegroundWindow( ),
szValueBuf,
TEXT("Value of MY_TEST_PROPERTY"), MB_OK | MB_ICONINFORMATION);
delete [] szValueBuf;
return ERROR_SUCCESS;
}
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.
CA 1 OR CA 17 - Pls Help
Started by
colby
, Feb 26 2003 23:56
2 replies to this topic