c++ - How to get command line of windows "open with .." function? -
i asked question how windows "open with.." application list. here's a link question.
we can use shassocenumhandlers
interface file association specific file extension, ex .png
then use iassochandler , can retrieves full path , file name of executable file associated file type(.png
). ex:['paint': 'c:\\windows\\system32\\mspaint.exe', ...]
but want command line of executing mspaint.exe given image. this~ "%systemroot%\system32\mspaint.exe" "%1"
is there msdn api "open with.." command? think should have, since windows xp have ability.
use assocquerystring(..., assocstr_command, ...);
example:
tchar commandline[1024]; dword size = arraysize(commandline); assocquerystring(0, assocstr_command, _t(".txt"), 0, commandline, &size);
Comments
Post a Comment