How to convert a String To a PChar and PChar to String (Views: 47)
Problem/Question/Abstract: How to convert a String To a PChar and PChar to String Answer: function ConvertStringToPChar(StringValue: string): PChar; var PCharString: array[0..255] of Char; begin Result := StrPCopy(PCharString, StringValue); end; function ConvertPCharToString(PCharValue: PChar): string; begin Result := StrPas(PCharValue); end; |