Re: How can I prevent my public VB6 classes from being Implementable?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Joseph Geretz" <jgeretz@xxxxxxxxxx> wrote:
How do I prevent my public classes in my application DLL's from
being implementable?

An easy way would be to implement a key for each method call.
Then create a private function that checks to see if the key matches.
It means you'd have to place a call to the function inside some of
properties or procedures, preferably the ones that instantiate your
objects. If the key don't match you can exit the initialization event.

Another way involves setting a public key in your application and
then place the check in the Class_Initialize() event. This however,
means your app could be running and someone could instantiate
your objects.

There's other ways to accomplish your goals as well, but those
represent the initial thoughts that crossed my mind.

::::-o-::::
Jim Carlock


.