This still does not answer the question: If OpenTread() fails something and then we fall back to OpenProcess, why not just call OpenProcess from the beginning ? Why bother with trying for OpenThread() ?

I think that the answer to the above question should be merged with the fixme comment.