Attribute 'System.Runtime.InteropServices.DefaultCharSetAttribute' is not supported in this version
The System.Runtime.InteropServices.DefaultCharSetAttribute attribute allows you to specify the character set to be used in marshalled strings. Its value takes a member of the System.Runtime.InteropServices.CharSet enumeration.
The current version of Visual Basic does not support this attribute. Support is possible in future versions.
Error ID: BC32510
To correct this error
Use each Declare Statement to specify the character set for the external procedure it is declaring. The following example illustrates this.
Ansi Declare Function GetUserName Lib "advapi32.dll" _ (ByVal lpBuffer As String, ByRef nSize As Integer) As Integer Unicode Declare Sub externalProc Lib "projectlib.dll" _ (ByVal arg As Double)
If you do not specify the character set in the
Declare
statement, it defaults to ANSI.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for