Although it's posible to export C++ functions from a DLL, I want to avoid doing so because it doesn't have the well defined application binary interface that C does. Which is why I'm using .C files as pointed by amleto.
Please note that the source code doesn't contain any QObjects so no event loop needed.
You're absolutely right, all stones should be turned. I compiled the Qt source in debug mode but still no success.
I had a closer look to the dependency walker. The VC6 (VC6DLL4VBA.dll) has a size of 201KB where the Qt (QTDLL4VBA.dll) only has a size of 19KB. Both in debug mode. The significant size difference made me look closer to dependency walker and at first sight, both of the libraries depend on KERNEL32 and USER32, but Qt depends on a third library that VC6 doesn't - the Microsoft C run time library (MSVCRT.DLL). I don't know why it's included in the Qt dll and not in the VC6?
But more interesting, it seem like the KERNEL32 include from the VC6 dll contain way more functions than the Qt dll that only contains two? WTF!?? Why am I only including a fraction of the KERNEL32? Seems like I'm opening a wormbox!
Any ideas to progress from here?
Bookmarks