MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / Write

Method Write

DebugView++Lib/DBWinWriter.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void DBWinWriter::Write(DWORD pid, const std::string& message)
25{
26 if (!Win32::WaitForSingleObject(m_dbWinBufferReady.get(), 10000))
27 return;
28
29 auto pData = static_cast<DbWinBuffer*>(m_dbWinView.Ptr());
30 pData->processId = pid;
31 int length = std::min<int>(message.size(), sizeof(pData->data) - 1);
32 std::copy(message.data(), message.data() + length, pData->data);
33 pData->data[length] = '\0';
34
35 Win32::SetEvent(m_dbWinDataReady);
36}
37
38} // namespace debugviewpp
39} // namespace fusion

Callers 3

TraceDiffMethod · 0.45
MonitorMethod · 0.45
ForwardMessagesFromPipeFunction · 0.45

Calls 5

WaitForSingleObjectFunction · 0.85
SetEventFunction · 0.85
dataMethod · 0.80
PtrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected