Page 1 of 1
use VMProtectEnd(); appear UnpairedVMProtectEnd
Posted: Sun Jun 28, 2009 1:42 am
by ssack
my code is
void GetDa(Pak* buf)
{
VMProtectBeginUltra("VMP14");
if (NULL == buf)
{
canlock = FALSE;
GetResText = 0;
FontTable = 0;
}
else
{
canlock = TRUE;
}
VMProtectEnd();
}
after compile. VMProtectEnd() become two call.
so protected note me UnpairedVMProtectEnd
Posted: Sun Jun 28, 2009 2:23 am
by ssack
void GetDa(Pak* buf)
{
VMProtectBeginUltra
if (NULL == buf)
{
canlock = FALSE;
GetResText = 0;
FontTable = 0;
}
else
{
canlock = TRUE;
}
VMProtectEnd
}
use MACRO marker no problem
Posted: Sun Jun 28, 2009 3:47 am
by Admin
The reason of this situation in optiomization:
VMProtectBeginUltra
...
VMProtectEnd
...
VMProtectEnd
Try to disable the optimization for this block of code.
Posted: Sun Jun 28, 2009 3:17 pm
by ssack
i konw The reason is optiomization:
but use MACRO Marker is OK
so i hope continue use MACRO.
Posted: Mon Nov 16, 2009 3:18 am
by ssack
Admin wrote:The reason of this situation in optiomization:
VMProtectBeginUltra
...
VMProtectEnd
...
VMProtectEnd
Try to disable the optimization for this block of code.
how to disable the optimization for one block?
Re: use VMProtectEnd(); appear UnpairedVMProtectEnd
Posted: Thu Jan 28, 2010 10:04 am
by gnjp
in MSVC++
#pragma optimize( "g", off )
// code
#pragma optimize( "g", on )