I am using ShellExecute the same way given below, to open a txt file in Delphi7, it gives me access violation in module BORdbk70.dll
.
Not sure what this issue is? I have added ShellApi
in uses list.
//sAddr := 'www.google.com';
Above line does not gives any error but also not redirect to browser and
ShellExecute returns result as "5 = Windows 95 only: The operating system denied access to the specified file"
sAddr := 'c:\text\info.txt';
res := ShellExecute(Handle, nil, PChar(sAddr), nil, nil, SW_SHOW);
showmessage(inttostr(res));
ShellExecute
anyway because it doesn't report errors properly. UseShellExecuteEx
. – CenterboardShellExecute
does return since your code ignores the return value. – CenterboardShellExecuteEx
, which is a much better option anyway, somehow avoids the problem. – Centerboard