Class VbpProjectImporter
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
Returns
Import(string, string, ILibrarySource, string?)
The project a .vbp makes.
public static VbpImport Import(string vbp, string fileName, ILibrarySource libraries, string? folder = null)
Parameters
vbpstringThe text of the
.vbp.fileNamestringThe name of the
.vbpfile, which names a project that names itself nothing.librariesILibrarySourceThe descriptions of the libraries the platform ships.
folderstringThe absolute path of the
.vbp's folder, which a path that climbs out of it and comes back in is resolved against (..\MyProj\Util.basfromMyProj\MyProj.vbpisUtil.bas); null when it is not known, and such a path is outside of the folder.