>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 imagine your whole vcx like that.
>
>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.
Also (if you enclode sourcecode) I nice trick ist to include and redefine constants
create a file include.h
#IFDEF dnTestO
#IF dnTestO=1
#UNDEF dnTestO
#DEFINE dnTestO 2
#DEFINE DO *
#DEFINE ENDDO *
#ELSE
#UNDEF dnTestO
#UNDEF DO
#UNDEF ENDDO
#DEFINE dnTestO 1
#ENDIF
#ELSE
#DEFINE dnTestO 1
#DEFINE dnTest0 'Mooh'
#ENDIF
now create code
#include INCLUDE.h
?dnTestO,dnTest0
#include INCLUDE.h
DO WHILE .F.
?dnTestO,dnTest0
ENDDO
#include INCLUDE.h
?dnTestO,dnTest0
now mix the includes into places where nobody expects them.
Somewhere here in UT there is an example of better code obfuscation with defines by me, but I'm unable to search. If you are subscriber search for me and #define to see it.
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]