BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DCOM Client not running on Server

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Jim Fleming
Guest





PostPosted: Wed Apr 06, 2005 4:00 pm    Post subject: DCOM Client not running on Server Reply with quote



Hi,
I have a DCOM client program that runs correctly on our client PCs, connecting to a COM object on
our server.

Now I want to run that same client program on the Server, accessing the same COM object, but using
DCOM (i.e. calling CreateRemote). I don't want to have another version of the client program calling
the COM object via Create. What must I do on the server so that the client program can access the
local COM object using CreateRemote, or is there another way around this???

Regards,

Jim Fleming


Back to top
George Birbilis
Guest





PostPosted: Wed Apr 06, 2005 9:54 pm    Post subject: Re: DCOM Client not running on Server Reply with quote



Quote:
I have a DCOM client program that runs correctly on our client PCs,
connecting to a COM object on our server.

Now I want to run that same client program on the Server, accessing the
same COM object, but using DCOM (i.e. calling CreateRemote). I don't want
to have another version of the client program calling the COM object via
Create. What must I do on the server so that the client program can access
the local COM object using CreateRemote, or is there another way around
this???

Maybe try registering some alias GUID so that when that one is referred to
via DCOM your local object is fetched. Not sure if it would work though
Try asking at the DCOM mailing list (think it's maintained by DevelopMentor)
or search its archives if it has stoped

-----
George Birbilis (birbilis (AT) kagi (DOT) com)
Microsoft Most Valuable Professional
MVP J# for 2004 & 2005
http://www.kagi.com/birbilis
--------------



Back to top
Jim Fleming
Guest





PostPosted: Thu Apr 07, 2005 5:41 pm    Post subject: Re: DCOM Client not running on Server Reply with quote



George,
Would there be some way of modifying the client so:

if (on Server)
Local Create of COM Object
else
CreateRemote

The problem then boils down to how to know if we are on the server. Any ideas ???

Thanks,
Jim Fleming


Back to top
Jim Fleming
Guest





PostPosted: Thu Apr 07, 2005 5:46 pm    Post subject: Re: DCOM Client not running on Server Reply with quote

George,
Sorry about that stupid question --- brain switched off !! The client program can find out the node
on which it is running, and already knows the server name. If they are both the same, we're running
on the Server !!!! Solved !!!!

Jim Fleming


Back to top
George Birbilis
Guest





PostPosted: Fri Apr 08, 2005 11:11 am    Post subject: Re: DCOM Client not running on Server Reply with quote

Quote:
George,
Sorry about that stupid question --- brain switched off !! The client
program can find out the node on which it is running, and already knows
the server name. If they are both the same, we're running on the Server
!!!! Solved !!!!

indeed, reading your previous e-mail it just came to me, that the client app
is yours too, so you can make it work as you please (I was thinking
originally that the client app was some other one for which you had no
source code access)

btw, not sure if CreateRemote checks itself if the remote object is local or
not. I think the usual DCOM pattern is to register the remote objects
locally to, but set info on them to instantiate the object (proxy/stub
style) at the remote machine. You usually just registered the type libraries
at the client. If with CreateRemote you can pass an IP ("localhost" or
"127.0.0.1" should do) from the client side via CreateRemote I suppose
you're OK though when the client is on the server

-----
George Birbilis (birbilis (AT) kagi (DOT) com)
Microsoft Most Valuable Professional
MVP J# for 2004 & 2005
http://www.kagi.com/birbilis
--------------



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.