有以下一样Delphi的代码:
var
      ary_byt1: array [0..51200] of byte;
      int_bufsize,int_i:integer;
      str_out:string;
      f_iofile:textfile;
begin
    int_bufsize:=getfonthex('保税', '宋体', 0, 150, 20, 20, 0,ary_byt1);  //汉字存入ary_byt1缓存中 ,黑体,旋转角度0,字体5mm,x座标20,y座标20,字形0
    for int_i:=0 to int_bufsize-1 do
    begin
         str_out:=str_out+chr(ary_byt1[int_i]);                       //ary_byt1l转换为字符串
    end;
    assignfile(f_iofile,'C:\test.txt');               //定义端口
    //assignfile(f_iofile,'lpt1');               //定义端口
    rewrite(f_iofile);
    writeln(f_iofile,str_out);                //写(DLL示例)到缓存
    closefile(f_iofile);我在VB中的代码:
    Dim cbuf(51200) As Byte
    Dim str As String
    Dim z As Integer
    nCount = getfonthex("保税", "宋体", 0, 150, 20, 20, 0, cbuf(nCount))
    For z = 0 To nCount - 1
        str = str & Chr(cbuf(z))
    Next z
为什么VB中的str变量与Delphi中的str_out变量得到的结果不相同呢?
请各位高手指点一下,谢谢!