I have a function with a VIRTUALIZER_START/END. Inside the START - END macro markers, I call an external function, called "Function2()". Is that external "Function2()" also virtualized?

<< Click to Display Table of Contents >>

Navigation:  Code Virtualizer > FAQ > Macros >

I have a function with a VIRTUALIZER_START/END. Inside the START - END macro markers, I call an external function, called "Function2()". Is that external "Function2()" also virtualized?

No. In that case, you will virtualize the calling convention for Function2() but not the code inside Function2(). Example:

 

void MyMainFunction()

{

  VIRTUALiZER_START

     // some code

     Function2(1, 2, 3)

     // some code

  VIRTUALIZER_END

}

 

In the above example, all the code inside the START - END markers is virtualized. The calling convention (passing parameters) for Function2() is also virtualized, but not the code inside "Function2()". If you also want to virtualize the code inside Function2(), you will have to put *another* macro inside Function2(). Example:

 

void Function2(param1, param2, param3)

{

   VIRTUALiZER_START

   // some code

   VIRTUALiZER_END

}