I generally assume that any handle-like data type with an H prefix in its name is not something you can synthesize out of thin air, since there is some important corresponding data hidden away somewhere else (such as in user32/kernel32.dll or inside the kernel's memory space). Sure, you can take a command line argument and convert it into a HANDLE (as in blogs.msdn.com/.../56043.aspx), but that doesn't necessarily mean you'll have a valid handle -- but it's useless unless you actually inherited that handle from your parent process.
↧