【发布时间】:2012-04-14 07:40:07
【问题描述】:
给定句柄(此处为hStdOut)到标准输出设备,我使用以下2个过程从控制台应用程序写入任意字符串:
摘录:
procedure Send(const s: string);
var
len: cardinal;
begin
len:=Length(s);
WriteFile(hStdOut,s[1],len,len,nil);
end;
procedure SendLn(const s: string);
begin
Send(s + #13#10);
end;
我的麻烦:
这个语句没有像我预期的那样正确呈现字符串:
SendLn('The harder they come...');
我的问题:
是否存在WriteFile 的“WideString”重载,或者我是否应该考虑使用另一个可识别 Unicode 的函数来访问控制台屏幕缓冲区?
【问题讨论】:
标签: delphi winapi delphi-xe windows-console