Resolved ShellExecuteW()
- Advice
- Miguel Leeuwe
- PowerBuilder
- Thursday, 2 February 2023 05:12 PM UTC
Hi all,
Now that hyperlinktourl() has been sort of deprecated, I changed my calls to use the ShellExecuteW() API.
I've learned something new, that might serve others. I was trying to open an image file and it failed returning 31. The problem was that for all of my ShellExecute calls, I was using 'Open' as the second parameter. This does NOT work always, for example when trying to open an image file, with an associated default application of MS Paint. In that case you have to replace 'Open' with 'Edit'.
Passing in a NULL value should also do the trick (told by Google, but not confirmed by everyone. I tried it, and also worked).
Hope it serves someone.
regards.
MiguelL
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.