Thanks for looking into this issue. I have taken a look at the revised code and found that the calling convention is now correct, but there is an issue with name mangling/decoration since the functions are exported from a .CPP file. This appears to be a
feature (limitation?) of VC++ that exists to support overloading of exported functions for C++ applications. Here is what I am seeing in the exports table of the generated DLL:
After some extensive Google research and experimentation I concluded that the only means of fixing the naming issue short of moving to a .C file is to use a .DEF file for the exports. The following DEF file does the trick and can be installed by adding the
file under Properties->Linker->Input->Module Definition File. This setting should be set to "charls.def" assuming that is the name of the DEF file and that it is in placed alongside the other source files:
Very annoying behavior on the part of VC++ since this is not an uncommon requirement.