In a project, I need to come up with a way to virtualize a third-party DLL with a known exported function prototype. I need to create something like this:
My app <---> wrapper DLL <---> third-party DLL in a virtualized environment
The wrapper DLL just calls the exported functions in the third-party DLL.
By virtualization I mean the third-party DLL has no access (or has limited access) to the Host system environment using software like Thinapp, Turbo Studio, Boxed App, Enigma Virtual Box, etc. I need to create the virtualization Environment only after calling some methods of the third-party DLL to set up the virtualized environment.
To put it in another way, I have a third-party DLL that makes some changes to the Host system via an exported function. Now what I want to do is to call the exported function in a virtualized environment and capture any changes and isolate that as a container/virtual box. After creating that virtual system, I want to call some other functions of the DLL, so that the DLL in a way that DLL is first loaded in the virtualized system, and the DLLmain entry is called, and then I can call the exported functions and redirect the results to my app from the wrapper DLL.
Softwares like Thinapp, Turbo Studio, etc can capture the system changes and create a container with an entry point which can be called by the host system. the problem is that they all need an EXE file as an entry point which I don't have, all I need is a single DLL to be virtualized.
Does anyone have any idea how to achieve this? Any idea is greatly appreciated.
Edit : after studying a while about this , It seems it's possible to achieve this using micro hypervisor. Softwares like VMware , virtual box , etc use special CPU capabilities (Intel VT-x and AMD-V ) to achieve it, however those softwares virtualize the whole OS including BIOS/UEFI. it's possible to run a stripped down version of virtualization using micro-hypervisors.