我是在做一个在线更新的程序:大致如下:
FileList: string; //用来存放文件列表,每个文件之前用空格相间if FileList <> '' then
begin
if MessageDlg('更新程序要退出当前程序,确定吗?', mtConfirmation,
[mbYes, mbNo], 0) = mrYes then
begin
PostMessage(Application.Handle, WM_CLOSE, 0, 0);
ShellExecute(0, 'Open', 'Update.exe', PChar(FileList), '', SW_SHOW);
end;但是执行以后总是弹出一个异常框:地址访问错,但是如果将lpParamerters赋nil则不会,搞不懂,急用,谢谢
FileList: string; //用来存放文件列表,每个文件之前用空格相间if FileList <> '' then
begin
if MessageDlg('更新程序要退出当前程序,确定吗?', mtConfirmation,
[mbYes, mbNo], 0) = mrYes then
begin
PostMessage(Application.Handle, WM_CLOSE, 0, 0);
ShellExecute(0, 'Open', 'Update.exe', PChar(FileList), '', SW_SHOW);
end;但是执行以后总是弹出一个异常框:地址访问错,但是如果将lpParamerters赋nil则不会,搞不懂,急用,谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货