Hello.
I read that this is done like this: (Excluding various checks for the absence of an instance, etc.)
char *pipename = "\\\\.\\pipe\\namedpipe"; HANDLE hPipe; hPipe = CreateNamedPipe(pipename,PIPE_ACCESS_DUPLEX,PIPE_TYPE_MESSAGE |PIPE_READMODE_MESSAGE |PIPE_WAIT,PIPE_UNLIMITED_INSTANCES,4096,4096,0,NULL);
And here, in principle, I was expecting a mistake. The first parameter is the name of the channel, which in my function pipename is listed as LPTWSTR, here is the compiler and writes:
cannot convert parameter 1 from 'const char [22]' to 'LPCWSTR'
The question of what to do, specify the name directly, not through a variable also fails.