Table of Contents

Class StdLibClassAttribute

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

Marks an interface as the internal representation of one of the standard library's predefined class modules (MS-VBAL §6.1.3).

[AttributeUsage(AttributeTargets.Interface)]
public sealed class StdLibClassAttribute : Attribute
Inheritance
StdLibClassAttribute
Inherited Members

Remarks

A predefined class module is a class module: it is a nameable type an As clause can bind, and its members resolve only through an instance of it.

The marker is what makes the class discoverable - every VBA project has the standard library whether or not anything references it (RD-VBAL §6.1), so nothing declares the set of classes a workspace gets, and the set is read off the SDK itself.

Constructors

StdLibClassAttribute(string?)

Marks an interface as the internal representation of one of the standard library's predefined class modules (MS-VBAL §6.1.3).

public StdLibClassAttribute(string? name = null)

Parameters

name string

The class's name in VBA source, when it differs from the conventional one.

Remarks

A predefined class module is a class module: it is a nameable type an As clause can bind, and its members resolve only through an instance of it.

The marker is what makes the class discoverable - every VBA project has the standard library whether or not anything references it (RD-VBAL §6.1), so nothing declares the set of classes a workspace gets, and the set is read off the SDK itself.

Properties

IsCreatable

Whether VBA source can create an instance of this class with New.

public bool IsCreatable { get; init; }

Property Value

bool

Remarks

true by default - New Collection and New RegExp are both valid. A class whose instances only ever come from the environment, the way an ErrObject comes from the Err function, sets this to false so that New on it is reported rather than resolved.

Name

The class's name in VBA source, or null for the conventional one: the declaring interface's name without its IStd prefix and Class suffix, so IStdCollectionClass is Collection.

public string? Name { get; }

Property Value

string

ProgId

The programmatic identifier the class answers to in CreateObject (VBScript.RegExp), if it has one: the name of a COM class the platform implements itself, found before the machine's own servers are asked - which is what makes a program that creates one by name portable to a machine that has no such server.

public string? ProgId { get; init; }

Property Value

string

Remarks

The part after the last dot is the name of the class.

TypeName

What TypeName says of an object of the class, when it is not the class's name: the VBA library's UserForms collection is an object whose class MS-VBA names nothing, and TypeName(UserForms) is Object (Excel-measured, oracle\s41 U01).

public string? TypeName { get; init; }

Property Value

string