MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / ~OutputHandler

Method ~OutputHandler

cppcryptfs/ui/MountPropertyPage.cpp:1205–1225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203}
1204
1205OutputHandler::~OutputHandler()
1206{
1207 if (have_pipe()) {
1208 if (m_output_str.length() > 0)
1209 WriteToNamedPipe(m_hPipe, m_output_str);
1210 else
1211 WriteToNamedPipe(m_hPipe, wstring(CMD_PIPE_SUCCESS_STR));
1212 FlushFileBuffers(m_hPipe);
1213 DisconnectNamedPipe(m_hPipe);
1214 CloseHandle(m_hPipe);
1215 } else if (!m_have_console) {
1216 if (m_output_str.length() >= CMD_PIPE_RESPONSE_LENGTH) {
1217 bool success = wcsncmp(m_output_str.c_str(), CMD_PIPE_SUCCESS_STR, CMD_PIPE_RESPONSE_LENGTH) == 0;
1218 ::MessageBox(NULL, m_output_str.c_str() + CMD_PIPE_RESPONSE_LENGTH,
1219 L"cppcryptfs", MB_OK | (success ? 0 : MB_ICONERROR));
1220 }
1221 }
1222
1223 if (m_have_console)
1224 CloseConsole();
1225}
1226int OutputHandler::print(int type, const wchar_t* fmt, ...)
1227{
1228 int ret = 0;

Callers

nothing calls this directly

Calls 2

WriteToNamedPipeFunction · 0.85
CloseConsoleFunction · 0.85

Tested by

no test coverage detected