๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
6 messages
6 total messages Started by Goumatianos Fri, 23 Mar 2001 18:15
About callbacks
#593
Author: Goumatianos
Date: Fri, 23 Mar 2001 18:15
31 lines
1708 bytes
I have experience in Delphi , but in c++builder
just 2 months. I can't develop a callback method in midas project.
At server's side (in server.tlb) I created a interface "IEbClient"
(IDispatch) and its
method "CallbackClient".

In delphi, at client's side (clientfrm) is:
-------------------------------------------------------------
type
  TCallBack = class(TAutoIntfObject, IEbClient)
  procedure CallBackClient(ActionID,UpdateKind: Integer; aValue:
oleVariant); Safecall;
  end;
.....

procedure TCallBack.CallBackClient(ActionId,UpdateKind: Integer;aValue:
OleVariant);
Begin
Case ActionId of
0: clientform.Close;
1: Clientform.Updatedata(ActionID,UpDateKind,aValue);
end;
end;

----------------------------------------------------------------

But I couldn't translated it in c++builder.

Thanks in advance
Nikitas
( email - goumatianos@hotmail.com )
Re: About callbacks
#596
Author: Mark Cashman
Date: Tue, 27 Mar 2001 00:54
12 lines
1243 bytes
Hi, Nikitas!

What error message do you get?

------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Re: About callbacks
#598
Author: Goumatianos
Date: Tue, 27 Mar 2001 16:36
25 lines
1444 bytes
I tried it in many ways...
The message was"access violation..."
I think the proplem is in clients side.
Something is wrong with the declaration.
In delphi that works perfectly is:

type
  TCallBack = class(TAutoIntfObject, IEbClient)
  procedure CallBackClient(ActionID,UpdateKind: Integer; aValue:
oleVariant); Safecall;
  end;

but in c++ builder I tried in many ways..such as..
class TCallback : IEbClient
{....};

or

class IEbClient  : IDispatch
{.....}

I don't know how to declare "TCallBack = class(TAutoIntfObject, IEbClient)"
(two classes..)

thanks
Re: About callbacks
#599
Author: Mark Cashman
Date: Wed, 28 Mar 2001 03:42
15 lines
1595 bytes
Unfortunately, you cannot declare multiply inherited descendants of VCL
classes. This is a big problem when dealing with interfaces.

However, your access violation is probably due to a programming or
memory usage error, since the above condition does not allow the program
to compile.

------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Re: About callbacks
#600
Author: Goumatianos
Date: Wed, 28 Mar 2001 04:16
6 lines
1260 bytes
So I can do callback in Delphi , but there isn't way to do it in c++Builder?
Then, the only way is to convert the client as COM server, isn't it?

Thanks , but before I convert the client to com server, I will try some
other ways. If I achieve it (without converting to a second com server), I
will post it here.
Re: About callbacks
#664
Author: Peter Burger
Date: Wed, 11 Apr 2001 06:35
32 lines
1942 bytes
thats sounds very interesting,

i'm looking also for a technique to realize callbacks with c++ builder
and didn't find any solution till yet.

my trips ends allways at the state of :


=>  I don't know how to declare "TCallBack = class(TAutoIntfObject,
IEbClient)"
    (two classes..)


so it would be very nice if some๏ฟฝone find a solution of the callback - c++
builder problem


peter

--

"Goumatianos" <goumatianos@hotmail.com> schrieb im Newsbeitrag
news:3ac1640d_2@dnews...
> So I can do callback in Delphi , but there isn't way to do it in
c++Builder?
> Then, the only way is to convert the client as COM server, isn't it?
>
> Thanks , but before I convert the client to com server, I will try some
> other ways. If I achieve it (without converting to a second com server), I
> will post it here.
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads