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

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

588 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