🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages Started by Jean Ferreira Fri, 10 Sep 1999 00:00
AppServer property
#1447
Author: Jean Ferreira
Date: Fri, 10 Sep 1999 00:00
11 lines
736 bytes
Hi guys,


I work with Delphi and sometimes I need to use C++Builder 4 SP1.

I need of some example of how cast the property AppServer to my interface.
All examples that have in C++Builder does't work.

Thanks in advance,

Jean
Re: AppServer property
#1451
Author: Steve Pietrykoski
Date: Fri, 10 Sep 1999 00:00
33 lines
1453 bytes
Jean,

Here is a macro I've written:

#define APPSERVER_INTERFACE( CONNECTION, SERVERNAME, VAR ) \
  IDispatch * VAR##Disp = (IDispatch *)(CONNECTION->AppServer); \
  I##SERVERNAME * VAR##Intf = reinterpret_cast<I##SERVERNAME
*>(VAR##Disp); \
  I##SERVERNAME##Disp VAR( VAR##Intf );

It declares a interface variable that you can use; here is an example:

  APPSERVER_INTERFACE( SocketConnection1, MaestroMain, Disp );

where MaestroMain is the name of the remote module and Disp is the
variable that you are declaring.  You can then use
Disp.YourInterfaceFunction().

Steve Pietrykoski


Jean Ferreira wrote:
> 
> Hi guys,
> 
> I work with Delphi and sometimes I need to use C++Builder 4 SP1.
> 
> I need of some example of how cast the property AppServer to my interface.
> All examples that have in C++Builder does't work.
> 
> Thanks in advance,
> 
> Jean
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