Index: src/shared/Communication.cpp |
=================================================================== |
--- a/src/shared/Communication.cpp |
+++ b/src/shared/Communication.cpp |
@@ -130,3 +130,8 @@ |
if (!WriteFile(pipe, data.c_str(), data.length(), &bytesWritten, 0)) |
throw std::runtime_error("Failed to write to pipe"); |
} |
+ |
+bool Communication::PipeExists(const std::wstring& name) |
+{ |
+ return WaitNamedPipe(name.c_str(), 100) || GetLastError() == ERROR_SEM_TIMEOUT; |
+} |