Page 1 of 1

Batch protection impossible?????

Posted: Tue Jun 30, 2009 7:50 am
by henrik
We have just bought the company license of VMProtect and my boss asked me to make the first tests... and I am stuck immediately :(
We compile code using many complex macros and so there is a different number of procedures to virtualize each time.
Since the protection step must be integral part of the build process I have to know about a way to say "protect all subroutines that are marked".
Using the GUI to add the functions does not work for us.

Please help me with this issue

Thankx,
Henrik
(ACE GmbH)

Posted: Tue Jun 30, 2009 9:23 am
by Admin
Try using this script:

Code: Select all

procedure OnBeforeCompilation;
var I:Integer;
begin
  with VMProtector do
   for I:=0 to InputFile.MapRecords.Count-1 do
    with InputFile.MapRecords.Items[I] do
     if (CodeType=otMarker) or (CodeType=otAPIMarker) or (CodeType=otVBMarker) then
      begin
       AddByAddress(Address,ctVirtualization,True);
      end;
end;

Posted: Tue Jun 30, 2009 1:59 pm
by henrik
Thanks a lot :-)

Henrik
(ACE GmbH)