Board index » delphi » !!! COM -> DCOM !!! - Implementing a COM Server as a DCOM Server

!!! COM -> DCOM !!! - Implementing a COM Server as a DCOM Server

I am trying to place a COM Server on an NT40 box and have the client
access it from a Windows 95 workstation.

Currently, I have a simple client application that accesses a simple COM

server.  The Registry entries for the COM Server are:

HKEY_CLASSES_ROOT
  CLSID
    {0AA17140-310E-11D0-A45E-444553540000} = 'Using Delphi 3 IMalloc
Example'
      InProcServer32 = <DLL path>
      ProgID = MSERVER.IMalloc
HKEY_CLASSES_ROOT
  MSERVER.IMalloc = ' Using Delphi 3 IMalloc Example'
    CLSID = {0AA17140-310E-11D0-A45E-444553540000}

There is only one interface implemented in the COM Server.  The object
decends from TComObject and IMalloc.

If I register the COM Server on the Win95 workstation, then the client
(on the same machine) accesses it correctly.

However, I am unable to place the COM Server on the NT40 box and access
it from the Win95 workstation.  (It is accessable if I also run the
client on the NT box.)

I have installed DCOM for Win95 v1.1 on the workstation and have tried
both shared-level and user-level access.

How does the COM Server's registration on the Win95 workstation need to
be altered to point to the NT box?  Are there specific transport
protocols that need to be installed to enable DCOM to function (ie:
NetBEUI)?

 

Re:!!! COM -> DCOM !!! - Implementing a COM Server as a DCOM Server


James LeMmon p?e ve zprv <34C6B5BF.17001...@Galton.com>

Quote
>I am trying to place a COM Server on an NT40 box and have the client
>access it from a Windows 95 workstation.

>There is only one interface implemented in the COM Server.  The object
>decends from TComObject and IMalloc.

Generaly:
Only OLE Automation servers can be remoted.

Some details:
1.) Your object must be derrived from TAutoObject
2.) You must create a Type Library with your interface & class definition
3.) You can use only OLE Automation comaptible datatypes in your interfaces
4.) Server must be registered od both machines (excatly, only a typelib is
necessary on client machine)
5.) Use CreateRemote CoClass call or set server machine in DCOMCNFG.

Enjoy!

begin 666 Pavel Cisar.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D-I<V%R.U!A=F5L#0I&3CI0
M879E;"!#:7-A<@T*3U)'.D%+5$E3(&$N<RX-"D%$4CM73U)+.CL[3F$@5F%L
M96YT:6YC92 Q.U!R86AA(#4[.S$U," P,#M#>F5C:"!297!U8FQI8PT*3$%"
M14P[5T]22SM%3D-/1$E.1SU154]4140M4%))3E1!0DQ%.DYA(%9A;&5N=&EN
M8V4@,3TP1#TP05!R86AA(#4@,34P(# P/3!$/3!!0WIE8V@@4F5P=6)L:6,-
M"E523#H-"E523#IH='1P.B\O=W=W+F%K=&ES+F-Z#0I%34%)3#M04D5&.TE.
M5$523D54.G!C:7-A<D!A:W1I<RYC>@T*4D56.C$Y.3@P,3(R5# W-#8P,%H-
,"D5.1#I60T%21 T*
`
end
end

Re:!!! COM -> DCOM !!! - Implementing a COM Server as a DCOM Server


Quote
In article <6a6suc$k...@forums.borland.com>, Pavel Cisar wrote:
> Generaly:
> Only OLE Automation servers can be remoted.

This isn't true. DCOM is "COM with a longer wire". In other words, if
you can build a COM server and run/use it locally, you should be able
to remote it. The criteria you are specifying: COM compatible types and
type libraries - make it easier for you to remote the COM
interface/server.

I answered the question in activex.using. This is yet another good
example as to why cross-posting is a Bad Thing (TM).
-
Dan Miser
http://www.iinet.com/users/dmiser

Re:!!! COM -> DCOM !!! - Implementing a COM Server as a DCOM Server


Quote
Dan Miser wrote:
> In article <6a6suc$k...@forums.borland.com>, Pavel Cisar wrote:
> > Generaly:
> > Only OLE Automation servers can be remoted.

> This isn't true. DCOM is "COM with a longer wire". In other words, if
> you can build a COM server and run/use it locally, you should be able
> to remote it. The criteria you are specifying: COM compatible types
> and
> type libraries - make it easier for you to remote the COM
> interface/server.

> I answered the question in activex.using. This is yet another good
> example as to why cross-posting is a Bad Thing (TM).
> -
> Dan Miser
> http://www.iinet.com/users/dmiser

Agreed, cross-posting isn't good, but then I just discovered the
OLEAutomation discussion group.  Thanks for the pointers.

-- James

Re:!!! COM -> DCOM !!! - Implementing a COM Server as a DCOM Server


Dan Miser p?e ve zprv

Quote
>In article <6a6suc$k...@forums.borland.com>, Pavel Cisar wrote:
>> Generaly:
>> Only OLE Automation servers can be remoted.

>This isn't true. DCOM is "COM with a longer wire". In other words, if
>you can build a COM server and run/use it locally, you should be able
>to remote it. The criteria you are specifying: COM compatible types and
>type libraries - make it easier for you to remote the COM
>interface/server.

Ok,ok, your right, but is some differences between in-process and
out-of-process servers, yes ? Delphi has'nt good support for non-OLE
Automation out-of-process servers (write custom marshalling in Delphi is a
nightmare). So I can recommend OLEAutomation as only quick &easy solution
for DCOM in Delphi.

Howgh!

begin 666 Pavel Cisar.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D-I<V%R.U!A=F5L#0I&3CI0
M879E;"!#:7-A<@T*3U)'.D%+5$E3(&$N<RX-"D%$4CM73U)+.CL[3F$@5F%L
M96YT:6YC92 Q.U!R86AA(#4[.S$U," P,#M#>F5C:"!297!U8FQI8PT*3$%"
M14P[5T]22SM%3D-/1$E.1SU154]4140M4%))3E1!0DQ%.DYA(%9A;&5N=&EN
M8V4@,3TP1#TP05!R86AA(#4@,34P(# P/3!$/3!!0WIE8V@@4F5P=6)L:6,-
M"E523#H-"E523#IH='1P.B\O=W=W+F%K=&ES+F-Z#0I%34%)3#M04D5&.TE.
M5$523D54.G!C:7-A<D!A:W1I<RYC>@T*4D56.C$Y.3@P,3(S5# W-38P.%H-
,"D5.1#I60T%21 T*
`
end
end

Other Threads