Home > Net >  C code used in the __stdcall, used in C # how to replace?
C code used in the __stdcall, used in C # how to replace?

Time:09-27

, ladies and gentlemen, friends, I recently in reconstructing a project code, need to convert the original C code. Use on.net platform,
Before C code in the function definition, use the __stdcall key to select the function calling convention, is there a the contract way in C #? If yes, how do you use? Thank you all the friends to help!

CodePudding user response:

C # don't specify CallConvention,

Only when the c # to call native DLL, to specify the calling convention:
[DllImport (" user32. DLL, "CallingConvention=CallingConvention. StdCall )]
  •  Tags:  
  • C#
  • Related