<< Click to Display Table of Contents >> Navigation: Code Virtualizer > FAQ > General > I have inserted 2 functions to protect via "VirtualizerStart()" but Code Virtualizer does not recognise them! |
That problem might be due to compiler optimizations which generate a different calling convention for VirtualizerStart - VirtualizerEnd functions. You should turn off optimizations for the routine where VirtualizerStart() is called. The following example turns off and on optimizations for your routine in C language (using the #pragma directive):
#pragma optimize("",off)
void MyFunction(void) {
VirtualizerStart();
// your code
VirtualizerEnd();
... ...
VirtualizerStart();
// your code
VirtualizerEnd();
}
#pragma optimize("",on) |