L littlefish Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-24 #1 我要从注册表中读一个值,是string型的,要把它作为一个参数却是pchar型的,怎么转换?
硕 硕鼠 Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-24 #4 function strtopchar(str:string)char; var pchar; begin p:=AllocMem(Length(str)+1); strpcopy(p,str); result:=p; end;
function strtopchar(str:string)char; var pchar; begin p:=AllocMem(Length(str)+1); strpcopy(p,str); result:=p; end;