| 104 | |
| 105 | |
| 106 | void StartControl() { |
| 107 | LOG_W(LOG_INFO, L"Control: Start Thread"); |
| 108 | |
| 109 | // Reset the running flag |
| 110 | keep_running = TRUE; |
| 111 | |
| 112 | control_thread = CreateThread(NULL, 0, ServiceControlPipeThread, NULL, 0, NULL); |
| 113 | if (control_thread == NULL) { |
| 114 | DWORD error = GetLastError(); |
| 115 | LOG_W(LOG_ERROR, L"Control: Failed to create thread, error: %d", error); |
| 116 | } else { |
| 117 | LOG_W(LOG_INFO, L"Control: Thread created successfully"); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | |
| 122 | void StopControl() { |