>"Generic thunks allow a 16-bit Windows-based application to load and call a Win32-based DLL."
>Does this mean that I can put the code of 16-bit Windows-based application (which is the case of the program written in BASIC I have here) inside a DLL and call it from my C++ code?
No, it means the exact opposite: You can call 32-bit code (like your C++ program) from 16-bit code (like the QuickBasic program). Except for the fact that QuickBasic, and the executables it generates, are DOS-based, not Windows based, and I believe that would make the use of Generic Thunks extrememly difficult.
>Because that's what I did with a test code
No, your test code was compiled in FreeBasic which means it was an ordinary 32-bit application.
>That are also the SHARED statements being used inside a SUB,
QB64 might support that; if not it can be worked around fairly easily.
>functions like MKSMBF$ (commonly used in the code),
This is strongly related to OPEN, FIELD and the file formats, and could be eliminated if you reworked the file handling code.
>the USING clause being used not as the first argument of PRINT.
QB64 might support this by now.
>The results of the calculations done by the program in BASIC that is relevant to us are all saved in archives of formats we don't understand, as .DCC, .MCC and .PRF (I think they are patterns stablished by the people who developed the program and is not something widely known).
But at least you have the source code! Again, I suggest you rework the file handling code - maybe even in C++. I can help you with FIELD and MKSMBF$ and all that stuff.
The random-access section of this chapter of Winer's book talks a good deal about FIELD: