Comments on: ReloadPlugins /code-sample/reloadplugins/ Developer resources for the X-Plane flight simulator Mon, 04 Jan 2021 19:30:26 +0000 hourly 1 https://wordpress.org/?v=6.8.3 By: James Preiss /code-sample/reloadplugins/#comment-36128 Fri, 10 Apr 2020 20:57:42 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8054#comment-36128 The Linux build of this plugin does not work correctly on X-Plane 11.41. The version of the SDK included in this code results in an ELF file where the XPluginStart, etc., are defined as “local” symbols instead of “global” symbols.

I was able to fix this problem by overwriting all the contents of /SDK/ with those of the most recent version of the Hello World sample plugin.

]]>
By: Tyler Young /code-sample/reloadplugins/#comment-32306 Mon, 29 Oct 2018 15:45:19 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8054#comment-32306 In reply to Roger Ramirez.

This is a “refcon” parameter, and it’s used throughout our APIs. If you pass a pointer to some struct of your own when you register a callback with the XPLM, we’ll give you that same pointer back each call. This is how you can associate a particular “object” with a call.

]]>
By: Roger Ramirez /code-sample/reloadplugins/#comment-32156 Wed, 24 Oct 2018 12:45:08 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8054#comment-32156 I’m confused as to was the void * mRef does and void * iRef does. Can you provide an example of what should be entered here as part of the function?

]]>
By: Lorenzo Beronilla /code-sample/reloadplugins/#comment-31645 Mon, 09 Jul 2018 04:22:44 +0000 http://developer.x-plane.com/?post_type=code-sample&p=8054#comment-31645 Hello,
So I tried modifying this code to have two+ sub-menus and have one not do anything and have one reload the plugins. I am not sure exactly how to do this. I have been able to create a second sub-menu but am not able to attach a function to it. I tried

“XPLMAppendMenuItemWithCommand(id, “Hello Again”, (void *)”Hello People”, XPLMCommandRef, MakeMenuHandler);”‘

And Visual Studio would not let me compile it. If there is any more code you want me to include that would allow you to better diagnose the problem, please let me know.

Thanks,
Lorenzo Beronilla

]]>