Table of Contents

Interface IStdInteractionModule

Namespace
RDCore.SDK.Runtime.Abstract.StdLib
Assembly
RDCore.SDK.dll

MS-VBAL 6.1.2.8 Interaction Module

public interface IStdInteractionModule

Remarks

Formalizes the public interface of the standard library VBA.Interaction module.
ℹ️ This interface is currently incomplete.

Methods

StdInteraction__CallByName(VBObjectValue, string, VBCallType, params VBVariantValue[])

MS-VBAL 6.1.2.8.1.1 CallByName

RuntimeSemanticsEvaluationResult StdInteraction__CallByName(VBObjectValue objectValue, string procName, VBCallType callType, params VBVariantValue[] args)

Parameters

objectValue VBObjectValue

The object exposing the member to be invoked.

procName string

The name of the member to be invoked.

callType VBCallType

The type of member invocation.

args VBVariantValue[]

Any arguments to be supplied to the member upon invocation.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Invokes a method or property by name against the specified VBObjectValue.

StdInteraction__Choose(VBSingleValue, params VBVariantValue[])

MS-VBAL 6.1.2.8.1.2 Choose

RuntimeSemanticsEvaluationResult StdInteraction__Choose(VBSingleValue index, params VBVariantValue[] choice)

Parameters

index VBSingleValue

An VBIntegerValue between 1 and the number of supplied choices.

choice VBVariantValue[]

An array containing the values to choose from.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Invokes a method or property by name against the specified VBObjectValue.
👉 Indexing is one-based regardless of any Option Base directives.
⚠️ This function yields a VBNullValue if the supplied index is out of bounds.

StdInteraction__CreateObject(VBStringValue, VBStringValue?)

MS-VBAL 6.1.2.8.1.4 CreateObject

RuntimeSemanticsEvaluationResult StdInteraction__CreateObject(VBStringValue objectClass, VBStringValue? serverName = null)

Parameters

objectClass VBStringValue

A VBStringValue containing the application name and class of the object to create.

serverName VBStringValue

A VBStringValue containing the name of the network server where the object will be created.
Optional: the local machine is used unless specified otherwise.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Creates and returns an object reference to an externally provided and possibly remote object.

StdInteraction__DoEvents()

MS-VBAL 6.1.2.8.1.5 DoEvents

RuntimeSemanticsEvaluationResult StdInteraction__DoEvents()

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Yields execution so the operating system can process externally generated events.
👉 This function returns an VBIntegerValue with an implementation-defined meaning.

StdInteraction__GetAllSettings(VBStringValue, VBStringValue)

MS-VBAL 6.1.2.8.1.7 GetAllSettings

RuntimeSemanticsEvaluationResult StdInteraction__GetAllSettings(VBStringValue appName, VBStringValue section)

Parameters

appName VBStringValue

A VBStringValue expression containing the name of the application or project whose key settings are requested.

section VBStringValue

A VBStringValue expression containing the name of the configuration section whose key settings are requested.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a two-dimensional VBArrayValue containing VBStringValue elements representing the configuration setting keys and values of the specified settings store section if it exists under the specified application name; returns VBEmptyValue otherwise.

StdInteraction__GetAttr(VBStringValue)

MS-VBAL 6.1.2.8.1.8 GetAttr

RuntimeSemanticsEvaluationResult StdInteraction__GetAttr(VBStringValue pathName)

Parameters

pathName VBStringValue

A VBStringValue expression containing a file name. May specify a mapped drive and/or a directory/folder path.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets the VBFileAttribute bitwise flags representing the attributes of a specified file or directory/folder.

StdInteraction__GetJsonSetting(VBStringValue, VBStringValue?, VBVariantValue?)

🧩 RD-VBAL 6.1.2.8.1.10.1 GetJsonSetting

RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSetting(VBStringValue key, VBStringValue? config = null, VBVariantValue? defaultValue = null)

Parameters

key VBStringValue

A VBStringValue expression containing the managed configuration path (e.g. "Configuration:ConnectionStrings:AppDb") of the configuration section whose key settings are requested.

config VBStringValue

A VBStringValue expression containing the name of a .json configuration file associated with the workspace application.
Optional: The default value of this parameter depends on the current host configuration (normally "appsettings.json").

defaultValue VBVariantValue

A VBVariantValue expression containing the value to return if no value is set in the key setting.
Optional: defaults to ZeroLengthString.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a VBStringValue representing the value of the specified managed configuration setting if it exists; gets the specified defaultValue otherwise.

StdInteraction__GetJsonSettings(VBStringValue, VBStringValue?)

🧩 RD-VBAL 6.1.2.8.1.7.1 GetJsonSettings

RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSettings(VBStringValue key, VBStringValue? config = null)

Parameters

key VBStringValue

