我想将文件从 selflocation 复制到另一个位置,如下所示:
var
NewFile : WideString;
MyOwnLocation : WideString;
begin
NewFile := 'C:\mycopy.exe';
// CopyFileW (PWideChar(paramstr(0)), PWideChar(NewFile), false); // ===> doesn't work
MyOwnLocation := paramstr(0);
CopyFileW (PWideChar(MyOwnLocation), PWideChar(NewFile), false); // ===> works but not sure if Unicode supported...
end;
当我将 paramstr(0) 复制到 WideString 时它可以工作,但我仍然不确定 paramstr(0) 是否已经是 UNICODE。是否有一个 WindowsAPI 可以在宽字符串中返回我的文件的当前位置?
感谢帮助 :)