I have a Delphi code-first server that serves some C#.NET clients (Xamarin). I’d like to generate an Intf file whenever I make changes to the server. Ideally this could be performed in the post build event.
Currently I use a batch file that calls rodl2code with URL to generate c# Intf file, however there are two issues:
the server must be running
I have to use RO…HTTPServer, but I use supertcp to communicate with server in production
Maybe I’m missing something. I was used to autogenerated Intf files since all my servers was RODL-based and clients were Delphi only.
I have followed your advice to add a command line switch to my service that allows me to generate Intf files using TROCodegen4 class. All was going well until I discovered that it internally uses 32-bit Codegen4Wrapper in-proc COM server. The problem is that my service is 64-bit, so the code generation fails (Class not registered) and I don’t want to maintain Win32 target just for this purpose. I’m not a COM wizard, so the question is whether it is possible to load 32-bit COM server into 64-bit app (maybe as an out-of-proc server)?
Otherwise I will just execute rodl2code.exe from within my service when the command line option for generating Intf is present.