🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5248

Recordsetptr problems with COM

#5248
From: Geert Van Laethem
Date: Tue, 26 Jun 2001 13:52
34 lines
1721 bytes
Hi,

I want to pass from my COM-server to my client a Recordsetptr in my type library i define it and the implementation look something like this.

STDMETHODIMP TCustomerImpl::GetData(_RecordsetPtr* Dataset)
{
  m_DataModule->adsCustomer->Active = TRUE;
  _di__Recordset  lTest;
  lTest = m_DataModule->adsCustomer->Recordset;
  lTest->QueryInterface(__uuidof(_di__Recordset), (void**) &Dataset);
  return S_OK;
}

It compiles but there is no data in the RecordsetPtr when i do the queryinterface.
On the client i wrote something like that : 

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  TCOMICustomer lCustomer;
  OleCheck(CoCustomer::Create(lCustomer));
  _RecordsetPtr*  test;
  OleCheck(lCustomer.GetData(test));
  ShowMessage(IntToStr((*test)->RecordCount));
}

On the showmessage it gives me an access violation.


Can somebody help me with that problem?

TIA

Geert Van Laethem
Technical Details
Message-ID: <3b3893b7$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,ac6f3a92d32e0895,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-06-26 07:07:28 PST
From: "Geert Van Laethem" <Geert.Atlantis@usa.net>
Sender: "Geert Van Laethem" <Geert.Atlantis@usa.net>
Reply-To: "Geert Van Laethem" <Geert.Atlantis@usa.net>
Subject: Recordsetptr problems with COM
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 194.78.30.90 194.78.30.90    
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3b3893b7$1_2@dnews>
Date: 26 Jun 2001 06:52:55 -0700
X-Trace: dnews 993563575 207.105.83.65 (26 Jun 2001 06:52:55 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews