Understanding VB6 Project Files (.vbp)

VBP files have “Links” and “Objects” as follows:

Reference=*\G{D63E0CE2-A0A2-11D0-9C02-00C04FC99C8E}#2.0#0#..\..\..\WINDOWS\system32\msxml.dll#Microsoft XML, version 2.0 Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; ieframe.dll 
  • What are the differences between the two?
  • Why do some DLLs refer to a link instead of Object or vice versa?
  • Where does VB get the file path for object references? The paths are not specified for them in VBP, and the GUID does not appear when searching in my registry! However, when I load the project, VB tries to find dll / ocx / etc. on some absolute path (e.g. C:\path\to\dll\ieframe.dll ). Where does he get this path if it is not in the registry or VBP ?!
+6
source share
1 answer

Object are for ActiveX controls that are usually compiled into .ocx files. Reference are for type libraries, usually compiled into .dll or .tlb files. Note that .ocx files contain typelib too, so this is very controversial and pretty much a legacy.

Paths and file names are optional; typelib identifiers are the canonical way to resolve dependencies. Only if they are not found in the registry, is there a strategy for automatically allowing search of files in the current folder for .ocxes only. This most unpleasant behavior occurs at runtime when applications start automatically registering .ocxes in the current folder if typelibs are not found and often fail in modern operating systems due to lack of write permissions in HKLM.

There are also Object lines in the source .frm / .ctl files. They are added to the current project when adding an existing form / user control.

If the .ocx typelib option is added as the Reference string, the IDE usually does not load the project, and manual editing is required.

+5
source

Source: https://habr.com/ru/post/970458/


All Articles