终于查到了,给分先。
ShellExecute(GetDesktopWindow, 'open', 'rundll32.exe',
PChar('shell32.dll, OpenAs_RunDLL' + ' c:\haha.www'),
nil, SW_SHOWNORMAL);
ShellExecute(GetDesktopWindow, 'open', 'rundll32.exe',
PChar('shell32.dll, OpenAs_RunDLL' + ' c:\haha.www'),
nil, SW_SHOWNORMAL);
运行后,提升:
shell32.dll出错
项目丢失
我是加空格了,直接copy过去的,然后在c:下建一个haha.www
确实出错,你在别的机器上试了吗?
而我不在文件名前加空格才会提示跟你一样的错误。
我是用的win2000Adv Server+delphi6
http://www.tiandigo.net/program/delphi/tips/openasdlg.html其他人试试看有没有问题,反正我这里是可以实现的.
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(GetDesktopWindow, 'open', 'rundll32',
PChar('shell32.dll, OpenAs_RunDLL'),nil,SW_SHOWNORMAL);
end;
ShellExecute(GetDesktopWindow, 'open', 'rundll32.exe',
PChar(' shell32.dll,OpenAs_RunDLL ' + 'c:\1.lst'),
nil,SW_SHOWNORMAL);
可以实现!
openas_rundll之前不能有空格1
c:\windows\rundll32.exe shell32.dll,OpenAs_RunDLL c:\1.lst
to kevin_gao:是他抢走你一半的分,呵呵