我正在研究一个旧的MFC项目,该项目尝试通过GUID加载一些ActiveX控件并失败,因为该GUID尚未注册,我无法注册。
该解决方案中包含多个项目,生成DLL和EXE:
Solution
- {name} project => {name}.exe
- {control}.h and {control}.cpp for MFC control ({control} class).
It has `static CLSID const clsid` which is being initialized to GUID the app tries to use.
- {name}.rc file which describes a lot of dialogs and other resources.
Some of dialogs reference that {control} by its GUID.
- {lib} project => {lib}.dll
- {lib}.rc file which describes a lot of dialogs and other resources.
Some of dialogs reference {control} by its GUID.
我应该如何注册控件以便它可以通过其GUID加载?构建后没有.OCX,.TLB,.IDL文件,regsvr32 /i {name}.exe
和regsvr32 /i {lib}.dll
都无法执行任何操作。