Hi,
I'm trying to find my feet with C# and have hit a bit of a wall.
I have lots of legacy code in a DLL written in Delphi. I don't think
the fact that it's written in Delphi should cause too much of a
problem since the code is just simple Pascal that does arithmetic and
string manipulations, and all "strings" in the structures passed to
and from the DLL are actually arrays of char.
I want to retain the DLL for use in existing applications, but also
make of it in C# applications. The routines need to be available and
maintainable for several applications, including legacy ones.
Anyway...
As a proof of concept, I want to be able to pass what should, to my
mind, be a simple structure (data to be processed) to the DLL and
return a simple structure (results) back to the calling C#
application. (I'm using the word "structure" to avoid being too
specific; I'm not even sure if I should use a struct or a class.)
I've spent ages trawling through newsgroups and tries all sorts of
examples of code but nothing seems to quite work. There are many
messages on this subject with lots of no-doubt useful advice, but I
think the advice will make more sense to me if I have a working
example to play with.
So, does anyone have a mickey-mouse example of passing and returning
"structures" (in my ill-defined sense) from a C# application to a
non-.NET DLL.
Thanks.
Gary Jones
(Please send any replies here rather than by email.)