Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Commercialize vcx
Message
From
11/03/2010 14:36:50
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
10/03/2010 13:42:14
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01453792
Message ID:
01454006
Views:
186
Jose,

If you want the vcx to be used by developers, you cannot protect your code. So you might as well distribute the sourcecode as a feature, with detailed help to assist buyers. Make a virtue of a necessity. ;-)

A good model would be Rick Strahl's West Wind solution. Rick distributed sourcecode and encouraged his users to report bugs and suggestions. It worked extremely well for him. Probably he experienced some piracy but enough people purchased that he made good $.

If you absolutely cannot allow access to your code, you could convert your vcx to a dll, activeX or exe, and apply Molebox, Refox, Defox, or similar protection. Even then you cannot protect absolutely: a technique called the "VFP Hook" can peel an .app out of any of the prevalent VFP protection systems. Once you have an .app it is easy to recreate the sourcecode.

You can obfuscate to make your code exceedingly difficult to follow. There are a few VFP obfuscators out there - google "vfp obfuscator". Simple obfuscators change all your sensibly named variables and methods to very similar nonsense labels (O0OO0OO0OO0O vs O0OO00OO0OO0O) while more complex ones alter inheritance and add complexity. Here is an example of what a complexity obfuscator can do to your code: Convert this:
IF ((x1 OR x2) and x3) or (x4 and x5)
  ?"A"
ELSE
  ?"B"
ENDIF
to this:
IF IIF(.F.,29378,IIF(.F.,30126,IIF(.T.,x1,117915874)))
IF IIF(.F.,25808,IIF(.F.,26864,IIF(.F.,18384,IIF(.T.,x3,117919216))))
?"A"
ELSE
IF IIF(.F.,21087,IIF(.F.,19145,IIF(.T.,IIF(.F.,25753,IIF(.T.,x4,117926399)),117930063)))
IF IIF(.F.,21194,IIF(.F.,18022,IIF(.F.,20842,IIF(.T.,x5,117925574))))
?"A"
ELSE
?"B"
ENDIF
ELSE
?"B"
ENDIF
ENDIF
ELSE
IF IIF(.F.,26185,IIF(.F.,28879,IIF(.T.,IIF(.F.,23999,IIF(.T.,x2,117919849)),117925593)))
IF IIF(.F.,25808,IIF(.F.,26864,IIF(.F.,18384,IIF(.T.,x3,117919216))))
?"A"
ELSE
IF IIF(.F.,21087,IIF(.F.,19145,IIF(.T.,IIF(.F.,25753,IIF(.T.,x4,117926399)),117930063)))
IF IIF(.F.,21194,IIF(.F.,18022,IIF(.F.,20842,IIF(.T.,x5,117925574))))
?"A"
ELSE
?"B"
ENDIF
ELSE
?"B"
ENDIF
ENDIF
ELSE
IF IIF(.F.,21087,IIF(.F.,19145,IIF(.T.,IIF(.F.,25753,IIF(.T.,x4,117926399)),117930063)))
IF IIF(.F.,21194,IIF(.F.,18022,IIF(.F.,20842,IIF(.T.,x5,117925574))))
?"A"
ELSE
?"B"
ENDIF
ELSE
?"B"
ENDIF
ENDIF
ENDIF
Sure you can pick it apart, but that's a simple example: once you add functions and methods, it becomes fearfully difficult especially when it starts using internal VFP features that cannot be recompiled.

There is another technique that splits and converts VFP apps into part C++/Part VFP wrapper requiring a formal decompile, just like any other C++ dll which is a lot of work, but it is not suitable for a vcx.

HTH.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform