Difference between PAnsiChar and PChar

后端 未结 5 858
谎友^
谎友^ 2021-02-06 12:17

Is there a difference and what type of between PAnsiChar and PChar? (in Delphi previous 2007)

Thank you, in advance!

5条回答
  •  长发绾君心
    2021-02-06 12:45

    In D2009 and later: yes, there is. PChar is a pointer to a Char which is a unicode character (a WideChar). And PAnsiChar is a pointer to a AnsiChar, which is - as the name implies - an ANSI character.

    EDIT: For pre-2009 versions of Delphi PChar and PAnsiChar are exactly the same. They both point to an (Ansi) character.

提交回复
热议问题