Page 1 of 1

Questions about markers

Posted: Tue Jan 18, 2011 4:35 pm
by Forrest Gump
Hello Enigma,

I am a database application developer who understand nothing of low level programming :) I think Enigma Protector is excellent because I can use markers to protect parts my application easily.

Here comes the... uhm... stupid questions :)

1. When/where should I use the VM, Decrypt_On_Execute and Check_Protection markers? I mean maybe you could give some practical tips about what is the preferred marker to protect what kind of code.

2. Is the code inside Run_Once markers executed is virtualized too? Like VM marker but after execution the virtualized(?) code will be deleted from memory?

3. If I have 2 procedures like this:

Code: Select all

Procedure TForm1.Drive;
begin
  ...
end;

Procedure TForm1.DrinkVodka;
begin
  {$I vm_begin.inc}
  ...
  Drive;
  ...
  {$I vm_end.inc}
end
;

Is the procedure Drive protected too?

4. Is it safe to use VM markers inside a simple thread (a worker thread that only talk to the main thread, not with another worker thread) ?

Thank you Enigma

Re: Questions about markers

Posted: Thu Jan 20, 2011 1:23 pm
by GROL
also question from me, it's correct?:

Code: Select all

procedure TForm1.PROC1;
begin
  {$I vm_begin.inc}
  ...
  {$I vm_end.inc}
end;

procedure TForm1.PROC2;
begin
  {$I vm_begin.inc}
  ...
  PROC1;
  ...
  {$I vm_end.inc}
end

Re: Questions about markers

Posted: Sat Jan 22, 2011 12:50 am
by Sebastiano
1. You should use vm in that parts of ur code what r not requring high execution speed but r critical for ur app engine
2. Not virtualized, code will be cleaned after the first execution, use it only in some init stuff that requires high execution speed, if there is no such places u should use vm in most cases
3. It's not protected, only Drive() call is protected

Re: Questions about markers

Posted: Sat Jan 22, 2011 9:33 am
by Enigma
Sebastiano thank you very much for the reply, I fully agree with you.
Forrest Gump wrote:3. If I have 2 procedures like this:
No, the only call of Drive function is protected. You have to quote the code of Drive function to protect it.
Forrest Gump wrote: 4. Is it safe to use VM markers inside a simple thread (a worker thread that only talk to the main thread, not with another worker thread) ?
Yes, using any kind of markers is thread safe, so you can use it anywhere without any restrictions.
GROL wrote:also question from me, it's correct?:

Code: Select all

procedure TForm1.PROC1;
begin
  {$I vm_begin.inc}
  ...
  {$I vm_end.inc}
end;

procedure TForm1.PROC2;
begin
  {$I vm_begin.inc}
  ...
  PROC1;
  ...
  {$I vm_end.inc}
end
Yes, sure, this is correct!

Re: Questions about markers

Posted: Tue Jan 25, 2011 7:33 am
by Forrest Gump
Thank you guys.

Now since we can not have markers inside markers, I think it is a good thing if you make "hybrid markers" like VM_Run_Once and another variations, if possible.

Re: Questions about markers

Posted: Tue Jan 25, 2011 8:10 am
by Enigma
Forrest Gump wrote:Now since we can not have markers inside markers, I think it is a good thing if you make "hybrid markers" like VM_Run_Once and another variations, if possible.
Yes, I 100% agree with you. There is just one issue. We need to decide how is it better to make this. For example, we can add a VM_Run_Once marker (same as VM_Reg_Crypt etc etc), there will appear few new markers. Or, maybe better, allow VM marker to contain another kind of markers.

This issue in todo list..