| 100 | } |
| 101 | |
| 102 | std::shared_ptr<HANDLE> w_CreateJobObject(LPSECURITY_ATTRIBUTES lpJobAttributes, LPWSTR lpName) |
| 103 | { |
| 104 | const auto hJob = RAISE_IF_HANDLE_INVALID("CreateJobObject", |
| 105 | CreateJobObject( |
| 106 | lpJobAttributes, |
| 107 | lpName) |
| 108 | ); |
| 109 | |
| 110 | if (GetLastError() == ERROR_ALREADY_EXISTS) |
| 111 | { |
| 112 | std::printf("WARNING: The job `%S` already exists\n", lpName); |
| 113 | } |
| 114 | |
| 115 | return std::shared_ptr<HANDLE>(new HANDLE(hJob), [](HANDLE* p_handle) {CloseHandle(*p_handle); }); |
| 116 | } |
| 117 | |
| 118 | void w_SetInformationJobObject(HANDLE hJob, JOBOBJECTINFOCLASS JobObjectInformationClass, LPVOID lpJobObjectInformation, DWORD cbJobObjectInformationLength) |
| 119 | { |
no test coverage detected