Table of Contents

Interface IStdHiddenModule

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

RD-VBAL 6.1.2.13 Hidden Module

[StdLibModule("_HiddenModule", IsHidden = true)]
public interface IStdHiddenModule

Remarks

Formalizes the public interface of the standard library's _HiddenModule: the members of the VBA library that its type library marks hidden, and that an object browser lists under that name. It is not one of the modules MS-VBAL §6.1.2 specifies, but the language needs it all the same - Array is documented (https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/array-function) and Input$ and Width are as old as the language - so the platform declares it as it does the modules the specification does name. What the hidden members share is that a hidden member is left out of a completion list and resolves anyway, being a member of a standard module like any other.

The pointer members (ObjPtr, StrPtr, VarPtr) are not documented by Microsoft even so; what they are is what the language has always done with them.

Methods

Array(params VBVariantValue[])

Array Gets a Variant containing an array of the arguments.

RuntimeSemanticsEvaluationResult<VBVariantValue> Array(params VBVariantValue[] arglist)

Parameters

arglist VBVariantValue[]

The values the elements of the array are given.

Returns

RuntimeSemanticsEvaluationResult<VBVariantValue>

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

Remarks

The array is a resizable array of Variant, with one element for each argument, in order. With no arguments it is zero-length: its upper bound is one below its lower.

Its lower bound is always 0, whatever Option Base says. That is the one a call qualified with the name of the library reaches - VBA.Array(1, 2) - and the classic gotcha of the language: written without a qualifier, Array(1, 2) is not a call of this member but the Array keyword, which begins at the Option Base of its module (ArrayExpressionNode).

Input(VBLongValue, VBIntegerValue)

Input Gets the characters read from a file opened in Input or Binary mode.

RuntimeSemanticsEvaluationResult<VBVariantValue> Input(VBLongValue number, VBIntegerValue fileNumber)

Parameters

number VBLongValue

The number of characters to read.

fileNumber VBIntegerValue

The file number of an open file.

Returns

RuntimeSemanticsEvaluationResult<VBVariantValue>

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

Remarks

Error 62 when the file ends before number characters could be read, 52 when the file number is not open, and 54 when the file was opened in a mode that cannot be read this way. The characters read are the string; unlike Input #, nothing is parsed, and a quotation mark or a comma is a character like any other.

InputB(VBLongValue, VBIntegerValue)

InputB Gets the bytes read from a file, as Input(VBLongValue, VBIntegerValue) gets characters.

RuntimeSemanticsEvaluationResult<VBVariantValue> InputB(VBLongValue number, VBIntegerValue fileNumber)

Parameters

number VBLongValue

The number of bytes to read.

fileNumber VBIntegerValue

The file number of an open file.

Returns

RuntimeSemanticsEvaluationResult<VBVariantValue>

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

Remarks

🚧 Not implemented: a file channel reads characters, and nothing in it reads a byte.

InputBString(VBLongValue, VBIntegerValue)

InputB Gets the bytes read from a file, as Input(VBLongValue, VBIntegerValue) gets characters.

[StdLibMember("InputB$")]
RuntimeSemanticsEvaluationResult<VBStringValue> InputBString(VBLongValue number, VBIntegerValue fileNumber)

Parameters

number VBLongValue

The number of bytes to read.

fileNumber VBIntegerValue

The file number of an open file.

Returns

RuntimeSemanticsEvaluationResult<VBStringValue>

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

Remarks

🚧 Not implemented: a file channel reads characters, and nothing in it reads a byte.

InputString(VBLongValue, VBIntegerValue)

Input Gets the characters read from a file opened in Input or Binary mode.

[StdLibMember("Input$")]
RuntimeSemanticsEvaluationResult<VBStringValue> InputString(VBLongValue number, VBIntegerValue fileNumber)

Parameters

number VBLongValue

The number of characters to read.

fileNumber VBIntegerValue

The file number of an open file.

Returns

RuntimeSemanticsEvaluationResult<VBStringValue>

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

Remarks

Error 62 when the file ends before number characters could be read, 52 when the file number is not open, and 54 when the file was opened in a mode that cannot be read this way. The characters read are the string; unlike Input #, nothing is parsed, and a quotation mark or a comma is a character like any other.

ObjPtr(VBObjectValue)

ObjPtr Gets a number that identifies an object: the same one for as long as it lives, and a different one for every other object.

[StdLibMember(null, IsHidden = true)]
RuntimeSemanticsEvaluationResult<VBLongPtrValue> ObjPtr(VBObjectValue @object)

Parameters

object VBObjectValue

The object.

Returns

RuntimeSemanticsEvaluationResult<VBLongPtrValue>

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

Remarks

0 for Nothing. The number is the identity the session gives the object, not an address in memory the program could read through: nothing in the runtime lays objects out in an address space.

StrPtr(VBStringValue)

StrPtr Gets the address of the characters of a string.

[StdLibMember(null, IsHidden = true)]
RuntimeSemanticsEvaluationResult<VBLongPtrValue> StrPtr(VBStringValue @string)

Parameters

string VBStringValue

The string.

Returns

RuntimeSemanticsEvaluationResult<VBLongPtrValue>

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

Remarks

🚧 Not implemented: the characters of a string live in the value that holds them, not at an address of the session's memory.

VarPtr(VBVariantValue)

VarPtr Gets the address of a variable.

[StdLibMember(null, IsHidden = true)]
RuntimeSemanticsEvaluationResult<VBLongPtrValue> VarPtr(VBVariantValue variable)

Parameters

variable VBVariantValue

The variable.

Returns

RuntimeSemanticsEvaluationResult<VBLongPtrValue>

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

Remarks

🚧 Not implemented: it takes its argument by reference, which a standard-library member cannot yet declare.

Width(VBIntegerValue, VBIntegerValue)

Width Sets the line width of a file opened for output: the number of characters a line holds before Print # and Write # start another (MS-VBAL §5.4.5.7).

RuntimeSemanticsEvaluationResult Width(VBIntegerValue fileNumber, VBIntegerValue width)

Parameters

fileNumber VBIntegerValue

The file number of an open file.

width VBIntegerValue

The width, from 0 (no limit) to 255.

Returns

RuntimeSemanticsEvaluationResult

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

Remarks

The Width statement is this member called without parentheses: Width #1, 80.