• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

please confirm: DLL or COM ?

As far I know, a normal DLL can not be shared between two Applications on two different Computers on a LAN. The Application on the Server is an NT-Service made in Delphi and the Client a simple VB-Application. Now I need some Interface for Communication. First I rhought of an API-Interface DLL, then I remember that this *probably* won't work, because DLLs can be used locally only. Instead I might have to implement a COM-Server in either the DLL or the NT-Service EXE itself.

Is that right ?
  • 2
  • 2
1 Solution
you would have to implement DCOM and not com.

because as far as I know, COM is local too.

I think you are taking the problem by the wrong end. If you want to connect two applications on different machine, the simpler would be to use TCPIP sockets and to implement some kind of a protocol between them.

you can see such demos in the delphi demos internet\...
or msg
or stream
or strm

the client being VB, you could make a component in delphi to implement this protocol, and transform it into an activex

regards, Marc
omsecAuthor Commented:
uhm..i was thinking about sockets, but im not really sure if i want to do it this way. As I mentioned, the EXE is a Windows NT-Service, and I don't know if there are any additional restrictions given, like no visual Forms.

The Programs have to communicate quite a lot, a COM-Server would be cool to exchange Variables and provide an API
omsecAuthor Commented:
juszt to make sure, its not possible to specify the machine-name in the DLL-Import Declaration ?

function blah(...)
  external '\\\Machine\WinNT\System32'
or something like that, right ?

If I have a COM-Server and a COM-Client (or maybe DCOM as the Case maybe) I should not have to deal with the Low-Level Network/Protocol Stuff, since Windows deals with that. All I have to do is just referring to the GUID, right ?
you give three points for your question.

I told you how I'd to it

I would run on NT a tcp-ip server on a dedicated protocol, and on th client a com home made from delphi component accepting your protocol.

I could also communicate thru a sgbd this is simple, or maybe from ado components (to investigate)

I won't loose one more minut on this question, if you don't raise your points

regards, marc

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now