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(VBRuntimeReference, string, VBCallType, params VBRuntimeVariantValue[])

MS-VBAL 6.1.2.8.1.1 CallByName

RuntimeSemanticsEvaluationResult StdInteraction__CallByName(VBRuntimeReference objectValue, string procName, VBCallType callType, params VBRuntimeVariantValue[] args)

Parameters

objectValue VBRuntimeReference

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 VBRuntimeVariantValue[]

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(VBRuntimeValue<float>, params VBRuntimeVariantValue[])

MS-VBAL 6.1.2.8.1.2 Choose

RuntimeSemanticsEvaluationResult StdInteraction__Choose(VBRuntimeValue<float> index, params VBRuntimeVariantValue[] choice)

Parameters

index VBRuntimeValue<float>

An VBIntegerValue between 1 and the number of supplied choices.

choice VBRuntimeVariantValue[]

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(VBRuntimeReference, VBRuntimeReference?)

MS-VBAL 6.1.2.8.1.4 CreateObject

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

Parameters

objectClass VBRuntimeReference

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

serverName VBRuntimeReference?

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(VBRuntimeReference, VBRuntimeReference)

MS-VBAL 6.1.2.8.1.7 GetAllSettings

RuntimeSemanticsEvaluationResult StdInteraction__GetAllSettings(VBRuntimeReference appName, VBRuntimeReference section)

Parameters

appName VBRuntimeReference

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

section VBRuntimeReference

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(VBRuntimeReference)

MS-VBAL 6.1.2.8.1.8 GetAttr

RuntimeSemanticsEvaluationResult StdInteraction__GetAttr(VBRuntimeReference pathName)

Parameters

pathName VBRuntimeReference

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(VBRuntimeReference, VBRuntimeReference?, VBRuntimeVariantValue?)

🧩 RD-VBAL 6.1.2.8.1.10.1 GetJsonSetting

RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSetting(VBRuntimeReference key, VBRuntimeReference? config = null, VBRuntimeVariantValue? defaultValue = null)

Parameters

key VBRuntimeReference

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

config VBRuntimeReference?

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 VBRuntimeVariantValue?

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(VBRuntimeReference, VBRuntimeReference?)

🧩 RD-VBAL 6.1.2.8.1.7.1 GetJsonSettings

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

Parameters

key VBRuntimeReference

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

config VBRuntimeReference?

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(VBRuntimeVariantValue?, VBRuntimeVariantValue?)

MS-VBAL 6.1.2.8.1.9 GetObject

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

Parameters

pathName VBRuntimeVariantValue?

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 VBRuntimeVariantValue?

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(VBRuntimeReference, VBRuntimeReference, VBRuntimeReference, VBRuntimeVariantValue?)

MS-VBAL 6.1.2.8.1.10 GetSetting

RuntimeSemanticsEvaluationResult StdInteraction__GetSetting(VBRuntimeReference appName, VBRuntimeReference section, VBRuntimeReference key, VBRuntimeVariantValue? defaultValue = null)

Parameters

appName VBRuntimeReference

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

section VBRuntimeReference

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

key VBRuntimeReference

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

defaultValue VBRuntimeVariantValue?

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(VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue)

MS-VBAL 6.1.2.8.1.11 IIf

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

Parameters

expression VBRuntimeVariantValue
truePart VBRuntimeVariantValue
falsePart VBRuntimeVariantValue

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(VBRuntimeVariantValue, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?)

MS-VBAL 6.1.2.8.1.12 InputBox

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

Parameters

prompt VBRuntimeVariantValue

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

title VBRuntimeVariantValue?

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

defaultValue VBRuntimeVariantValue?

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

xpos VBRuntimeVariantValue?

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 VBRuntimeVariantValue?

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 VBRuntimeVariantValue?

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

helpContext VBRuntimeVariantValue?

ℹ️ 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(VBRuntimeVariantValue, VBMsgBoxStyle, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?)

MS-VBAL 6.1.2.8.1.13 MsgBox

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

Parameters

prompt VBRuntimeVariantValue

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 VBRuntimeVariantValue?

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

helpFile VBRuntimeVariantValue?

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

helpContext VBRuntimeVariantValue?

ℹ️ 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(VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue)

MS-VBAL 6.1.2.8.1.14 Partition

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

Parameters

number VBRuntimeVariantValue

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

start VBRuntimeVariantValue

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 VBRuntimeVariantValue

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 VBRuntimeVariantValue

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(VBRuntimeVariantValue)

MS-VBAL 6.1.2.8.1.6 Environ$

RuntimeSemanticsEvaluationResult StdInteraction__SEnviron(VBRuntimeVariantValue key)

Parameters

key VBRuntimeVariantValue

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(VBRuntimeVariantValue, VBAppWinStyle)

MS-VBAL 6.1.2.8.1.15 Shell

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

Parameters

path VBRuntimeVariantValue

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 VBRuntimeVariantValue[])

MS-VBAL 6.1.2.8.1.16 Switch

RuntimeSemanticsEvaluationResult StdInteraction__Switch(params VBRuntimeVariantValue[] varExpr)

Parameters

varExpr VBRuntimeVariantValue[]

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(VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue)

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(VBRuntimeVariantValue)

MS-VBAL 6.1.2.8.1.6 Environ

RuntimeSemanticsEvaluationResult StdInteraction__VEnviron(VBRuntimeVariantValue key)

Parameters

key VBRuntimeVariantValue

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.