win32: don't get the COM interface pointers directly
We can't really use an interface** where a void** is expected, that's a cast/aliasing violation, even though that's what Windows and mingw64 API's do as well.
We use an interim void* variable that receives the pointer and then set it on the proper variable with the given type.
Fixes #26083
Because MS and mingw64 are casting typed pointers to void**
there's still a chance that's it's a requirement for Windows compilers to make it a legal/safe call.