C
cppaddict
Hi,
I'm trying to create a partially functional DLL written in C++. What
I would like to do is limit the number of certain method calls using a
static counter:
int someMethod() {
static numberOfCalls = 0;
numberOfCalls++;
if (numberOfCalls > 50)
//throw error or return default value
//do other stuff
}
I've been told that this sort of thing can be easy to reverse
engineer. How could I make it more difficult? By creating the check
as a macro and putting it in multiple places in the code? Are there
any other C++ specific language constructs I should use to make the
reverse engineering more difficult? If I do them, how difficult will
it be?
Thanks for any help,
cpp
I'm trying to create a partially functional DLL written in C++. What
I would like to do is limit the number of certain method calls using a
static counter:
int someMethod() {
static numberOfCalls = 0;
numberOfCalls++;
if (numberOfCalls > 50)
//throw error or return default value
//do other stuff
}
I've been told that this sort of thing can be easy to reverse
engineer. How could I make it more difficult? By creating the check
as a macro and putting it in multiple places in the code? Are there
any other C++ specific language constructs I should use to make the
reverse engineering more difficult? If I do them, how difficult will
it be?
Thanks for any help,
cpp