Freigeben über


StructLayoutAttribute.CharSet-Feld

 

Veröffentlicht: Oktober 2016

Gibt an, ob Zeichenfolgendatenfelder in der Klasse standardmäßig als LPWSTR oder als LPSTR gemarshallt werden müssen.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

Syntax

public CharSet CharSet
public:
CharSet CharSet
val mutable CharSet : CharSet
Public CharSet As CharSet

Feldwert

Type: System.Runtime.InteropServices.CharSet

Hinweise

If the CharSet field is set to F:System.Runtime.InteropServices.CharSet.Unicode, all string arguments are converted to Unicode characters (LPWSTR) before they are passed to the unmanaged implementation. If the field is set to F:System.Runtime.InteropServices.CharSet.Ansi, the strings are converted to ANSI strings (LPSTR). If the CharSet field is set to F:System.Runtime.InteropServices.CharSet.Auto, the conversion is platform-dependent (ANSI on Windows 98 and Windows Me, and Unicode on later versions).

Versionsinformationen

Universelle Windows-Plattform
Verfügbar seit 8
.NET Framework
Verfügbar seit 1.1
Portierbare Klassenbibliothek
Unterstützt in: portierbare .NET-Plattformen
Silverlight
Verfügbar seit 2.0
Windows Phone Silverlight
Verfügbar seit 7.0
Windows Phone
Verfügbar seit 8.1

Siehe auch

CharSet
StructLayoutAttribute-Klasse
System.Runtime.InteropServices-Namespace

Zurück zum Anfang