>>Where exactly do you need to prevent VFP functions from being used? Normally, in your programs, you, the programmer, choose what functions to use. The end-user doesn't get much options in this respect.
>
>Yes they do. There are several areas of my application where I let users write code. I keep that code in Memo fields and it is Compiled and Run on-the-fly.
>
>That way, users (Power Users, System Administrators, in general) can Customize diferent parts of the application.
>
>But there are parts of my application where I want to prevent them from executing some of the VFP Functions.
Perhaps a series of #define statements, as mentioned by Fabio, would help in this case.
Another alternative might be to check for certain functions before you compile. Just use the $ operator. I suggest you use a table with forbidden functions. Note that user-defined functions might also be excluded, since the user might otherwise have access to features in your program which you would rather want to restrict (or control, through some condition).
if "sqrt" $ MemoCode
MessageBox("You are using a forbidden function.")
else
endif
You can also replace the code before compiling.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)