How to make a COM prototype for excepting a recordset

Posted on 2003-03-04
Medium Priority
Last Modified: 2012-06-27
Hi everyone.. I'm trying to except a recordset from a vb app from my C++ COM DLL

I have the following declaration in my IDL file

[id(3), helpstring("method testting2")] HRESULT testting2([in] int skip,[in] _RecordsetPtr rec, [out] int *claim, [out] int *multi, [out] int *bypass, [out] int *total);

I get the following error... C:\BCBSM\DLL Development\test\test.idl(31) : error MIDL2025 : syntax error : expecting a type specification near "_RecordsetPtr"

I want to be able to use this rec set in my C++ COM DLL... does anyone know how to do this??? to make it simple.. the VB App is sending me a recordset containing information... I would like to store this recordset and use it in my COM DLL.

please help


Question by:Blade007
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

elcapitan earned 280 total points
ID: 8070747
1. In the IDL file, make sure the line:
importlib("C:\Program Files\Common Files\System\ado\msado15.dll");
is inside the library section.

2. use the type _Recordset instead of _RecordsetPtr rec:
... [in] _Recordset rec ...

LVL 11

Expert Comment

ID: 9888124
No comment has been added lately, so it's time to clean up this TA. I will
leave a recommendation in the Cleanup topic area that this question is:

Answered: Points to elcapitan: Grade B

Please leave any comments here within the next seven days.

Experts: Silence means you don't care. Grading recommendations are made in light
of the posted grading guidlines (http://www.experts-exchange.com/help.jsp#hi73).


-bcl (bcladd)
EE Cleanup Volunteer

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

771 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