如何手动设置 VB6 Activex 控件的 GUID
How to manually set the GUID for a VB6 Activex control
最近我们遇到一个问题,我们必须修改很久以前开发的ActiveX 控件。问题是,我们丢失了源代码,但我们找到了具有不同 GUID 的同一控件的另一个版本。
要求保留旧的 GUID,因为其他产品正在使用相同的控件。所以我们想用旧的替换新的控件 GUID。
可能吗?如果是这样,请告诉我如何在 VB6 中更改 Active X 控件的 GUID。
您无需手动将接口 & class GUID 放入您的应用程序中,但在您的项目设置中,您需要启用 "Binary Compatibility" 指向具有接口 & [=20] 的 DLL =] 您希望项目使用的 GUID。
来自 Visual Basic 6.0 项目文档组件工具指南,“Providing a Reference Point for Binary Version Compatibility”:
To specify a reference version of the component type library
Open the project.
From the Project menu, choose Project Properties to open the Project Properties dialog box, and select the Component tab.
Click Binary Compatibility to lock down the class IDs in the project.
Note As explained in "Project Compatibility: Avoiding MISSING References," the Project Compatibility setting actually has nothing to do with the Version Compatibility feature.
- Update the box at the bottom of the Version Compatibility frame with the full path and name of the most recent version of your component.
Whenever you make a new executable from your component project, Visual Basic compares the new interfaces of your classes to the ones described in the file you have specified. Visual Basic updates the type library version number according to the level of compatibility between the interfaces.
有关详细信息,请务必通读文档“Version Compatibility in ActiveX Components”部分中的所有部分。
最近我们遇到一个问题,我们必须修改很久以前开发的ActiveX 控件。问题是,我们丢失了源代码,但我们找到了具有不同 GUID 的同一控件的另一个版本。
要求保留旧的 GUID,因为其他产品正在使用相同的控件。所以我们想用旧的替换新的控件 GUID。
可能吗?如果是这样,请告诉我如何在 VB6 中更改 Active X 控件的 GUID。
您无需手动将接口 & class GUID 放入您的应用程序中,但在您的项目设置中,您需要启用 "Binary Compatibility" 指向具有接口 & [=20] 的 DLL =] 您希望项目使用的 GUID。
来自 Visual Basic 6.0 项目文档组件工具指南,“Providing a Reference Point for Binary Version Compatibility”:
To specify a reference version of the component type library
Open the project.
From the Project menu, choose Project Properties to open the Project Properties dialog box, and select the Component tab.
Click Binary Compatibility to lock down the class IDs in the project.
Note As explained in "Project Compatibility: Avoiding MISSING References," the Project Compatibility setting actually has nothing to do with the Version Compatibility feature.- Update the box at the bottom of the Version Compatibility frame with the full path and name of the most recent version of your component.
Whenever you make a new executable from your component project, Visual Basic compares the new interfaces of your classes to the ones described in the file you have specified. Visual Basic updates the type library version number according to the level of compatibility between the interfaces.
有关详细信息,请务必通读文档“Version Compatibility in ActiveX Components”部分中的所有部分。