Home > Net >  C # call C library, external components error: System. The Runtime. InteropServices. SEHException
C # call C library, external components error: System. The Runtime. InteropServices. SEHException

Time:09-16

Sorrow, I know nothing is c # small white, the demand for a library of c + +, you need to use c # to call, attempt to use c + + to call succeeded, BUT sudden using c # way, consult ever grow handsome a great god, ShiCe, thank you very much,
c + + code (calling) success

c # code (failed)

c # call error

CodePudding user response:

If you have good intention person to solve, will ask the adoption of surrender of gold

CodePudding user response:

Involved in the P/Invoke call character should pay attention to
DllImport defined CharSet, Pack etc.
The default is Ansi c + +, c # is the default Unicode
Using the default mode to corresponding is not on

CodePudding user response:

The
reference 3 floor xian_wwq response:
P/Invoke call the characters involved in attention should be paid to
DllImport defined CharSet, Pack etc.
The default is Ansi c + +, c # is the default Unicode
Using the default mode to corresponding is not on the

Thank you for your reply, Dllimport CharSet is added to the Ansi also failed to call, can you some details, thanks
  •  Tags:  
  • C#
  • Related