Click or drag to resize

BasicNoUIObjSandboxed Property

Gets or sets the sandboxed mode.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
public bool Sandboxed { get; set; }

Property Value

Boolean
The sandbox mode.

Implements

IBasicNoUISandboxed
Remarks
Control script access to the .NET assemblies.

Setting Sandboxed to true blocks unsafe script instructions. Unsafe script instructions blocked:

  • '#Language "WWB-COM"
  • '#Langauge "WWB.NET/Compiled"
  • '#Reference ...
  • '#Uses, GetModuleObject, MacroCheck, MacroDir, MacroRun and LoadModule (if the VirtualFileSystem property is null)
  • COM object creation: CreateObject, GetObject
  • DDE: DDEInitiate, etc.
  • File I/O: FileOpen, etc.
  • Registry: GetSetting, etc.
  • Misc: CallByName, Clipboard, Declare, Environ, SendKeys, Shell

The SandboxRules property determines which .NET types and members are allowed. For assemblies added with AddScriptableReference(Assembly, String) the Scriptable attribute determines which types and members are allowed.

File I/O from the UI of the BasicIdeCtl control and the BasicIdeObj object is not blocked.

Results of the SandboxRules are cached. Any change to the rules requires that Sandboxed property be set. Setting the property to the same or different value will flush the cached SandboxRules results.

Example
basicIdeCtl1.Sandboxed = true;
See Also