D daileking Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-26 #1 Buffer: Pointer;中的内容显示在Memo1中,怎么办? 怎么把指针类型转换成Ansistring类型的?
完 完颜康 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-26 #2 var buf : Pointer; a: String; begin a:='akjdfakdjfakdsfjadf';//或者用其他手段给buf赋值 buf := pchar(a); Memo1.Text := strpas(buf); end;
var buf : Pointer; a: String; begin a:='akjdfakdjfakdsfjadf';//或者用其他手段给buf赋值 buf := pchar(a); Memo1.Text := strpas(buf); end;
C cb422 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-26 #3 直接用strpas函数就可以将针类型转换成Ansistring类型
C copy_paste Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-26 #4 SetString(S, P, StrLen(PChar(P))); S := PChar(P); S := StrPas(PChar(P)); SetLength(S, StrLen(PChar(P))); Move(P^, S[1], StrLen(PChar(P)));
SetString(S, P, StrLen(PChar(P))); S := PChar(P); S := StrPas(PChar(P)); SetLength(S, StrLen(PChar(P))); Move(P^, S[1], StrLen(PChar(P)));
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-26 #5 Memo1.Text := Memo1.Text + StrPas(PChar(Buffer));