Workarounds are NOT solutions.
It's not a workaround, it's the only solution that Microsoft (who makes those functions in this way) give us. Not other suggest were given. They don't sayd "use an WIN32 ABI compliant compiler" ... they give us this solution. Other workaround for old compilers is to construct a specific function in ASSEMBLER that grab the data (I mean "reincapsulate" the original function).
None wil modify old compilers (how many ? 1, 2, 3 .....) to adhere this. It's a dead discussion.
A reflection, may be OT .... but:
my thought, and not only because it's what I do, is that you can't abandon old projects and then pick them up again with old tools thinking that they can be radically "updated".
I bring ALL the projects developed on par with the development environments, of course with different times and methods, but I bring them ALL.
If a project can't be updated for various reasons (technological or other) I will redo it at the right time, BUT ALWAYS with the new tools (even if it means changing hardware).
Of course, I have a business and therefore behind what I do there is an economic coverage. And I use Delphi, not free tools like Lazarus for which I still face costs.
Every now and then I think it is necessary to "modernize" both the applications and the "thinking".
The oldest project still managed dates back to 2001, with the porting to 64 bits in 2012 and is a mixed C++ / Pascal project.
A project that is not managed but still exists and is compilable is on a disk inside a virtual machine, and is a mixed Delphi / VB project that dates back to 1997 (but I have no intention of maintaining it, I keep it as a permanent MUSEUM)