Jump to content


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.
Photo

1723 error with CA dll function


1 reply to this topic

brassrat

brassrat
  • Members
  • 11 posts

Posted 17 January 2002 - 22:30

ok - i know i'm doing something wrong - but what?
i'v created a simple dll:
#include "windows.h"
#include "msi.h"
#include "msiquery.h"
extern UINT __declspec(dllexport) __stdcall test(MSIHANDLE);


// This is an example of an exported function.
__declspec(dllexport) UINT __stdcall test(MSIHANDLE hInstall)
{
return ERROR_SUCCESS;
}

i build the dll
i add CA to run function in windows installer Dll  from binary table, function name 'test', execution immediate
I add CA to UI sequence just before executeAction
i create the setup.exe
when i run the setup  i get error 1723 - this is on windows 2000, i have msi 2.0 installed but i am using ISWI 1.52.
What am i missing


KiwiGeek

KiwiGeek
  • Members
  • 19 posts

Posted 06 March 2002 - 06:26

You'll probably find that the exported function name in your DLL file has C++ decorations on it. To check, use a tool like Dependency Walker to view the exports.


If your exported function name is decorated, you'll have to put your exports in a DEF file. To do this:

1. Change the function prototype to:
Code Sample
extern "C" UINT __stdcall test(MSIHANDLE)


2. Create a new file with the same name as your C/C++ source file, but rename the extension to ".DEF". Enter the following text into the file:
Code Sample
EXPORTS
   test


Recompile your DLL and check the exports again. This time it will be called simply "test"
Jamie
The geek shall inherit the earth