Hi all!

Because nobody answered my question I'll do it because meanwhile
I know the answer (Perhaps later some other user has the same
problem)

1.) It seems DCOM only works if all computers are in the same
     domain. (I'm not quite sure here)

2.) You have to do the class entry at the remote machine
     by hand. For instance: If your server program is
       prog1.exe
     and the class which implements your interface is named
       kl1
     search for

        HKEY_CLASS_ROOT\prog1.kl1

     export this entry into a file and import it at the remote machine

3.) On "Component Services" board change the default security
     (the little terminal symbol).

     Add "Network" to the default launch permissions.

On Tue, 19 Jul 2005, Joerg Anders wrote:

> I'm a very newbie at this list and in Delhpi an in DCOM.
>
> I have no problem creating a simple COM example.  A iwant to use a
> very simple function:
>
>     function TClass2.Exam1(s. WideString): HResult;
>     begin
>                  Exam1:=123;
>     end;
>
> It works local as in-process-server (DLL) and as well as out-process-server.
>
>  [A simple question here: I assume I always have to use a     ]
>  [out-process-server if I want to apply the DCOM technique.(?)]
>
> But I'm totally unable to call it from a remote client via a
> real network.
>
> I simply use:
>
>    SomeInterfaceVariable := CoTClass2.CreateRemote(<someIP>);
>
> The client hangs. I assume the reason is: The server tries
> tho create a window (TForm1) at the server side. And I can
> imagine the client is not allowed to pop up some windows at the
> server side.
>
> But how to avoid the TForm1? If I try
>
>     File|New|... | COM-Server
>
> a window pops up: "first create an running project", followd by
> some instructions how to create an in-process server. But an
> in-process server (DLL) seems not to work in DCOM.
>
> If I start:
>
>    File|New|Application
>
> Delphi always creates the TForm1. This seems to be the reason
> for the crash at server side (see above).
>
> If I try:
>
>    File|New|...| Console Application
>
> and then:
>
>    File|New|...|COM Server
>
> I can compile the server. But it crashes immediately after
> launching the server.
>
>
>  Any suggestions? Or can anybody point me to a simple tested
>  DCOM (not COM) example ?
>
>       Thank you in advance
>
> -- 
> J.Anders, GERMANY, TU Chemnitz, Fakultaet fuer Informatik
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
>

-- 
J.Anders, GERMANY, TU Chemnitz, Fakultaet fuer Informatik
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to