- Find the executable which opens files of extension 'PDF' (use FindExecutable() WInAPI function)
- Execute with ShellExecuteEx or CreateProcess (print parameters) gives you process and thread handles
- EnumThreadWindows on that process; if no parent it must be main window
- Post a WM_CLOSE to that window.
No promises, but it is worth a try to someone who "needs" to do this.
Leave a comment: