On 23/05/2012 20:37, Rob McKenna wrote:
Hi Alan,

Sorry, you've picked me up on that "if (" space a number of times. Thanks for pointing it out again.

What should I be checking w.r.t. the ProcessIdToSessionId? It returns a 0 on failure so once the session id's are unequal or we've encountered an ERROR_ACCESS_DENIED we should really be good to go right?

Looking at that reminds me that I had got an && instead of an || for the session id / error check. Its a good point that if the ProcessIdToSessionId call fails for a reason outside ACCESS_DENIED, we won't know about it. I'm wondering if I should revert that now?
What you have will work but we shouldn't be comparing pSid to cSid unless both calls to ProcessIdToSessionId succeed.

-Alan.

Reply via email to