MCPcopy Create free account
hub / github.com/TeXworks/texworks / InterProcessCommunicator

Method InterProcessCommunicator

src/InterProcessCommunicatorWin.cpp:142–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142InterProcessCommunicator::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
160InterProcessCommunicator::~InterProcessCommunicator()
161{

Callers

nothing calls this directly

Calls 1

createMessageTargetMethod · 0.80

Tested by

no test coverage detected