Phidgets not working in built app

Using latest mbs plugins with xojo 24r1 on windows. Phidgets work great when running in debug. But a built app doesn’t work. I’m not getting any errors and the connected event is not firing in my subclass.

App open event has…

Const path = “Phidget22.dll”

if PhidgetManagerMBS.LoadLibrary(path) =False then

MessageBox "Unable to load PhidgetLibrary: " + PhidgetManagerMBS.LibraryLoadError

End if

The phidget manager app works fine and as I said, my app works fine in debug mode.

Any ideas?

Well you need the Phidget22.dll next to your executable so make sure it is.

I have the dll in the system folder. I tried putting it next to the app and in the libs folder. Also, I’m getting true with load library.

Is the Phidgets Control Panel app (from Phidgets) running? In my experience you can’t run it and a Xojo Phidgets app at the same time (which is a pain). If I’ve run my Xojo app at all, the Control Panel won’t even run until I restart my Windows target machine.

Thanks Julia. The Phidget Control Panel has been running on my system since I started working on this project a month or so ago. I have developed the app and never had any problems running the app (in the IDE) with the Phidget Control Panel running at the same time. So, I turned it off and I am getting the same results. When running in the IDE, it works fine but the compiled apps, nothing works.

When I am running in the IDE, I can plug the VINT hub into a USB port on my PC and the Attached/Detached events fire. When running the compiled app, no events are fired.

Wow. They definitely don’t work together in my setup of Xojo Mac 2021r2.1 and Windows target.

I’ve never used the Xojo IDE under Windows, so probably can’t be of much help. Is this a new problem, i.e. has it ever worked for you with a built app?

FWIW this topic should probably be in the “Add-Ons” category with “MBS” in its title; you may need help from @Christian_Schmitz

Yeah, you are right. This topic should be in Add-Ons.

I dont believe I have ever compiled an app using the new MBS Phidget plugin until yesterday. I have just run in IDE. I did compile the old Phidget plugin without issues years ago.

Have you compiled an app for Windows using MBS Phidget plugin 24.1 or 24.2? I just tried 24.2 prerelease and it didnt change anything.

I keep thinking I am missing something but I don’t know what it could be.

It was a bug in my code. I have a json file with the app settings that holds the Device Serial Number for the Phidget. The built app is pulling the json from a different location than the app when running in Debug mode. Wow. Lots of wasted time. Thanks for the help anyway. @Christian_Schmitz…Phidget plugins are great!

1 Like

Thanks for solving it yourself while we enjoyed our Sunday afternoon.

1 Like

They are indeed! I am just mystified why the Phidgets people give no recognition to Xojo or Christian’s plugin - they give examples in C, C#, Java, JavaScript, Max, Python, and Swift, but no mention of Xojo anywhere on the entire site :frowning:

1 Like