Hi Jackek,
I went over your patch but I believe it might have few issues that i wanted to raise before we change anything
1. For some reason when you are doing the "ok" test after CreateNamedPipe you do against != NULL should != INVALID_HANDLE_VALUE
this is critical... since the 2nd server might have failed with OBJECT_NAME_ALREADY_EXISTS
2. When you create the 2nd server instance against the "ok" check is against NULL but not only that, you check against "server" and not "server2"
The reason I'm raising these issues is because from my understanding of Windows, there can be only 1 instance for a given named pipe instance,
Please see that once you change these things, my logic remains correct... and that simply server2 was never created and got INVALID_HANDLE_VALUE
with a should be GLE of 231 aka ERROR_PIPE_BUSY.
Please let me know how it goes so we will know how to continue.
Thanks and I hope you have a great weekend,
-- Jon.