Step-by-Step Tutorial: Integrate Your Application with Thinfinity VirtualUI

Integrate an MFC application with Thinfinity VirtualUI

Overview


Welcome to this step-by-step tutorial on integrating your application with Thinfinity VirtualUI on your development machine. In this guide, we'll cover the fundamental steps to transform your Windows application into a web-accessible application.

Thinfinity VirtualUI is a powerful development platform that virtualizes Windows applications at a lower level than traditional virtualization solutions. This deep integration requires you to compile your application with our libraries to enable seamless web publishing.

By following this tutorial, you'll learn how to set up your development environment, integrate Thinfinity VirtualUI libraries into your application, and prepare it for deployment as a web application.

Note
Pre Requirement: Install Thinfinity VirtualUI Developer Edition on your development machine where your IDE and source code are located. If you don't have the latest version, you can download it here


Integrating an MFC application



1. Include the VirtualUI header file in your main application

To integrate Thinfinity VirtualUI into your application, you need to include the VirtualUI header file in your main application file. This header file provides the necessary classes and functions to enable virtualization features.

For example, in a C++ application, add the following line at the top of your main source file:

#include "VirtualUI.h"

Make sure that the path to the VirtualUI.h file is correctly set in your project's include directories. This inclusion allows your application to access Thinfinity VirtualUI's functionalities, preparing it for seamless web integration.




2. Initialize the VirtualUI class in your application

After including the VirtualUI header file, the next step is to create and initialize an instance of the VirtualUI class. This should be done in the initialization section of your application, typically where your main window or form is created. Initializing the VirtualUI instance enables your application to interface with Thinfinity VirtualUI and prepares it for web-based deployment.

For example, in a C++ application, you can add the following code:

// Create and initialize the VirtualUI instance
VirtualUI* virtualUI = new VirtualUI();
virtualUI->Start();

In a C# application, the code would look like this:

// Create and initialize the VirtualUI instance
VirtualUI* virtualUI = new VirtualUI();
virtualUI->Start();

Important
  1. Placement: Ensure this code is executed during your application's startup sequence before any user interface elements are loaded or displayed.
  2. Error Handling: It's good practice to include error handling to catch any exceptions that may occur during initialization.
  3. Resource Management: If you're manually managing resources, remember to dispose of the VirtualUI instance appropriately when your application closes.





For a practical example that includes both basic introduction and advanced integration techniques, you can refer to this sample project: MFC Controls Sample Application. This example provides comprehensive code snippets and demonstrates how to integrate Thinfinity VirtualUI into an application effectively.


3. Compile and publish your application

Once you have integrated Thinfinity VirtualUI into your application by including the header file and initializing the VirtualUI class, the next step is to compile your application.

This will embed the virtualization features into your executable, making it ready for web deployment.

To learn how to publish your newly compiled application, please follow this tutorial: How to Publish a New VirtualUI Application in Thinfinity Workspace.

By completing these steps, your application will be fully prepared to be accessed remotely via a web browser, harnessing the full capabilities of Thinfinity VirtualUI.

    • Related Articles

    • Thinfinity VirtualUI: Integration with Different Coding Languages

      Product: Thinfinity VirtualUI Version: 3 and above Introduction Thinfinity VirtualUI is a software solution designed to easily integrate Windows-based applications with web technologies, enabling remote access through web browsers. It extends the ...
    • Thinfinity VirtualUI: Publishing an Application

      Product: Thinfinity VirtualUI Version: 3 and above Introduction Thinfinity VirtualUI is a software solution designed to facilitate web integration for Windows-based applications. This guide will walk you through the process of getting started with ...
    • Thinfinity® VirtualUI: Testing with Development Server

      Product: Thinfinity VirtualUI Version: 3 and above Introduction Thinfinity VirtualUI is a software solution designed to simplify web integration for Windows-based applications. This guide will walk you through the process of getting started with ...
    • How to Publish an Application in Thinfinity VirtualUI Server

      Product: Thinfinity VirtualUI Version: 3 and above Introduction This step-by-step tutorial will guide you through the process of virtualizing your applications and making them accessible from any web browser using Thinfinity VirtualUI. Get ready to ...
    • Thinfinity® VirtualUI Injector: User Guide

      Introduction The Thinfinity® VirtualUI Injector is a powerful tool designed to simplify and accelerate the application virtualization process using the Thinfinity VirtualUI protocol on the Workspace Server. This advanced injector seamlessly ...