Those 2 dll's are the interface to COM. Both are generated in the background when ActiveX control is dropped on the Form to make it easy instead of running command line tool. If it works now it means that your program had references to wrong API version that was not the one currently installed on the machine.
Thanks for the note. I think I've now figured out the root cause - it's all about incompatibility between different IB TWS OCX versions. What I did now was to run aximp.exe on tws.ocx residing on the server, and transfer the generated dll files back to my local machine, where they were integrated into the VS source code project. After that, the exe file along with the dll files were put in the target folder on the server - now working flawlessly!