The code below fails to start documents. I get error 193 (%1 is not a valid Win32 app). Starting executables work fine. The files are properly associated, they start the cor
The most likely explanations for that error are:
CreateProcess requires you to provide an executable file. If you wish to be able to open any file with its associated application then you need ShellExecute rather than CreateProcess.Reading down to the bottom of the code, I can see that the problem is number 1.