3

Suppose you have a DLL which exposes a class like this:

class MyClass
{
public:
int  MyMethod();
}

How would you deny or at least make it harder for other people/ hackers to take this DLL and use it in their programs?
Is there a standard way?

AstroCB
  • 12,101
  • 20
  • 56
  • 70
Idov
  • 4,870
  • 14
  • 63
  • 103
  • 3
    Isn't the whole point of using public methods to make them accessable from elsewhere? :) Sorry mate, but I really don't understand what you are trying to ask! – jsalonen Nov 28 '11 at 19:50
  • 1
    Yep, but they are supposed to be accessible to me!!! :) – Idov Nov 28 '11 at 19:56
  • Oh right you want to "protect your DLLS". It's a whole different ballgame then! – jsalonen Nov 28 '11 at 19:57
  • good! I was afraid you'd answer me sarcastically but you didn't. How can I do it then? – Idov Nov 28 '11 at 20:01
  • 1
    Some very good answer are available at: http://stackoverflow.com/questions/805461/how-to-protect-dlls But note what Tom said: DLLs were never designed for having security measures. – jsalonen Nov 28 '11 at 20:02

1 Answers1

1

I'd link it statically. Let's not forget that a DLL is simply a standalone "application" that is supposed to expose its functions - they were never designed to have security measures.

Tom van der Woerdt
  • 28,913
  • 7
  • 68
  • 105