I'm working on a graphical interface written in VB6, where I have to call function contained in a certain DLL written in C. Because of a known limitation I had to implement a trick that allows me to load this DLL in a implicit way.
This is possible creating an IDL file, compile it with MIDL and reference the resulting .tlb file in the VB6 project.
The problem is that VB6 strings and C arrays of char do not match, so I can't pass (and get back) them to the DLL.
The prototype of the C function is:
int __stdcall myFunc(char filename_in[], char filename_out[], char ErrMsg[]);
What should I write in the IDL file and how should I call it from VB6?
Thanks.