We are on the verge of writing a C# web service that will expose functionality contained in a native Delphi GUI app. Why would I choose to wrap the Delphi code in a native dll and why would I want to wrap it in a COM server? In other words: what factors do I need to consider when choosing one over the other? I am interested in factors with regard to coding, debugging, (automated) testing, deployment (installation at customers) and performance (overhead?).
COM adds some significant advantages over a plain DLL:
BSTR
), arrays and objects (via interfaces)So I would go for COM.
To use a Delphi class in .NET using a DLL you have to flatten the class on the Delphi side and rewrap it on the .NET side, which is kind of ugly.
A lot of Rudy's article on Delphi and C++ code applies to C# as well:
http://rvelthuis.de/articles/articles-cppobjs.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With