| 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; |