VB6 (erk) - built-in functions?

I am using VB6 for an application.

Can the compiler be forced to inline the function?

Or is there a superstructure that achieves the same thing?

There is a protected part of my code in there that I want to complicate by repeating the code at every point where it is used, instead of specifying it once as a function.

Hope someone can answer my question!

+1


source to share


3 answers


IMO if this is what you are doing as a security measure, you have more trouble than getting VB to inline your function. And I don't think VB6 has any provision for that. And I tend to think that this method will make it easier to hack your code as you will be repeating the same important important function over and over again ... Sorry: --(



+5


source


No support for creating a function. However, there are several things in your job.

The first VB6 is known to be difficult to decompile as a witness due to the lack of decompilers on the market in history. The results were less useful for people trying to recover lost source code or hack VB6.

But...

If you are using ActiveX DLLs, it can very easily hack your software by someone who wrote a compatible DLL. The best way my company has dealt with this is to make critical objects public, non-instantiated, and exchange packed binary data.



Public non-creatable prevents anyone from referring to a DLL by instantiating that object and then running tests to see what you are doing. Binary data should hide the data that you exchange.

There are safer ways to solve these problems in the COM literature, but these are simple things you can do to make an ActiveX application harder to crack.

My company goal is not to make it impossible for someone to hack our software, but to make it complex enough to cost less for our competitor to deal with us rather than trying to hack our system (CAD / CAM system)

+3


source


As Dave said, there is no support in the VB compiler.

If you really want to, don't run find and replace on a copy of your code, and don't create that copy. Doing this on the command line shouldn't be too difficult.

+2


source







All Articles