Batch protection impossible?????

We have just bought the company license of VMProtect and my boss asked me to make the first tests… and I am stuck immediately :frowning:
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)

Try using this script:

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;

Thanks a lot :slight_smile:

Henrik
(ACE GmbH)