🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1527

IProviderPtr vs. IProvider * : A related problem

#1527
From: Mark Brown
Date: Thu, 04 Nov 1999 00:00
44 lines
2314 bytes
(Please excuse the cross-post, as I found that this group seems to be
tackling this problem more than the group I previously posted this
too.)

Hi everyone-

After installing patch 1 and 2 for CPP Builder 4, we have encountered
this new phenomenon of type library changes.  I have read the
work-around for getting the exported tables and queries from the app
server to work for the client.  However, another piece of our code
(which I never fully understood) has now broken.

We had a callback implementation in place where the client was passing
a pointer to its sink object to the server so the server could notify
it when needed.  The data type of the object used to be declared as:

    CComPtr <IClientSink> mySinkPointer;

So, I would create my sink by:

    CComObject <TClientSink> *Sink = new CComObject <TClientSink>;
    mySinkPointer = Sink;

Finally, after obtaining a pointer to the server callback object, the
client would pass the pointer to the sink to the server by:

     HRESULT hr = pServerCallbackObject->Connect(mySinkPointer, (long
*)&Cookie);

whereby the Connect method would use the mySinkPointer to pass to the
Advise method of the IConnectionPointImpl.

Whew...now the problem is that originally, the Connect method had a
IClientSink * variable type for the first parameter, and now it has
been changed to IClientSinkPtr variable type.  I can't seem to get the
correct address of my sink sent over to the server callback object due
to this variable type change, and I don't have enough information
about this new variable type.

Anyone have any clues?  Do I need to cast it somehow to a (IClientSink
*) variable on the client and/or server?

Thanks,
Mark Brown
Technical Details
Message-ID: <7vs48m$3ap7@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,b767dd993a659b8e,start
X-Google-Attributes: gidfcd2b,public
From: "Mark Brown" <mbrown@dsi-inc.net>
Subject: IProviderPtr vs. IProvider * : A related problem
Date: 1999/11/04
Message-ID: <7vs48m$3ap7@forums.borland.com>
X-Deja-AN: 544394604
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset="iso-8859-1"
Mime-Version: 1.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.cppbuilder.database.multi-tier