 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jim Fleming Guest
|
Posted: Wed Apr 06, 2005 4:00 pm Post subject: DCOM Client not running on Server |
|
|
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
|
Posted: Wed Apr 06, 2005 9:54 pm Post subject: Re: DCOM Client not running on Server |
|
|
| 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
|
Posted: Thu Apr 07, 2005 5:41 pm Post subject: Re: DCOM Client not running on Server |
|
|
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
|
Posted: Thu Apr 07, 2005 5:46 pm Post subject: Re: DCOM Client not running on Server |
|
|
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
|
Posted: Fri Apr 08, 2005 11:11 am Post subject: Re: DCOM Client not running on Server |
|
|
| 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 |
|
 |
|
|
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
|
|