✅ ✅ Vararg P/Invoke (x86) throws BadImageFormatException (0x80131124 "Index not found")
I am attempting to perform vararg P/Invokes following signatures I see on pinvoke.net and, e.g., https://stackoverflow.com/questions/2124490/what-is-the-proper-pinvoke-signature-for-a-function-that-takes-var-args
This led me to the following P/Invokes:
invoked as such:
specifically for
using .NET 7.
But they result in a
For posterity, the working P/Invokes are declared as:
Any idea as to what I could be doing wrong? Or is this plain unsupported?
This led me to the following P/Invokes:
invoked as such:
specifically for
using .NET 7.
But they result in a
BadImageFormatException with result 0x80131124, "Index not found." See image. I do not have problems issuing P/Invokes to, e.g. _vscprintf and vsprintf which take va_list instead of varargs as the final argument.For posterity, the working P/Invokes are declared as:
Any idea as to what I could be doing wrong? Or is this plain unsupported?
