开发者

What is the C++/CLI equivalent to a VB6 Collection?

I already tried ArrayList^ and VB6 gives me a 'Type mismatch' error. I don't see a开发者_C百科 C++/CLI 'Collection' or 'List'.

So what is the equivalent, if there is one?


Yeah, doesn't work, VB6 wants its own Collection class. I'm fairly shocked how that turned out. I thought, easy peasy, just add a reference to c:\windows\system32\msvbvm60.dll and use the interop library that generates. Then:

VBA::Collection^ coll = gcnew VBA::Collection();

Kaboom:

 Retrieving the COM class factory for component with CLSID {A4C4671C-499F-101B-BB78-00AA00383CBB} failed due to the following error: 80040154.

Class not registered. Looked in the registry, it's there under HKLM\CLSID but the InprocServer32 key is blank. Blank. That's not good. Changed it to point to point to msvbvm60.dll. Kaboom, 0x80040111, "ClassFactory cannot supply requested class".

This isn't going to fly. Abandon all hope the way I see it, unless you can refactor the VB6 code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