Table of Contents

Class VbpProjectImporter

Namespace
RDCore.SDK.Workspace
Assembly
RDCore.SDK.dll

Makes a .rdproj project of a VB6 project file (.vbp): its name, its modules, classes and forms, the libraries it references, and its conditional compilation arguments.

public static class VbpProjectImporter
Inheritance
VbpProjectImporter
Inherited Members

Remarks

A .vbp is Key=Value lines, up to its first [section]; the paths it names are relative to its own folder, which is the folder of the .rdproj. A library is referenced by the identifier of its type library (Reference=*\G{GUID}#version#lcid#path#description), and is the one the platform ships a description of for that identifier (TryGetByGuid(Guid, out LibraryDescription?)); VBA, which every project references, is the project's already.

What a .rdproj cannot say is not carried over, and is noted (VbpImportNote): a reference to another project, an ActiveX control, a library the platform has no description of, a file outside of the project's folder, a Startup.

Methods

Decode(byte[], Encoding)

The text of a .vbp, as VB6 writes it: in the ANSI code page of the machine, unless it starts with a byte order mark.

public static string Decode(byte[] bytes, Encoding ansi)

Parameters

bytes byte[]

The content of the file.

ansi Encoding

The ANSI code page of the machine.

Returns

string

Import(string, string, ILibrarySource, string?)

The project a .vbp makes.

public static VbpImport Import(string vbp, string fileName, ILibrarySource libraries, string? folder = null)

Parameters

vbp string

The text of the .vbp.

fileName string

The name of the .vbp file, which names a project that names itself nothing.

libraries ILibrarySource

The descriptions of the libraries the platform ships.

folder string

The absolute path of the .vbp's folder, which a path that climbs out of it and comes back in is resolved against (..\MyProj\Util.bas from MyProj\MyProj.vbp is Util.bas); null when it is not known, and such a path is outside of the folder.

Returns

VbpImport