Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

How to use LPDISPATCH *ADODBRecordset

I have the following in my cpp file and is created in my idl file...

idl - STDMETHOD(StartReformatProcess)(/*[in]*/ int skip, /*[in]*/ int iloop,/*[in]*/ LPDISPATCH *ADODBRecordset, /*[out]*/ int *errorNo);

cpp - STDMETHODIMP CReformatter::StartReformatProcess(int skip, int iloop, LPDISPATCH *ADODBRecordset, int *errorNo)
{
//How would i access the recordset that was passed to me.

}

I guess my question here is "how would I access the recordset from the LPDISPATCH declaration.  I have a VB dll passing it into my VC++ dll... I know that the VB DLL is able to pass it... but I don't know how to use LPDISPATCH to get the recordset information.. can some one please help me out by giving my some examples.

Thanks,

Blade
0
Blade007
Asked:
Blade007
1 Solution
 
AnnaNachesaCommented:
You have to do something like:

IRowset* lpRowset = NULL;
ADODBRecordset->QueryInterface(IID_IRowset, (void**)&lpRowset);
ADODBRecordset->Release;
...
then do what you wish
then release the lpRowset as well...

also look here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/vcfaqhowdoiuseexistingadorecordset.asp

0
 
bcladdCommented:
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 AnaNachesa

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).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

-bcl (bcladd)
EE Cleanup Volunteer
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now