1.String转化成PChar
var str: string; pStr:PChar; ... pStr := PChar(str); PChar := PChar(string);
2.PChar转String
var pStr:PChar; str:string; ... str := strPas(pStr); string := strPas(PChar);
delphi PChar与String互转
原文:https://www.cnblogs.com/blogpro/p/11339022.html