🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
4 messages
4 total messages Started by Andy Thu, 15 Nov 2001 20:14
AppServer Bind through COM+
#350
Author: Andy
Date: Thu, 15 Nov 2001 20:14
26 lines
1792 bytes
I'm not really sure if this is the right place but here goes.

I had a MIDAS AppServer (EXE) that had some additional methods 
defined and I connected and used these methods from the client
by binding to the dispatch interface (using Bind),

	AppServer = new ITMDbRDMDisp ();
	AppServer->Bind (DCOMConnection->GetServer ());
	AppServer->xyz ();

All worked fine.  However, I have now converted the AppServer 
to a DLL and installed it into Component Services (win2k) COM+.
Now, whenever I Bind, it fails.  I don't get an error but 
IsBound returns false.  All subsequent calls to the AppServer
fail with an assertion (understandably).

The questions,

How do I bind to the dispatch inteface of a DLL running within
COM+?
Or in fact, is this not the correct way to call my methods?

Any suggestions greatly appreciated.

Andy
Re: AppServer Bind through COM+
#354
Author: Andy Walker
Date: Tue, 20 Nov 2001 11:25
37 lines
1879 bytes
This is how I solved it,  

IDispatch* disp = (IDispatch*)(DCOMConnection->AppServer);
AppServer = new IMDbRDMDisp((IMDbRDM*)disp);
AppServer->xyz ();

Andy

"Andy" <andy@iola.co.uk> wrote:
>
>I'm not really sure if this is the right place but here goes.
>
>I had a MIDAS AppServer (EXE) that had some additional methods 
>defined and I connected and used these methods from the client
>by binding to the dispatch interface (using Bind),
>
>	AppServer = new ITMDbRDMDisp ();
>	AppServer->Bind (DCOMConnection->GetServer ());
>	AppServer->xyz ();
>
>All worked fine.  However, I have now converted the AppServer 
>to a DLL and installed it into Component Services (win2k) COM+.
>Now, whenever I Bind, it fails.  I don't get an error but 
>IsBound returns false.  All subsequent calls to the AppServer
>fail with an assertion (understandably).
>
>The questions,
>
>How do I bind to the dispatch inteface of a DLL running within
>COM+?
>Or in fact, is this not the correct way to call my methods?
>
>Any suggestions greatly appreciated.
>
>Andy
>
R: AppServer Bind through COM+
#360
Author: Francesco Rossi
Date: Tue, 27 Nov 2001 02:19
18 lines
1495 bytes
HI,
yes this code work fine, but if i call this part of source code more then
one time, for examples in a private method 'connection' i receive an error
'on access violation on address FFFFFF' and IDE mark the first line of your
source.
Can you tell me how i can resolv the problem ?
Thank.
Andy Walker <andy@iola.co.uk> wrote in message 3bfa3d8c_1@dnews...
>
> This is how I solved it,
>
> IDispatch* disp = (IDispatch*)(DCOMConnection->AppServer);
> AppServer = new IMDbRDMDisp((IMDbRDM*)disp);
> AppServer->xyz ();
>
> Andy
>
> "Andy" <andy@iola.co.uk> wrote:
Re: R: AppServer Bind through COM+
#375
Author: Andy Walker
Date: Tue, 04 Dec 2001 16:56
47 lines
2115 bytes
Francesco,

Sorry I took so long to reply - work commitments etc.

I'm not really sure why you would want to perform the code 
twice BUT make sure that you 'unbind' after you have finished 
with the interface,

    if (AppServer)
    {
    	if (AppServer->IsBound ())
	   AppServer->Unbind (true);
                    
    	delete AppServer;
    }

However, I normally connect to the interface once, and pass a 
pointer around to every program that needs to access the 
AppServer.  When I have finished I then unbind and close.

Hope this helps.

Andy

"Francesco Rossi" <inforsi@tin.it> wrote:
>HI,
>yes this code work fine, but if i call this part of source code more then
>one time, for examples in a private method 'connection' i receive an error
>'on access violation on address FFFFFF' and IDE mark the first line of your
>source.
>Can you tell me how i can resolv the problem ?
>Thank.
>Andy Walker <andy@iola.co.uk> wrote in message 3bfa3d8c_1@dnews...
>>
>> This is how I solved it,
>>
>> IDispatch* disp = (IDispatch*)(DCOMConnection->AppServer);
>> AppServer = new IMDbRDMDisp((IMDbRDM*)disp);
>> AppServer->xyz ();
>>
>> Andy
>>
>> "Andy" <andy@iola.co.uk> wrote:
>
>
>
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