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

Cant' Open MsiDatabase


1 reply to this topic

mfw

mfw
  • Members
  • 12 posts

Posted 26 September 2005 - 17:15

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.

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!

luke_s

luke_s
  • Full Members
  • 532 posts

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.