【发布时间】:2011-09-10 20:57:36
【问题描述】:
我真的不明白为什么这个功能不起作用:
function GetNomRepertoireTemporaire:WideString;
var
PathLocal : array[0..MAX_PATH+1] of WideChar;
begin
Result := '';
if GetTempPath(SizeOf(PathLocal)-1, PathLocal)>0 then
begin
Result := PathLocal;
end;
end;
当我这样称呼它时:
var
t : wideString;
initialization
t := GetNomRepertoireTemporaire;
我等待大约 10 秒,然后我收到一个 AV at 0x000000 address 0000000
谁能解释我做错了什么?
【问题讨论】:
-
看看 Delphi 给你的警告。你能列出来吗?
-
为什么是宽字符串和宽字符?为什么不用字符串和字符?
标签: delphi