Is there any way to see if a plugin is loaded from my stand alone application? According to the documentation I simply need to drop in the dll into a plugins directory and it should be good to go.
Anyway, When I try to create a new extension node I always get back null. Is there any way in code I can check if it is even loaded?
Ok, so I looked at the output and it only gives me the version number and plugin <fltdata.dll> loaded. The plugin im trying to use is not printed out. Any suggestions on how to debug? All I did was copy the dll and put it into a plugins directory I created where my executable resides.
Ok, the first thing you want to get is a message from mgInit saying:
Loading plugins from folder <blah>
If you get this message, mgInit found a plugins folder. It does not sound like you are getting that message. Is that correct?
Assuming that is the case and you have the following setup:
You've done it all correct. For this to work, however, you need to tell mgInit where your app is located. This is passed as argv to your program's main function. You must forward argv and argc to mgInit so mgInit gets the correct path to your exe.
Are you calling mgInit like this:
mgInit (& argc, argv);
If not, give that a try and let me know what you find.
I was not calling mgInit in that way and changing it seemed to fix it. Thanks!
It seems to be trying to load the plugin but gives me an error code of 193. Any clue what that means?
The OpenFlight API is using LoadLibrary to "open" your plugin DLL. These error numbers are most likely from the LoadLibrary call. A guick google search on "LoadLibrary error 193" shows a likely suspect:
Let us know what you find out.
That was it. Once I got a 64 bit version of the dll it loaded correctly. Thanks steve