.NET Interface >

MarshalStringsAs

MarshalStringsAs
is an option to DefineDLLFunction that specifies how string arguments should be marshaled into the DLL function. This applies to any arguments that are mapped to the System.String class, which includes types specified in your declaration as , , or .
  • Possible values are:
"ANSI"strings will be sent as single-byte C-style strings (default)
"Unicode"strings will be sent as 2-byte Unicode strings
Automaticstrings will be sent in the platform's default format
  • The Automatic setting picks the platform default ( on Windows NT/2000/XP, on 98/ME). Automatic should rarely be used, as it is intended mainly for certain Windows API functions that automatically switch behaviors on different versions of Windows.
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF