I have an old c++ librrary and all of methods exports with pascal calling convention, As i know c# marshaller does not support pascal calling convention, Can i use stdcall on c# side and pass parameters in reverse order?
Asked
Active
Viewed 135 times
1 Answers
5
pascal
was a 16-bit calling convention, in 32-bit code it was replaced by __stdcall
. The identifier was retained for source compatibility. CallingConvention.StdCall is the default for pinvoke so nothing special needed.
You can find out more about DllImport.CallingConvention in this post, it mentions pascal.

Hans Passant
- 922,412
- 146
- 1,693
- 2,536