Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QLocalServer with Win32 pipe
Paul S last edited by
What I'd like to achieve:
I'm trying to develop a memory pipe server which will be in Qt (QLocalServer) and client in C++ win32.
I've used an example source on QLocalSocket and QLocalServer to ensure my server is working correctly.
What I've tried:
Here is the client source for the memory pipe.
this->hPipe = 0;
hPipe = CreateFileA(this->szPipeName, GENERIC_READ | GENERIC_WRITE, NULL, NULL, OPEN_EXISTING, 0, NULL);
cout << "CreateFile. " << GetLastError() << "\n";
bool boRet = false;
bool cIPC_t::send(char *szMessage)
DWORD dwWrittenBytes = 0;
if(WriteFile(hPipe, reinterpret_cast<LPCVOID>(szMessage), strlen(szMessage)+1, &dwWrittenBytes, NULL) == 0)
cout << "send. Error " << GetLastError() << "\n";
There are no errors according the GetLastError().
The server memory pipe is called "Client2" the packet is received on my server but the message length is 0.
Thanks for reading. Would be grateful if anyone had any suggestions or tips.
ckakman last edited by
Can you also post your server code?
alpha_one_x86 last edited by
Look the catchcopy explorer plugin code, I have do that's.