Microsoft KB Archive/327117

= PRB: Using CharSet.None Has the Same Effect as CharSet.Ansi in DllImport =

Article ID: 327117

Article Last Modified on 10/28/2002

-

APPLIES TO


 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition

-



This article was previously published under Q327117



SYMPTOMS
Two different CharSet property values have the same effect, as described in the following:
 * If you declare a function in C# or in C++, the default CharSet property of the DllImport attribute is CharSet.None.
 * If you declare a function in Microsoft Visual Basic .NET, the default CharSet property is CharSet.Ansi.



CAUSE
This behavior occurs because CharSet.None and CharSet.Ansi are equivalent and are designed to have the same effect.



STATUS
This behavior is by design.

Keywords: kbnofix kbprb kbcominterop KB327117

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.