Board index » delphi » How to auto-register DCOM object on client machine

How to auto-register DCOM object on client machine

Currently I have DCOM server exe (D5u1) that runs on separate machine.
Currently what I do to register it on client machine is:
1. Copy server exe on client machine
2. Run server exe on client machine
3. Go into DCOMCNFG on client machine and specify on which computer DCOM
object is to be run.

This is way to much manual work. Can somebody tell me how to program Client
(Delphi3) that it would automatically register server (to be run on other
machine)
a) having server exe
b) not having server exe?

Note: I am using early binding.

Vygintas

 

Re:How to auto-register DCOM object on client machine


There isn't a simple way to do this automagically. :-)
You have to create some mechanism to upload and register the file (you only
need the tlb file registered on the client) by yourself.
Now, this can be done in a zillion ways, so depends on you. Be aware of the
fact that there's an API (if I remember correctly) called RegisterTypeLib.
There's also a wrapper in the delphi units

Re:How to auto-register DCOM object on client machine


For early-binding, you only need the TLB registered on the client machine.
Then use the CoClass.CreateRemote() method to create your DCOM components -
this way, you don't have to DCOMCNFG the client machines.

have fun
--
Binh Ly
http://www.techvanguards.com

Quote
"Vygintas Balzekas" <vygin...@pmt.lt> wrote in message

news:8ubr5a$9ea6@bornews.inprise.com...
Quote
> Currently I have DCOM server exe (D5u1) that runs on separate machine.
> Currently what I do to register it on client machine is:
> 1. Copy server exe on client machine
> 2. Run server exe on client machine
> 3. Go into DCOMCNFG on client machine and specify on which computer DCOM
> object is to be run.

> This is way to much manual work. Can somebody tell me how to program
Client
> (Delphi3) that it would automatically register server (to be run on other
> machine)
> a) having server exe
> b) not having server exe?

> Note: I am using early binding.

> Vygintas

Re:How to auto-register DCOM object on client machine


Take a look at the TLB pascal file. You can put the computer name in the
CreateRemote(const MachineName: string) command.

Martijn Houtman

Quote
"Vygintas Balzekas" <vygin...@pmt.lt> wrote in message

news:8ubr5a$9ea6@bornews.inprise.com...
Quote
> Currently I have DCOM server exe (D5u1) that runs on separate machine.
> Currently what I do to register it on client machine is:
> 1. Copy server exe on client machine
> 2. Run server exe on client machine
> 3. Go into DCOMCNFG on client machine and specify on which computer DCOM
> object is to be run.

> This is way to much manual work. Can somebody tell me how to program
Client
> (Delphi3) that it would automatically register server (to be run on other
> machine)
> a) having server exe
> b) not having server exe?

> Note: I am using early binding.

> Vygintas

Other Threads