TBMANLIB_RES Package

Author: woeoio

A twinBASIC package for loading binary resources embedded in a compiled executable and converting them to bytes, strings, hex, Base64, or pictures.

Classes

  • cRes – loads a binary resource from the compiled executable and converts it to bytes, a string, hex, Base64, or a picture.

Modules

  • TBMAN – exposes a pre-instantiated cRes object as a public variable, providing package-wide access to resource loading without requiring a separate instance.

Enumerations

  • Base64Prefix – specifies whether, and with what MIME type, a data URI prefix is prepended to the Base64 string returned by ReturnBase64.

Methods (cRes)

  • Read – loads a resource from the compiled executable into the cRes instance.
  • ReturnBase64 – returns the resource bytes as a Base64-encoded string, with an optional MIME-type data-URI prefix.
  • ReturnBytes – returns the raw byte array loaded from the resource file.
  • ReturnHex – returns the loaded resource bytes as an uppercase hex string, with an optional separator between each byte and an optional line-break interval.
  • ReturnPicture – returns the loaded resource bytes as an IPictureDisp object.
  • ReturnString – returns the loaded resource bytes as a String, with an optional character-set conversion.