ISandboxRulesAllowBuiltin Method |
Determines if built-in function access should be allowed.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxbool AllowBuiltin(
string name
)
Function AllowBuiltin (
name As String
) As Boolean
bool AllowBuiltin(
String^ name
)
Parameters
- name String
-
Determine if this built-in function can be accessed.
Return Value
Boolean
true: allow built-in function access.
RemarksAllowBuiltin(String) is enforced during parsing.
Override this method to allow built-in function access when appropriate.
-
These built-in functions can be disallowed by returing false when name is one of these:
AppActivate,
CallByName,
ChDir,
ChDrive,
Clipboard,
CurDir,
Declare,
DeleteSetting,
DDEExecute,
DDEInitiate,
DDEPoke,
DDERequest,
DDETerminate,
DDETerminateAll,
Dir,
Environ,
EOF,
FileAttr,
FileClose,
FileCopy,
FileDateTime,
FileOpen,
FreeFile,
GetAllSettings,
GetAttr,
GetFilePath,
GetObject,
GetSetting,
Input,
InputString,
Kill,
LineInput,
Loc,
Lock,
LOF,
MkDir,
ObjPtr,
Print,
PrintLine,
Rename,
Reset,
RmDir,
SaveSetting,
Seek,
SendKeys,
SetAttr,
SetLocale,
Shell,
StrPtr,
Unlock,
VarPtr,
Write,
WriteLine,
WWB-COM
and
WWB.NET/Compiled.
-
When the VirtualFileSystem property is Nothing
these built-in functions can be disallowed by returing false when name is one of these:
GetModuleInstance,
MacroCheck,
MacroDir,
MacroRun and
ModuleLoad.
-
Absolute and upward file paths can be disallowed by returing false when name is "#DiskIO".
-
Adding references with '#Reference can be disallowed by returning false when name is "#Reference".
This method must be idempotent.
Example
Default SandboxRules implementation.
override bool AllowBuiltin(string name)
{
return false;
}
Overrides Function AllowBuiltin(ByVal name As String) As Boolean
Return False
End Function
See Also