A VBStringValue expression containing the managed configuration path (e.g. "Configuration:ConnectionStrings") of the configuration section whose key settings are requested.

config VBStringValue

A VBStringValue expression containing the name of a .json configuration file associated with the workspace application.
Optional: The default value of this parameter depends on the current host configuration (normally "appsettings.json").

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a two-dimensional VBArrayValue containing VBStringValue elements representing the configuration setting keys and values of the specified managed configuration section if it exists; returns VBEmptyValue otherwise.

StdInteraction__GetObject(VBVariantValue?, VBVariantValue?)

MS-VBAL 6.1.2.8.1.9 GetObject

RuntimeSemanticsEvaluationResult StdInteraction__GetObject(VBVariantValue? pathName = null, VBVariantValue? className = null)

Parameters

pathName VBVariantValue

A VBStringValue expression containing the name of the network server where the object will be created.
Optional: the local machine is used unless specified otherwise.

className VBVariantValue

A qualified VBStringValue expression containing the application name and class of the object to create.
Optional (⚠️ but raises an error given VBMissingValue): returns the singleton instance of (the last created) single-instance object given an empty string.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets (or creates if none is found) a VBObjectValue reference to an externally provided and possibly remote object.
👉 This function cannot be used to get a reference to an object of a workspace-defined object class.

🎯 TODO: Clarify the specification of the behavior of an omitted className parameter.

StdInteraction__GetSetting(VBStringValue, VBStringValue, VBStringValue, VBVariantValue?)

MS-VBAL 6.1.2.8.1.10 GetSetting

RuntimeSemanticsEvaluationResult StdInteraction__GetSetting(VBStringValue appName, VBStringValue section, VBStringValue key, VBVariantValue? defaultValue = null)

Parameters

appName VBStringValue

A VBStringValue expression containing the name of the application or project whose key settings are requested.

section VBStringValue

A VBStringValue expression containing the name of the configuration section whose key settings are requested.

key VBStringValue

A VBStringValue expression containing the key of the requested key setting value.

defaultValue VBVariantValue

A VBVariantValue expression containing the value to return if no value is set in the key setting.
Optional: defaults to ZeroLengthString.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a VBStringValue representing the key setting value from the specified application's entry in an implementation-defined application registry if it exists; gets the specified defaultValue otherwise.

StdInteraction__IIf(VBVariantValue, VBVariantValue, VBVariantValue)

MS-VBAL 6.1.2.8.1.11 IIf

RuntimeSemanticsEvaluationResult StdInteraction__IIf(VBVariantValue expression, VBVariantValue truePart, VBVariantValue falsePart)

Parameters

expression VBVariantValue
truePart VBVariantValue
falsePart VBVariantValue

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Returns one of two parts, depending on the evaluation of an expression.

💡 The wording of how this function and its parameters are specified does not exclude 🧩VBDeferredValue language core extension values that could...
fix the confusion around this function while opening the door to something like first-class delegates in (extended) RD-VBA.

StdInteraction__InputBox(VBVariantValue, VBVariantValue?, VBVariantValue?, VBVariantValue?, VBVariantValue?, VBVariantValue?, VBVariantValue?)

MS-VBAL 6.1.2.8.1.12 InputBox

RuntimeSemanticsEvaluationResult StdInteraction__InputBox(VBVariantValue prompt, VBVariantValue? title = null, VBVariantValue? defaultValue = null, VBVariantValue? xpos = null, VBVariantValue? ypos = null, VBVariantValue? helpFile = null, VBVariantValue? helpContext = null)

Parameters

prompt VBVariantValue

A VBStringValue expression containing the message to be displayed in the dialog box.

title VBVariantValue

A VBStringValue expression containing the title of the dialog box.
Optional: uses the name of the workspace project if omitted.

defaultValue VBVariantValue

A VBStringValue expression containing the default (pre-filled) value.
Optional: defaults to ZeroLengthString.

xpos VBVariantValue

A VBLongValue expression containing the horizontal distance (measured in twips) of the left edge of the dialog box from the left edge of the screen.
Optional: dialog is horizontally centered if omitted.

ypos VBVariantValue

A VBLongValue expression containing the vertical distance (measured in twips) of the top edge of the dialog box from the top edge of the screen.
Optional: dialog is vertically centered if omitted.

helpFile VBVariantValue

ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.

helpContext VBVariantValue

ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a VBStringValue containing the user-provided input.

StdInteraction__MsgBox(VBVariantValue, VBMsgBoxStyle, VBVariantValue?, VBVariantValue?, VBVariantValue?)

MS-VBAL 6.1.2.8.1.13 MsgBox

RuntimeSemanticsEvaluationResult StdInteraction__MsgBox(VBVariantValue prompt, VBMsgBoxStyle buttons = VBMsgBoxStyle.VBApplicationModal, VBVariantValue? title = null, VBVariantValue? helpFile = null, VBVariantValue? helpContext = null)

Parameters

prompt VBVariantValue

A VBStringValue expression containing the message to be displayed in the dialog box.

buttons VBMsgBoxStyle

A VBMsgBoxStyle expression containing the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box.
Optional: defaults to VBDefaultButton1 (VBIntegerValue 0).

title VBVariantValue

A VBStringValue expression containing the title of the dialog box.
Optional: uses the name of the workspace project if omitted.

helpFile VBVariantValue

ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.

helpContext VBVariantValue

ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Displays a message in a dialog box, waits for the user to click a button, and returns a VBMsgBoxResult value indicating which button the user clicked.

StdInteraction__Partition(VBVariantValue, VBVariantValue, VBVariantValue, VBVariantValue)

MS-VBAL 6.1.2.8.1.14 Partition

RuntimeSemanticsEvaluationResult StdInteraction__Partition(VBVariantValue number, VBVariantValue start, VBVariantValue stop, VBVariantValue interval)

Parameters

number VBVariantValue

A VBLongValue expression containing the value to be evaluated against the range.

start VBVariantValue

A VBLongValue expression containing the start of the overall range of numbers.
👉 The numeric value of this parameter cannot be less than 0 💥InvalidProcedureCallOrArgument.

stop VBVariantValue

A VBLongValue expression containing the end of the overall range of numbers.
👉 The numeric value of this parameter cannot be less than or equal to the start value 💥InvalidProcedureCallOrArgument.

interval VBVariantValue

A VBLongValue expression containing the interval of each range of numbers.
👉 The numeric value of this parameter cannot be less than 1 💥InvalidProcedureCallOrArgument.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Returns a VBStringValue indicating where a number occurs within a calculated series of ranges.

StdInteraction__SCommand()

MS-VBAL 6.1.2.8.1.3 Command$

RuntimeSemanticsEvaluationResult StdInteraction__SCommand()

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a VBStringValue containing the command-line arguments (if any) that were used to initiate the execution of the currently running workspace application.

StdInteraction__SEnviron(VBVariantValue)

MS-VBAL 6.1.2.8.1.6 Environ$

RuntimeSemanticsEvaluationResult StdInteraction__SEnviron(VBVariantValue key)

Parameters

key VBVariantValue

A VBStringValue, or a data value that is let-coercible to VBLongValue.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a VBStringValue associated with an implementation-defined environment variable.

StdInteraction__Shell(VBVariantValue, VBAppWinStyle)

MS-VBAL 6.1.2.8.1.15 Shell

RuntimeSemanticsEvaluationResult StdInteraction__Shell(VBVariantValue path, VBAppWinStyle windowStyle = VBAppWinStyle.VBMinimizedFocus)

Parameters

path VBVariantValue

A VBStringValue expression containing the value to be evaluated against the range.

windowStyle VBAppWinStyle

A VBIntegerValue (VBAppWinStyle) expression containing a value that sets the style of the window in which the program is to be executed.
Optional: VBMinimizedFocus unless specified otherwise.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Asynchronously runs an executable program and returns a VBDoubleValue representing the implementation-defined program's task ID (or process ID) if successful, otherwise returns the data value 0.

StdInteraction__Switch(params VBVariantValue[])

MS-VBAL 6.1.2.8.1.16 Switch

RuntimeSemanticsEvaluationResult StdInteraction__Switch(params VBVariantValue[] varExpr)

Parameters

varExpr VBVariantValue[]

A VBArrayValue containing VBVariantValue elements representing expressions to be evaluated.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Evaluates a list of expressions and returns a VBVariantValue or an expression associated with the first expression in the list that evaluates to the data value True.

  • The expressions are evaluated left to right;
  • The first element (at index n+0) in the nth pair of values is the expression to be evaluated;
  • The second element (at index n+1) in the nth pair of values is the associated value to return if the first element evaluates to True;
  • 💥InvalidProcedureCallOrArgument if the expressions aren't properly paired.


👉 There seems to be a 🧩VBDeferredValue language core extension opportunity here, too. See: StdInteraction__IIf(VBVariantValue, VBVariantValue, VBVariantValue)

StdInteraction__VCommand()

MS-VBAL 6.1.2.8.1.3 Command

RuntimeSemanticsEvaluationResult StdInteraction__VCommand()

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a VBVariantValue containing the command-line arguments (if any) that were used to initiate the execution of the currently running workspace application.

StdInteraction__VEnviron(VBVariantValue)

MS-VBAL 6.1.2.8.1.6 Environ

RuntimeSemanticsEvaluationResult StdInteraction__VEnviron(VBVariantValue key)

Parameters

key VBVariantValue

A VBStringValue, or a data value that is let-coercible to VBLongValue.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Gets a VBVariantValue (VBStringValue) associated with an implementation-defined environment variable.