C Program Files X86internet Download Manageridmanexe
It is unclear what you want to achieve, and why this way. Why can't you use instead? Whatsoever the motive, and approach, I suggest you to do thorough checking for failure with each function call (starting from OpenProcess). Read the documentation on what a particular function returns on failure, or success. Always use GetLastError to determine the exact reason (or any other relevant function mentioned in MSDN). Casparcg tutorial.
Copy the unlocked files ‘IDMan.exe‘ and ‘IDMGrHlp.exe‘ to installation folder (like: C: Program Files (x86) Internet Download Manager ) and overwrite Double click the reg key file (Internet Download Manager.reg) to import license info (if you always use AppNee’s unlocked files, then this step is required only once).
Are you running, or willing to run your program as a service? If not, why can't you do step-by-step debugging?