Start a new topic

loading plugins

Original Post by: perezucf Thu Nov 7 23:27:12 2013

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?

Original Post by: perezucf Thu Nov 7 23:47:27 2013

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.

Original Post by: SteveThompson Fri Nov 8 00:00:01 2013

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[0] 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.

Original Post by: perezucf Fri Nov 8 00:17:17 2013

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?

Original Post by: SteveThompson Fri Nov 8 01:08:09 2013

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.

Original Post by: perezucf Mon Nov 11 15:52:05 2013

That was it. Once I got a 64 bit version of the dll it loaded correctly. Thanks steve

Login to post a comment