A vendor of mine has a Delphi-based system to which I must integrate a simple application. My application is developed in C, so the simplest way would be to modify the application so that it becomes a DLL, which would export a function that could be used from Delphi.
My application needs one string as input, and it outputs another string. I need to know the following:
1. How to build the DLL (in C) so that it can pass strings to/from Delphi? Can I use normal NULL-terminated strings as follows:
void _cdecl ExternalFunction(char *InputString, char *OutputString);
2. Given this DLL, how can I call it from Delphi? Please provide specific lines of code (including declaration and the actual call), because I don't know Delphi at all.