I've never tried it James, but everything I know about computers (which is considerably less than you, I'm sure), tells me it can be done. After all, structures in memory are structures in memory, and Api function calls are Api function calls, so as long as the right parameters & structures are used - I'd expect it to work. However, I know little of the underpinnings of the .NET framework, so I don't know just what functions/interfaces would be helpful there. With the Visual Studio 4, 5 & 6 stuff though I imagine it would work.
As I continue my study of this rather complicated (h***, its more than complicated. I think one could just about call it 'rocket science'.) material, I hope to end up with my own version of a TypeLib browser where I could use perhaps a radio button or check box to indicate whether I want C++ declares or PowerBASIC declares and interfaces generated. I had been working on that several months ago, and actually had the code roughed out enough that it was outputting pretty good declares for me. There were a few minor problems though and I got to tearing it up pretty good. At some point I'd like to get back to that work though. I pretty much consider myself a PowerBASIC programmer rather than a C++ programmer, but what keeps me prettily heavily in the C++ language is that in my work I create handheld data recorder programs for our field data collection in the PA Bur of Forestry, and for that I use Microsoft's eMbedded Visual C++ 4.0. I've never found a suitable alternative to that. There are alternatives, but by suitable I mean ability to get real low level into the OS to modify things as I need to.
However, my C++ knowledge has improved quite a bit over the past year or two due to the fact that on the last major programming project I did I decided to use C++ instead of the C I'm more familiar with, and what with all this studying of COM I'm doing, I'm getting a better sense of C++. For desktop Windows programming, which I also do a lot of, I invariably use PowerBASIC, as its a much more productive environment.
If you want any of that typelib code I've got I'd be happy to give it to you. Its C++ though.
Added five minutes later:
One other thing James. If you want to try accessing VB ActiveX controls from C why don't you install that VB5 you have. You had mentioned you had that in other posts. I expect you would get a good number of common ActiveX controls installed to give you something to work with. The one control I really missed when I moved to PB from VB was the MSFlexGrid control. Its an Ocx or ActiveX control. To a lesser extent I missed the MSCal control, which is another ActiveX control. I was able to first get these controls working through code Jose Posted & his TypeLib browsers. In the generated PowerBASIC code from his TypeLib browser it can be clearly seen how he created the objects in memory (the interfaces) and was able to receive events from these controls. Essentially, he had to do exactly what a C programmer would do to accomplish this. In C or pre v9 PowerBASIC, you need to either allocate memory for the VTables or use Types containing pointers to the various interface functions, just as you were doing in your last code you posted. That's kind of why I'm recommending what I am in terms of studying some of Jose's excellent code. I believe you would need one of his earlier TypeLib browsers however; with PB9 it wasn't necessary to do any of that to receive events. Also, I'm not sure how up on Events you are. You've got to study up on that and it is quite complex - especially so when you get into the enumerators.