Skip to content

Can I nest one VM macro inside another?

You cannot nest VM macros. The following is incorrect:

void MyFunction()
{
   VIRTUALIZER_START

    // your code

    VIRTUALIZER_START    // <-- NESTED!!!!

      // your code

    VIRTUALIZER_END

  VIRTUALIZER_END
}

There are two exceptions. You can place STR_ENCRYPT_START/STR_ENCRYPT_END inside a VM macro. You can also place single-marker macros such as CHECK_CODE_INTEGRITY and CHECK_PROTECTION inside a VM macro.