Start a new topic

mgOpenDB is returning NULL

Original Post by: spoulin Thu Jan 28 15:28:39 2010


I’m having problems with mgOpenDB. It keeps returning NULL. I’ve used it often before and it has always worked. I also tried another plugin that I made and the mgOpenDB works with the same input file. So, something tells me it’s my application setup that’s the problem but I just can’t pinpoint where it is.

First, the plugin is a standalone executable. It is not run in Creator. Second, it is an MFC application and uses MFC in a shared DLL. Third, the main differences between the first app that is not working and the second one that is, are that I’m using precompile headers in the first and the runtime library is multi-threaded debug DLL instead of mutlti-thread debug. The other major difference is that it starts with a CWinApp InitInstance call rather than void main(). Finally, I’ve declared the plugin using mgDeclarePlugin at the top of the CWinApp cpp file.

So is there anything here that looks fishy or that seems incompatible with the API I should change?



1 Comment

Original Post by: spoulin Thu Jan 28 16:22:12 2010

Figured it out! I forgot the mgInit and mgExit function.

Move along :)

Login to post a comment