Link to home
Start Free TrialLog in
Avatar of teltel
teltel

asked on

ERROR_NO_ASSOCIATION returned by ShellExecuteEx() instead of popup "Choose associated app" dialog.

Hi Experts,

I'd used ShellExecuteEx() to open an user selected file, the problem is that when the file type of selected file has no associated application, I'd like my program behave exactly like how Windows does,
pops up the dialog to:
  1. Use the Web service to find the appropriated program.
  2. Select the program from a list.

Instead of poping up the dialog described above, An error dialog popup "This file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel".

GetLastError() returns ERROR_NO_ASSOCIATION.
SHELLEXECUTEINFO::lpVerb = "open";
SHELLEXECUTEINFO::fMask isn't set
I'd also tried flags "SEE_MASK_NOCLOSEPROCESS" and "SEE_MASK_NO_CONSOLE";

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial