用C++写的DLL有个函数是这样的:void __cdecl Test(const char *str1) {
  //输出到文件   
  FILE *fp = fopen("c:/1.log", "a+");
  if (fp) {
           fprintf(fp, "str1:%s \r\n", str1);
  fprintf(fp, "str1len:%d \r\n", strlen(str1));
  fclose(fp);
  }
}delphi中:
procedure Test(const str1: PChar); cdecl;调用:
var
  Str1: array[0..3] of Char;
begin
  StrPCopy(Str1, 'abc');
  Test(Str1);
  //Test('abc');
  //Test(PChar('abc'));
end;输出结果是:
str1:a
str1len:1是哪里出了问题?好像调windows Api时没这问题