Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


idl, recordsets and collections?

Posted on 1999-07-08
Medium Priority
Last Modified: 2013-12-03
Is it possible to pass a collection of recordsets between components using MS IDL? I.e., is there a collection type that MIDL recognizes, so I don't have to write my own custom marshaller?
Question by:barrett
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

alex1234 earned 600 total points
ID: 1402505
Yes, it is possible. "Collection" COM object exists in VBA5.dll (it is a part of Visual Basic 5). Get this DLL, register and use "Collection" object to pass Recordsets the same way VB uses it.


Author Comment

ID: 1402506
OK, this seems like a good approach. I'm using vba6.dll, just to be modern. I find that it won't register using regsvr32 (no DllRegisterServer entry point), but that's OK, since I'm using C++/ATL. I import the dll using #import and rename the _Collection interface and its coclass, Collection, so they don't conflict with ADO's _Collection interface (I'm also using ADO).

Unfortunately, now I have problems. My C++ code can't find the coclass, Collection (now called VBCollection after my "rename" directive). When I look in the registry, no InProcServer is associated with the Collection class. Also, ATL should be wrapping the interface pointer in an ATL smart pointer, which appears to be happening in VBA6.tlh (there is a _COM_SMARTPTR_TYPEDEF for _VBCollection), but my C++ code doesn't recognize this fact.

So I'm kind of stuck. More brilliant insights welcome.

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question