Qt: Shut down the application when the user doesn't a supported OpenGL version - qt

I use Qt 5.7 with Web Engine in my application. The application has thousands of users and for some of them the whole application crashes (with the classic Windows "app.exe has stopped working" dialog) when trying to load a webpage in my webview. Upon doing some digging, I discovered it crashes for users that don't have OpenGL 2+.
Is there a way to determine the user's OpenGL version and shut down the application (or write a message to them, I'd take care of that) if the version is not supported? I tried using glGetString(GL_VERSION), but that means including yet another QT library in an already not so small application.

Related

Run ActiveXObject COM component that creates dialogs under IIS in Asp.NET

I have a ASP.NET MVC app, hosted on IIS on a dedicated server. At some point I need to create a com activex component. I use Interaction.CreateObject from Microsoft.VisualBasic.Interaction for this.
The issue is that this activex component shows some dialogs when starting and waits until they are closed before actually registering as COM component.
I wrote some simple code that closes the windows via Windows API using FindWindowEx etc. and it works on a dev machine when hosted under VS, but it looks like on IIS these windows are never shown even in Windows API and ActiveX component just freezes waiting for dialogs to close that never exist.
I tried:
Using Process.Start and then Interaction.GetObject instead of Interaction.CreateObject
Setting AppPool in IIS to run from a real user identity
Setting Load User Profile to True in IIS
Using https://github.com/mj1856/SimpleImpersonation library to run the code as a user
I also looked in dcomcnfg (and this is my best bet on what I need to do). I thought I need to find my COM component there, and set Identity to specific user - but for some reason the ActiveX COM component I'm running does not exist there. I see "cannot register COM component" in Event Viewer if the component run crashes by timeout (because it waits for dialogs before registering as COM), - so I know AppID, but it does not exist in the list in dcomcnfg. Maybe because the ActiveX is exe, not ocx?
I know IIS is not supposed to run anything with windows, and it of course cannot show them, but I was at least expecting to see them with Windows API and being able to close them, especially given that the component waits for them to be closed, so they exist somewhere. I think I'm missing some clever setup on the server.

JXBrowser stops loading when interact with JavaFX components

This only happens in Mac
In the JavaFX Application if I displayed a ContextMenu or MenuItem the JXBrowser thread stops loading the webpage and when I dismiss them the page continue loading.
How can I avoid the JXBrowser thread stop loading a web page and interacting with JavaFX?
I'm currently using JXBrowser 6.9 but this also happens in previous versions.
When you use JxBrowser in heavyweight mode on Mac, the underlying Chromium engine runs inside Java process and uses the same AppKit thread as JavaFX. In case something blocks this thread, the Chromium engine is also blocked. I recommend that you use lightweight mode and multi-process architecture by setting "jxbrowser.ipc.external=true" VM parameter on Mac.

client-side exception error of adding an Excel add-in ribbon in a web application from VS2010 debug mode on win7

I have published a web service (built in VS2010, .NET 4.0) successfully in my desktop with IIS7.5 win 7 from my laptop.
The C# solution is composed of
MyApp.Host , MyApp.Excel, MyApp.WCF, MyApp.Web, MyAppSetup
Now, I need to run the C# code in VS2010 in debug mode on client side (on my laptop).
I have installed VS2010 tools for office runtime. When my application is opened, it will add a tab (an add-in) in Excel 2010. I have copied
MyApp.Excel.dll
MyApp.Excel.dll.config
MyApp.Excel.dll.manifest
MyApp.Excel.vsto
MyApp.Excel.xlsx
Microsoft.Office.Tools.Common.dll
Microsoft.Office.Tools.Common.v4.0.Utilities.dll
Microsoft.Office.Tools.dll
Microsoft.Office.Tools.Excel.dll
Microsoft.Office.Tools.Excel.v4.0.Utilities.dll
Microsoft.Office.Tools.v4.0.Framework.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.dll
to the folder in my C# solution (on client side, on my laptop)
MyApp.Host\bin\debug\
because these files were published to my desktop.
But, I still got error
************* Exception Text **************
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Microsoft.Office.Tools.Excel.WorkbookImpl.CreateRibbonObjects()
at Microsoft.Office.Tools.Excel.WorkbookImpl.WorkbookExtensionImpl.Microsoft.Office Tools.Excel.IWorkbookExtension.CreateRibbonObjects() at Microsoft.Office.Tools.Excel.WorkbookImpl.GetRibbonObjects()
Do I miss some tools or libs here ?
I regret to tell you but such scenario is not supported...
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
Read more about that in the Considerations for server-side Automation of Office article.

How to access local file system from Flex web application?

I'm trying to access local file system from Flex web application.
I know it is pretty difficult, but I think there must be a way. Is there a way that Flex app can use AIR components or maybe web application can call some AIR module in order to choose files and upload?
There is no direct way that a web based Flex/Flash application can access AIR based APIs. They aren't built into the Flash Player, but are rather extensions built into the AIR runtime. You can't access them directly because they aren't there.
If you have an AIR app installed on the user's local machine you can, in theory, use that app as a proxy with localConnection. That way the AIR app can access the file system directly, triggered by the browser based app. I'm not sure how user interaction would work, though.
If you have server software installed on the client machine, you can trigger file processing commands from Flex using RmoteObject/HTTPService/WebService commands. This wouldn't give the user any interaction ability and is not usually practical unless you have strong control over your client machines.
Either approach would present an app installation nightmare; which almost defeats the purpose of a browser based app in the first place.
You can use FileReference's methods to ask user to select files to open (load into flash, upload into server) or save (from server or bytes from flash).

Adobe AIR update framework -- always creating a new desktop icon on update

I'm using the AIR update framework (ApplicationUpdaterUI), and whenever the user updates the application, a new desktop icon gets created (overwriting any existing desktop icon there). Is there a way to suppress this behaviour, or can someone suggest a workaround?
Here's the situation:
Our AIR app uses a separate bootstrapping application to launch some services before the AIR application launches, so it's important that the user does not run the AIR executable themselves. Our installer creates a desktop icon that points to the bootstrapping executable. When the user updates the application, it replaces our desktop icon with the AIR shortcut.
I don't think you can override the creation of the standard AIR icon..
Maybe you can configure your helper application as a windows service / unix daemon, launching it automatically on system startup?

Resources