是否有任何可用的 VBP(Visual Basic 6 项目)文件文档?
是否有关于 VBP(Visual Basic 项目)文件中使用的键/值的可用文档?我试图更好地理解 VBP 如何在内部处理引用。
示例行:
Reference=*\G{BF204980-5E29-4945-AEB5-DDB284C568D3}#1.0#0#..\Project1.dll#Project1
Is there any available documentation on the Keys/Values used in the VBP (Visual Basic Project) file? I'm trying to achieve a better understanding of how VBP handles references internally.
Example Line:
Reference=*\G{BF204980-5E29-4945-AEB5-DDB284C568D3}#1.0#0#..\Project1.dll#Project1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
引用的语法在 [MS-OVBA] 中描述:
The syntax of references is described in [MS-OVBA]:
抱歉,但我在网上找到的最好的只是一个概述( http://www.securitypronews.com/it/applicationdevelopment/spn-19-20020115VisualBasicProjectFilesStructure.html)。
另请注意,VB 窗体中使用的 ActiveX 控件将在 *.frm 文件中具有引用条目。
我猜您正在寻求开发 ActiveX 项目(无论是 EXE、DLL 还是 OCX)。如果这是您的目标,我的建议如下:
(1) 了解二进制兼容性设置。
(2) 最好在参考可执行文件后添加
.cmp
后缀,例如Project1.dll.cmp
。当您查找二进制兼容性时,您就会明白我的意思。(3) 在 VirtualPC 中开发 VB6 ActiveX 项目; VB6 ActiveX 开发对 Windows 注册表造成了很大的磨损。
(4) 当VB有理由定位一个ActiveX对象时,
Reference=
设置中DLL/EXE/OCX的文件路径将会改变;它将与在注册表中找到的任何内容一起使用(最新注册的获胜)。此外,还有“升级 ActiveX 控件”设置可以进行更改的项目属性。(5) 您几乎无法控制 VB6 将生成的 GUID 或类型库,除非通过适当的二进制兼容性管理可以达到一定程度。
这是我所知道的 - 从上面的示例中,
BF204980-5E29-4945-AEB5-DDB284C568D3
表示 ActiveX 对象的 GUID。1.0
表示 ActiveX 对象的版本。0
表示...我不知道。..\Project1.dll
是 ActiveX DLL 所在(或曾经)所在位置的(相对)路径。Project1
是 ActiveX 对象的(友好)名称。Sorry, but the best I've found on the net is just an overview ( http://www.securitypronews.com/it/applicationdevelopment/spn-19-20020115VisualBasicProjectFilesStructure.html ).
Also note that ActiveX controls used in VB Forms will have reference entries in the *.frm file.
I am guessing you're looking to develop ActiveX projects (whether EXE, DLL, or OCX). If that's your aim, here's my advice:
(1) Learn about the Binary Compatibility settings.
(2) It is good practice to suffix your reference executable with a
.cmp
, such asProject1.dll.cmp
. When you look up Binary Compatibility, you'll know what I mean.(3) Develop your VB6 ActiveX projects inside of VirtualPC; VB6 ActiveX development puts a lot of wear and tear on the Windows Registry.
(4) The file path to the DLL/EXE/OCX in the
Reference=
setting will change when VB has reason to locate an ActiveX object; it will go with whatever it finds in the registry (the latest to register wins). Also, there is the "Upgrade ActiveX Controls" setting the Project properties that can make changes.(5) You have little to no control over the GUID or Type Library that VB6 will generate, except to the degree you can achieve via proper Binary Compatibility management.
Here's what I know - from your example above,
The
BF204980-5E29-4945-AEB5-DDB284C568D3
indicates the GUID of the ActiveX object.The
1.0
indicates the version of the ActiveX object.The
0
indicates the ... I don't know.The
..\Project1.dll
is the (relative) path to where the ActiveX DLL is (or was) located.The
Project1
is the (friendly) name of the ActiveX object.