views:

469

answers:

4

Hi,

Is it possible (and feasible) to use .NET Remoting interface with Delphi win32 application?

I need communication between .NET application and Delphi win32 application, so .NET remoting would be native for other end of the pipe.

Any other solutions, as close to native as possible, for both ends without 3rd party libraries? Applications will be running each on a separate Windows machine.

+2  A: 

Both Delphi win23 and .Net have good support for COM objects. It's an option worth checking out.

Stijn Sanders
I've impression that dealing with COM and DCOM might be a bit messy, is it really worth it?
Harriv
Ouch, please don't confuse COM with DCOM! (and ActiveX) Yes, DCOM might look a little messy, COM+ was proposed to solve some of it's aches. But COM alone, that is limited to basic use of type libraries and IUnknown inheritants, is quite clean and fast. Especially if you look at it as a 'relatively safe' way to pre-define, share and consume DLL exports.
Stijn Sanders
OK, but then "pure" COM isn't helpful when we are talking about communication between computers?
Harriv
You got me there. Still, if you get a mixed win32-dotnet solution working with COM on a single computer (as cleanly as possible), you'll find adding the COM library to a COM+ applications and using an application proxy is a pretty clean remote setup. (In my humble opinion)
Stijn Sanders
+2  A: 

Using remoting from a non-.NET Delphi exe would be very painful. If the .NET app isn't known to be running, then COM interop would be the easiest answer, since there are processes for COM activation etc. The fact that there are different machines complicates things, but DCOM exists and works (I haven't tested it with .NET and Delphi endpoints, though).

If the .NET app is known to be running (perhaps as a service), you could consider a range of alternatives:

  • sockets
  • http (perhaps POX over http, using HttpListener at the .NET server)
  • SOAP (perhaps using WCF via ServiceHost at the .NET end)
  • file based (network share, presumably)
Marc Gravell
Both apps should be running always, so that's not the problem. Is file based interprocess communication really a good option?
Harriv
Well, it is *an* option - but it may have more issues than things like http, especially surrounding permissions (and don't even try it through a firewall...)
Marc Gravell
+8  A: 

Because they are running on different machines, you should use a network communication. SOAP is a general communication format, which can be easely made for both .Net and Delphi win32. But SOAP = XML = slow.

For my company we use the RemObjects SDK remoting framework: http://www.remobjectssdk.com/

Very easy to make an interface, generate code for .Net/Delphi/Php/c++/whatever, also supports SOAP but we use the binary format for speed (!).

André
Actually we have used RemObjects on the Delphi end, so that's of course one option. But RO is third party option in both worlds, so it adds some (unneeded?) complexity to the system.
Harriv
Word about speed, it's not an issue in this case.
Harriv
A: 

You can also see Crosstalk

Hugues Van Landeghem
No I can't: "CrossTalk is not ready for testing."
Harriv