Set the token for the thread (impersonation). Setting the token to None revert the impersonation
(self, token)
| 543 | return token.Token(token_handle.value) |
| 544 | |
| 545 | def set_token(self, token): |
| 546 | """Set the token for the thread (impersonation). Setting the token to None revert the impersonation""" |
| 547 | thandle = getattr(token, "handle", token) # Accept raw handle & token object |
| 548 | return winproxy.SetThreadToken(self.handle, thandle) |
| 549 | |
| 550 | |
| 551 | _TOKEN_PROPERTY_DOC = """The thread :class:`~windows.winobject.token.Token` |
nothing calls this directly
no outgoing calls
no test coverage detected