MCPcopy Create free account
hub / github.com/ElyDotDev/windows-kill / closeProcessToken

Method closeProcessToken

windows-kill-library/remote-process.cpp:57–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 void RemoteProcess::closeProcessToken(void) {
58 if (this->process_token != NULL) {
59 if (!CloseHandle(this->process_token)) {
60 throw system_error(error_code(GetLastError(), system_category()), "remote-process:closeProcessToken");
61 }
62 this->process_token = (HANDLE)NULL;
63 }
64 }
65
66 bool RemoteProcess::setPrivilege(bool enable_privilege) {
67 TOKEN_PRIVILEGES tp;

Callers 1

openMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected