<< Click to Display Table of Contents >> Navigation: Themida > FAQ > Macros > I add different VMs in Virtual Machine panel and save the project. When I save the project and load it, most of the VMs are gone. Why? |
WinLicense optimizes the insertion of Virtual Machines in the protected application. As you can see, you can select one Virtual Machine for the protection boot code and another virtual machine for the "old" VM macros (by right clicking on a specific Virtual Machine name)
Suppose that in your application, you don't have inserted any VM macros, but you have selected VM_TIGER_WHITE for the protection boot code and selected other virtual machines like VM_FISH_WHITE and VM_FISH_RED. When you protect, all those 3 VMs are inserted but the VM_FISH_WHITE and VM_FISH_RED are useless as they are never executed (because the protection boot code is assigned to VM_TIGER_WHITE). Those 2 VMs stay dormant in memory. .
Now you save your project with those 3 VMs. When you load the project, WinLicense sees that you have selected VM_TIGER_WHITE and include it, but it will see that VM_FISH_RED and VM_FISH_WHITE are not required (will stay dormant in the protected application) so it removes it.
If you want to use different VMs for different applications, basically you just need to put in your source code the specific VMs that you want to include. For example, suppose that your application has the following code:
main()
{
VM_FISH_BLACK_START
// your code
VM_FISH_BLACK_END
VM_DOLPHIN_WHITE_START
// your code
VM_DOLPHIN_WHITE_END
}
WinLicense will see that you have inserted FISH_BLACK and DOLPHIN_WHITE, so it will include it into your protected application.
Summing up, you should not worry about selecting different VMs in most cases, WinLicense will do that process for you, optimizing the final size of the application.