Okay,
this is my first try to work with the msi-api directly. But my first try fails always. I can't open the database and i don't know why. Here is my snippet.
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.
Cant' Open MsiDatabase
Started by
mfw
, Sep 26 2005 17:15
1 reply to this topic
Posted 26 September 2005 - 17:15
CODE |
#include <msiquery.h> int main(){ MSIHANDLE hDatabase; MsiOpenDatabase("C:\\M.msi",MSIDBOPEN_DIRECT,&hDatabase); } |
Compiler says:
ErwKlassen error LNK2019: Not solved extern Symbol '_MsiOpenDatabaseA@12', verwiesen in Funktion '_main'
What's wrong with that code? I saw a similiar snippet everywhere, here I looked for help. Am I stupid?
Thanks for your help!
Posted 27 September 2005 - 06:21
An error like that means that the compiler cannot link in the function you are using.
You need to make sure you link "msi.lib" into your project as well.
You need to make sure you link "msi.lib" into your project as well.