Using MFC CStringList as a COM collection with ATL?
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
We have a lot of VC6 legacy code using MFC's CStringList. I've been charged with creating a COM interface for CStringList so that it can be used from within VB. Also the interface needs to support the for each ... VB syntax. It seems to me that ATL's CComEnum/IEnumVARIANT is the answer, but I can't figure out the implementation. I accept that I should probably be using the STL, but that's not an option at the moment. I've seen a lot of examples of using CComEnum but they all seem to use STL containers or safearrays to hold the data. Does anyone have an example that uses CStringList or any other MFC list/array? Gavin