| 14 | TerminateThread(ConfigThread, 0); |
| 15 | } |
| 16 | static DWORD WINAPI UpdateConfigThread(LPVOID parameter) |
| 17 | { |
| 18 | Configuration = LoadR77Config(); |
| 19 | |
| 20 | while (TRUE) |
| 21 | { |
| 22 | // Interval should not be too small, because this thread is running in every injected process. |
| 23 | Sleep(1000); |
| 24 | |
| 25 | PR77_CONFIG newConfiguration = LoadR77Config(); |
| 26 | |
| 27 | if (CompareR77Config(Configuration, newConfiguration)) |
| 28 | { |
| 29 | // Configuration hasn't changed. |
| 30 | DeleteR77Config(newConfiguration); |
| 31 | } |
| 32 | else |
| 33 | { |
| 34 | // Store configuration only if it has changed to avoid threading errors. |
| 35 | PR77_CONFIG oldConfiguration = Configuration; |
| 36 | Configuration = newConfiguration; |
| 37 | DeleteR77Config(oldConfiguration); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | return 0; |
| 42 | } |
| 43 | |
| 44 | BOOL IsProcessIdHidden(DWORD processId) |
| 45 | { |
nothing calls this directly
no test coverage detected