CreateProcessAsUser icon indicating copy to clipboard operation
CreateProcessAsUser copied to clipboard

Fix order of ImpersonationLevel and TokenType in DuplicateTokenEx

Open Itja opened this issue 1 year ago • 1 comments

Thanks for the great library.

The order of these two ints is wrong. This is just a minor inconvenience, as the calls have them in the correct order.

Itja avatar Feb 10 '24 16:02 Itja

Okay, I am now having trouble getting DuplicateTokenEx to work for me when trying to duplicate the token for the current process, which made me look into the MS documentation again:

  • Here, the ImpersonationLevel comes before the TokenType.
  • In the example code in point 5 here, ImpersonationLevel comes after the TokenType.

Color me confused.

Itja avatar Feb 12 '24 12:02 Itja

I'm under the impression that this change is not needed. If someone has better evidence to the contrary, we can reopen.

murrayju avatar Aug 20 '24 21:08 murrayju