Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to hide executable code in VFP
Message
From
26/08/2019 18:05:51
 
 
To
22/08/2019 06:12:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01670203
Message ID:
01670339
Views:
73
>if all else fails use the class library as a table and replace all the objcode wth a null string and then compile.
>
>We have a similar program we use on our build computer.
>
>I'll check to see if recompiling removes it.
>
>>This may not be it but I have seen occasions that VFP doesn't really recompile when you even tell it to recompile in Project build. Since I have seen that, I have been explicitly recompiling all by code:

Please see attached for the hidden code example.

To create this test project, I created a project, added main.prg, added the my_textbox class with the tabstop_assign() method initially. I created the form and added the my_textbox controls, and added code to the my_textbox2.tabstop_align() method. I then went back into the my_textbox class and renamed the tabstop_assign() method to mth_tabstop_assign().

Going back to the form you can see the new mth_tabstop_assign() code there, but no tabstop_assign() code. However, when you run the form, on the activate event, it assigns tabstop = .t. to all three my_textbox controls, causing the hidden tabstop_assign() code to fire on the my_textbox2 control.

You can do this to see the code:
USE frmMain.scx
GOTO 7
BROWSE LAST
And look at the Methods column memo field contents.
COMPILE FORM frmMain.scx
Do the same again and you'll see the hidden code remains. It seems a custom algorithm would have to be written to compare the declared methods with actual method code.

Hi Rick - I did as you suggested and sure enough the hidden code remains. however when i use(d) frmmain.scx and issued [replace all objcode with ""] after which I compiled the form, the hidden code is gone. Try it and let me know.
Barry Taft
i am only worried in the short term. once there is a problem, the solution usually presents itself.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform