Plugins update status

Hello guys,

I got recently a friend that started to play with Xojo and he dig into the plugins part, unfortunately when trying to open the complete class project it failed with a straight popup that CompleteClass.dll is not a valid win32 application.

Any idea about this ? I see that the latest date where those plugins were updated was 2018, could @XOJO please bring those up to date as well.

Thanks.

WhatsApp Image 2020-09-23 at 20.50.57

From what I see on my tests , so far this was a feedback from them, but on my tests this fails when you select x64 so I assume that there is an issue there and it needs to be adapted for 64 bit as well .

Well, do you build 32 or 64bit?

As IDE is 64bit, it may not load 32-bit file.

no idea as I’m not doing those but from what I tested Win32 works well, while if you select X64, it throws this error , o I assume that it does work on 32 but not on 64

You know, Win32 is the API name and it exists for 32 and 64bit! even ARM

Hi, I’m the one experimenting with plugins in Xojo. I came here because I have a problem with the code and I don’t know how to solve it, so if I don’t do a new topic, I’ll continue here. Compared to yesterday, I think I have made progress in this.

  1. I built a test dummy plugin to experiment with, but I get this error: Error C1083: Cannot open include file: ‘rb_plugin_deprecated.h’: No such file or directory.

  2. This is what the code looks like:

    #include “WinHeader++.h”
    #include “rb_plugin.h”

    static DOUBLE RadiusGetter(void);
    static void RadiusSetter(DOUBLE RadiusValue);

    REALproperty PropModule[] = {
    { “”, “RadiusValue”, “double”, REALconsoleSafe, (REALproc)RadiusGetter,
    (REALproc)RadiusSetter },
    };

    REALmoduleDefinition PropModuleDefinition = {
    kCurrentREALControlVersion,
    “Prop”,
    nil,
    0,
    nil,
    0,
    PropModule,
    sizeof(PropModule) / sizeof(REALproperty),
    nil,
    0,
    nil,
    0,
    };

    static DOUBLE DBRadius;
    static DOUBLE RadiusGetter(void)
    {
    return DBRadius;
    }

    static void RadiusSetter(DOUBLE AValue)
    {
    DBRadius = AValue;
    }

    void PluginEntry(void){
    REALRegisterModule(&PropModuleDefinition);
    }

Screenshot from IDE: https://imgur.com/irSrELt

You just need to set the search paths so it searches all the Plugin SDK for it. And or Prefix file depending on how you set things up.

I do but in that case I just mentioned the options I have in Visual Studio 2019.

Could you please let me know if Eye Control from Extras folder works on your side with Visual Studio 2019 , in case you have that as well installed ? and if you need to do any changes.

So far based on that SDK , I assume It is an old one, I get a lot of deprecated parts on RB side and as well no errors on compiling but the plugin fails to register on XOJO ide

Thanks.

Can you explain in more detail so that you can guide me? I can’t figure out what you mean.

For settings the Project, I followed:

In Visual Studio 2013:

  • Start File->New->Project
  • Select Templates->Visual C++, and select Win32 Project
  • Select DLL, Export Symbols and Precompiled Header
  • Copy the source files: (rb_plugin.h, rb_plugin_cpp.h, REALplugin.h, and WinHeader ++. h, PluginMain.cpp) in the main project folder.
  • Drag and drop files from the folder into the Visual Studio Solution Explorer (.h in “Header Fils” and PluginMain.cpp in “Source Files”).

And changing the Properties of the project into:

  • Properties->C/C+±>Preprocessor->Preprocessor Definitions- Add IGNOREQT, Apply
  • Properties->C/C+±>Code Generation->Runtime Library, change to Multi-threaded (/MT)
  • Properties->C/C+±>Code Generation->Enable C++ Exceptions, change to No
  • Properties->C/C+±>Language->Enable Run-Time Type Information, change to No
  • Properties->C/C+±>Precompiled Headers->Precompiled Header, change to Not Using Precompiled Headers

I would think you have to copy also the rb_plugin_deprecated.h in there since that is the one your getting error on.

I have not tried to compile from their raw sample projects in about 15 years. So is a bit hard to tell you the state of it. What i run is our projects that have been migrated and adapted throughout the years.

Sorry, haven’t used the examples in years.
In general every new version of Visual Studio does things a bit different and it’s up to you to migrate the projects. Make sure include paths are right first.
No need to make new projects, just check options in existing ones.

so far all the paths are right as in the case of EyeControl it builds after updating the project but unfortunately after packing the plugin, does not load at all in XOJO, so it is not even checking it in the plugins side or at least it says Loading plugin with no name and that’s about it .

any other ideas ? or at least a functional plugin sample , Mac & Windows , would be helpful , I guess @Geoff_Perlman will have to do something about it or somebody else in the XOJO team. so far based on docs if you take the text in it, it is at least 5 years old, not to say 10

You have 64-bit Xojo and your plugin is built as 64-bit?
I think you have to choose that in the toolbar in VS before building.

@Christian_Schmitz @Björn_Eiríksson

Guys, it looks like I finally managed to compile it, the next question comes now, how can I install DLL plugins and how to load them (or did I see that the .xojo_plugin extension is used, how could I do it in this extension, and functional?)?

I tried to put the Prop.dll plugin in the \Plugins folder and do a dummy project and test the plugin, but I encountered recognition errors, I think it means that the plugin could not be loaded. I have attached the image here: https://i.imgur.com/WWV4lbF.png

I also tried to save the project in .xojo_binary_file format and put the .dll file next to it but also in \Plugins, the same errors in Xojo.

Maybe I’m doing something wrong, do you have any idea what I can do?

Sadly Xojo doesn’t report well about errors when loading plugins.

Please add yourself to Feedback case 61480

Maybe try an older version to see if it prints something on DebugView.