| 140 | } |
| 141 | |
| 142 | InterProcessCommunicator::InterProcessCommunicator() |
| 143 | : _private(new InterProcessCommunicatorPrivate(this)) |
| 144 | { |
| 145 | Q_D(InterProcessCommunicator); |
| 146 | d->hMutex = CreateMutexA(NULL, FALSE, TW_MUTEX_NAME); |
| 147 | if (d->hMutex == NULL) |
| 148 | return; |
| 149 | |
| 150 | if (GetLastError() == ERROR_ALREADY_EXISTS) { |
| 151 | _isFirstInstance = false; |
| 152 | CloseHandle(d->hMutex); |
| 153 | d->hMutex = NULL; |
| 154 | } |
| 155 | |
| 156 | if (_isFirstInstance) |
| 157 | d->createMessageTarget(); |
| 158 | } |
| 159 | |
| 160 | InterProcessCommunicator::~InterProcessCommunicator() |
| 161 | { |
nothing calls this directly
no test coverage detected