| 24 | |
| 25 | |
| 26 | void writeBlankFrame(PVOID dest) { |
| 27 | HOOKSGRABBER_SHARED_MEM_DESC lmemDesc; |
| 28 | memcpy(&lmemDesc, &gIpcContext->m_memDesc, sizeof (lmemDesc)); |
| 29 | lmemDesc.frameId = HOOKSGRABBER_BLANK_FRAME_ID; |
| 30 | lmemDesc.width = lmemDesc.height = lmemDesc.rowPitch = 0; |
| 31 | DWORD errorcode; |
| 32 | if (WAIT_OBJECT_0 == (errorcode = WaitForSingleObject(gIpcContext->m_hMutex, 0))) { |
| 33 | memcpy(dest, &lmemDesc, sizeof (lmemDesc)); |
| 34 | ReleaseMutex(gIpcContext->m_hMutex); |
| 35 | } else { |
| 36 | gLog->reportLogError(L"couldn't wait mutex while writing blank frame. errocode = 0x%x", errorcode); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | WCHAR *getEventSourceName(char *executableName) { |
| 41 | LPWSTR wstrResult = (LPWSTR)malloc(MAX_PATH*2); |
no test coverage detected