23#include <winpr/config.h>
26#include <winpr/path.h>
27#include <winpr/synch.h>
28#include <winpr/handle.h>
30#include <winpr/pipe.h>
32#ifdef WINPR_HAVE_UNISTD_H
38#include "../handle/handle.h"
43#include <sys/socket.h>
44#include <winpr/assert.h>
46#ifdef WINPR_HAVE_SYS_AIO_H
47#undef WINPR_HAVE_SYS_AIO_H
50#ifdef WINPR_HAVE_SYS_AIO_H
57#define TAG WINPR_TAG("pipe")
72static wArrayList* g_NamedPipeServerSockets =
nullptr;
79} NamedPipeServerSocketEntry;
81static BOOL PipeIsHandled(HANDLE handle)
83 return WINPR_HANDLE_IS_HANDLED(handle, HANDLE_TYPE_ANONYMOUS_PIPE, FALSE);
86static int PipeGetFd(HANDLE handle)
88 WINPR_PIPE* pipe = (WINPR_PIPE*)handle;
90 if (!PipeIsHandled(handle))
96static BOOL PipeCloseHandle(HANDLE handle)
98 WINPR_PIPE* pipe = (WINPR_PIPE*)handle;
100 if (!PipeIsHandled(handle))
112static BOOL PipeRead(PVOID Object, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
115 SSIZE_T io_status = 0;
116 WINPR_PIPE* pipe =
nullptr;
121 WLog_ERR(TAG,
"WinPR does not support the lpOverlapped parameter");
122 SetLastError(ERROR_NOT_SUPPORTED);
126 pipe = (WINPR_PIPE*)Object;
130 io_status = read(pipe->fd, lpBuffer, nNumberOfBytesToRead);
131 }
while ((io_status < 0) && (errno == EINTR));
140 SetLastError(ERROR_NO_DATA);
147 if (lpNumberOfBytesRead)
148 *lpNumberOfBytesRead = (DWORD)io_status;
153static BOOL PipeWrite(PVOID Object, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
154 LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped)
156 SSIZE_T io_status = 0;
157 WINPR_PIPE* pipe =
nullptr;
161 WLog_ERR(TAG,
"WinPR does not support the lpOverlapped parameter");
162 SetLastError(ERROR_NOT_SUPPORTED);
166 pipe = (WINPR_PIPE*)Object;
170 io_status = write(pipe->fd, lpBuffer, nNumberOfBytesToWrite);
171 }
while ((io_status < 0) && (errno == EINTR));
173 if ((io_status < 0) && (errno == EWOULDBLOCK))
176 *lpNumberOfBytesWritten = (DWORD)io_status;
203static BOOL NamedPipeIsHandled(HANDLE handle)
205 return WINPR_HANDLE_IS_HANDLED(handle, HANDLE_TYPE_NAMED_PIPE, TRUE);
208static int NamedPipeGetFd(HANDLE handle)
210 WINPR_NAMED_PIPE* pipe = (WINPR_NAMED_PIPE*)handle;
212 if (!NamedPipeIsHandled(handle))
215 if (pipe->ServerMode)
216 return pipe->serverfd;
218 return pipe->clientfd;
221static BOOL NamedPipeCloseHandle(HANDLE handle)
223 WINPR_NAMED_PIPE* pNamedPipe = (WINPR_NAMED_PIPE*)handle;
228#ifndef __clang_analyzer__
229 if (!NamedPipeIsHandled(handle))
233 if (pNamedPipe->pfnUnrefNamedPipe)
234 pNamedPipe->pfnUnrefNamedPipe(pNamedPipe);
236 free(pNamedPipe->name);
237 pNamedPipe->name =
nullptr;
238 free(pNamedPipe->lpFileName);
239 pNamedPipe->lpFileName =
nullptr;
240 free(pNamedPipe->lpFilePath);
241 pNamedPipe->lpFilePath =
nullptr;
243 if (pNamedPipe->serverfd != -1)
245 close(pNamedPipe->serverfd);
246 pNamedPipe->serverfd = -1;
249 if (pNamedPipe->clientfd != -1)
251 close(pNamedPipe->clientfd);
252 pNamedPipe->clientfd = -1;
258BOOL NamedPipeRead(PVOID Object, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
261 SSIZE_T io_status = 0;
264 WINPR_NAMED_PIPE* pipe = (WINPR_NAMED_PIPE*)Object;
266 if (!(pipe->dwFlagsAndAttributes & FILE_FLAG_OVERLAPPED))
268 if (pipe->clientfd == -1)
273 io_status = read(pipe->clientfd, lpBuffer, nNumberOfBytesToRead);
274 }
while ((io_status < 0) && (errno == EINTR));
278 SetLastError(ERROR_BROKEN_PIPE);
281 else if (io_status < 0)
288 SetLastError(ERROR_NO_DATA);
292 SetLastError(ERROR_BROKEN_PIPE);
297 if (lpNumberOfBytesRead)
298 *lpNumberOfBytesRead = (DWORD)io_status;
305 WLog_ERR(TAG,
"requires lpOverlapped != nullptr as FILE_FLAG_OVERLAPPED is set");
306 SetLastError(ERROR_NOT_SUPPORTED);
310 if (pipe->clientfd == -1)
313 pipe->lpOverlapped = lpOverlapped;
314#ifdef WINPR_HAVE_SYS_AIO_H
317 struct aiocb cb = WINPR_C_ARRAY_INIT;
319 cb.aio_fildes = pipe->clientfd;
320 cb.aio_buf = lpBuffer;
321 cb.aio_nbytes = nNumberOfBytesToRead;
322 cb.aio_offset = lpOverlapped->Offset;
323 cb.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
324 cb.aio_sigevent.sigev_signo = SIGIO;
325 cb.aio_sigevent.sigev_value.sival_ptr = (
void*)lpOverlapped;
326 InstallAioSignalHandler();
327 aio_status = aio_read(&cb);
328 WLog_DBG(TAG,
"aio_read status: %d", aio_status);
337 lpOverlapped->Internal = 0;
338 lpOverlapped->InternalHigh = (ULONG_PTR)nNumberOfBytesToRead;
339 lpOverlapped->DUMMYUNIONNAME.Pointer = (PVOID)lpBuffer;
340 (void)SetEvent(lpOverlapped->hEvent);
347BOOL NamedPipeWrite(PVOID Object, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
348 LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped)
350 SSIZE_T io_status = 0;
351 WINPR_NAMED_PIPE* pipe =
nullptr;
356 WLog_ERR(TAG,
"WinPR does not support the lpOverlapped parameter");
357 SetLastError(ERROR_NOT_SUPPORTED);
361 pipe = (WINPR_NAMED_PIPE*)Object;
363 if (!(pipe->dwFlagsAndAttributes & FILE_FLAG_OVERLAPPED))
365 if (pipe->clientfd == -1)
370 io_status = write(pipe->clientfd, lpBuffer, nNumberOfBytesToWrite);
371 }
while ((io_status < 0) && (errno == EINTR));
375 *lpNumberOfBytesWritten = 0;
389 *lpNumberOfBytesWritten = (DWORD)io_status;
398 if (pipe->clientfd == -1)
401 pipe->lpOverlapped = lpOverlapped;
402#ifdef WINPR_HAVE_SYS_AIO_H
404 struct aiocb cb = WINPR_C_ARRAY_INIT;
406 cb.aio_fildes = pipe->clientfd;
407 cb.aio_buf = (
void*)lpBuffer;
408 cb.aio_nbytes = nNumberOfBytesToWrite;
409 cb.aio_offset = lpOverlapped->Offset;
410 cb.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
411 cb.aio_sigevent.sigev_signo = SIGIO;
412 cb.aio_sigevent.sigev_value.sival_ptr = (
void*)lpOverlapped;
413 InstallAioSignalHandler();
414 io_status = aio_write(&cb);
415 WLog_DBG(
"aio_write status: %" PRIdz, io_status);
424 lpOverlapped->Internal = 1;
425 lpOverlapped->InternalHigh = (ULONG_PTR)nNumberOfBytesToWrite;
433 lpOverlapped->DUMMYUNIONNAME.Pointer = cnv.pv;
435 (void)SetEvent(lpOverlapped->hEvent);
442static HANDLE_OPS namedOps = { NamedPipeIsHandled,
443 NamedPipeCloseHandle,
464static BOOL InitWinPRPipeModule(
void)
466 if (g_NamedPipeServerSockets)
469 g_NamedPipeServerSockets = ArrayList_New(FALSE);
470 return g_NamedPipeServerSockets !=
nullptr;
476BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes,
479 int pipe_fd[] = { -1, -1 };
480 WINPR_PIPE* pReadPipe =
nullptr;
481 WINPR_PIPE* pWritePipe =
nullptr;
482 const BOOL inherit = lpPipeAttributes && lpPipeAttributes->bInheritHandle;
490#ifdef WINPR_HAVE_PIPE2
491 const int pipe2flags = inherit ? 0 : O_CLOEXEC;
492 if (pipe2(pipe_fd, pipe2flags) < 0)
494 if (pipe(pipe_fd) < 0 || !winpr_set_cloexec(pipe_fd[0], !inherit) ||
495 !winpr_set_cloexec(pipe_fd[1], !inherit))
498 WLog_ERR(TAG,
"failed to create and set cloexec pipe");
502 pReadPipe = (WINPR_PIPE*)calloc(1,
sizeof(WINPR_PIPE));
503 pWritePipe = (WINPR_PIPE*)calloc(1,
sizeof(WINPR_PIPE));
505 if (!pReadPipe || !pWritePipe)
507 WLog_ERR(TAG,
"error allocating pipes");
508 goto fail_free_pipes;
511 pReadPipe->fd = pipe_fd[0];
512 pWritePipe->fd = pipe_fd[1];
513 WINPR_HANDLE_SET_TYPE_AND_MODE(pReadPipe, HANDLE_TYPE_ANONYMOUS_PIPE, WINPR_FD_READ);
514 pReadPipe->common.ops = &ops;
515 *((ULONG_PTR*)hReadPipe) = (ULONG_PTR)pReadPipe;
516 WINPR_HANDLE_SET_TYPE_AND_MODE(pWritePipe, HANDLE_TYPE_ANONYMOUS_PIPE, WINPR_FD_READ);
517 pWritePipe->common.ops = &ops;
518 *((ULONG_PTR*)hWritePipe) = (ULONG_PTR)pWritePipe;
536HANDLE winpr_Pipe_FromFd(
int fd)
539 return INVALID_HANDLE_VALUE;
541 WINPR_PIPE* pPipe = (WINPR_PIPE*)calloc(1,
sizeof(WINPR_PIPE));
544 WLog_ERR(TAG,
"error allocating pipe");
545 return INVALID_HANDLE_VALUE;
549 WINPR_HANDLE_SET_TYPE_AND_MODE(pPipe, HANDLE_TYPE_ANONYMOUS_PIPE, WINPR_FD_READ);
550 pPipe->common.ops = &ops;
551 return &pPipe->common;
558static void winpr_unref_named_pipe(WINPR_NAMED_PIPE* pNamedPipe)
560 NamedPipeServerSocketEntry* baseSocket =
nullptr;
565 WINPR_ASSERT(pNamedPipe->name);
566 WINPR_ASSERT(g_NamedPipeServerSockets);
568 ArrayList_Lock(g_NamedPipeServerSockets);
570 for (
size_t index = 0; index < ArrayList_Count(g_NamedPipeServerSockets); index++)
573 (NamedPipeServerSocketEntry*)ArrayList_GetItem(g_NamedPipeServerSockets, index);
574 WINPR_ASSERT(baseSocket->name);
576 if (!strcmp(baseSocket->name, pNamedPipe->name))
578 WINPR_ASSERT(baseSocket->references > 0);
579 WINPR_ASSERT(baseSocket->serverfd != -1);
581 if (--baseSocket->references == 0)
585 ArrayList_Remove(g_NamedPipeServerSockets, baseSocket);
586 close(baseSocket->serverfd);
587 free(baseSocket->name);
595 ArrayList_Unlock(g_NamedPipeServerSockets);
598HANDLE CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances,
599 DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut,
600 LPSECURITY_ATTRIBUTES lpSecurityAttributes)
602 char* lpPipePath =
nullptr;
603 WINPR_NAMED_PIPE* pNamedPipe =
nullptr;
605 NamedPipeServerSocketEntry* baseSocket =
nullptr;
607 WINPR_UNUSED(lpSecurityAttributes);
609 if (dwOpenMode & FILE_FLAG_OVERLAPPED)
611 WLog_ERR(TAG,
"WinPR does not support the FILE_FLAG_OVERLAPPED flag");
612 SetLastError(ERROR_NOT_SUPPORTED);
613 return INVALID_HANDLE_VALUE;
617 return INVALID_HANDLE_VALUE;
619 if (!InitWinPRPipeModule())
620 return INVALID_HANDLE_VALUE;
622 pNamedPipe = (WINPR_NAMED_PIPE*)calloc(1,
sizeof(WINPR_NAMED_PIPE));
625 return INVALID_HANDLE_VALUE;
627 ArrayList_Lock(g_NamedPipeServerSockets);
628 WINPR_HANDLE_SET_TYPE_AND_MODE(pNamedPipe, HANDLE_TYPE_NAMED_PIPE, WINPR_FD_READ);
629 pNamedPipe->serverfd = -1;
630 pNamedPipe->clientfd = -1;
632 if (!(pNamedPipe->name = _strdup(lpName)))
635 if (!(pNamedPipe->lpFileName = GetNamedPipeNameWithoutPrefixA(lpName)))
638 if (!(pNamedPipe->lpFilePath = GetNamedPipeUnixDomainSocketFilePathA(lpName)))
641 pNamedPipe->dwOpenMode = dwOpenMode;
642 pNamedPipe->dwPipeMode = dwPipeMode;
643 pNamedPipe->nMaxInstances = nMaxInstances;
644 pNamedPipe->nOutBufferSize = nOutBufferSize;
645 pNamedPipe->nInBufferSize = nInBufferSize;
646 pNamedPipe->nDefaultTimeOut = nDefaultTimeOut;
647 pNamedPipe->dwFlagsAndAttributes = dwOpenMode;
648 pNamedPipe->clientfd = -1;
649 pNamedPipe->ServerMode = TRUE;
650 pNamedPipe->common.ops = &namedOps;
652 for (
size_t index = 0; index < ArrayList_Count(g_NamedPipeServerSockets); index++)
655 (NamedPipeServerSocketEntry*)ArrayList_GetItem(g_NamedPipeServerSockets, index);
657 if (!strcmp(baseSocket->name, lpName))
659 serverfd = baseSocket->serverfd;
669 struct sockaddr_un s = WINPR_C_ARRAY_INIT;
671 if (!(lpPipePath = GetNamedPipeUnixDomainSocketBaseFilePathA()))
674 if (!winpr_PathFileExists(lpPipePath))
676 if (!CreateDirectoryA(lpPipePath,
nullptr))
682 UnixChangeFileMode(lpPipePath, 0xFFFF);
687 if (winpr_PathFileExists(pNamedPipe->lpFilePath))
688 winpr_DeleteFile(pNamedPipe->lpFilePath);
690 if ((serverfd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
692 char ebuffer[256] = WINPR_C_ARRAY_INIT;
693 WLog_ERR(TAG,
"CreateNamedPipeA: socket error, %s",
694 winpr_strerror(errno, ebuffer,
sizeof(ebuffer)));
701 if (!winpr_set_cloexec(serverfd, TRUE))
703 WLog_ERR(TAG,
"CreateNamedPipeA: failed to set close-on-exec on listening socket");
707 s.sun_family = AF_UNIX;
708 (void)sprintf_s(s.sun_path, ARRAYSIZE(s.sun_path),
"%s", pNamedPipe->lpFilePath);
710 if (bind(serverfd, (
struct sockaddr*)&s,
sizeof(
struct sockaddr_un)) == -1)
712 char ebuffer[256] = WINPR_C_ARRAY_INIT;
713 WLog_ERR(TAG,
"CreateNamedPipeA: bind error, %s",
714 winpr_strerror(errno, ebuffer,
sizeof(ebuffer)));
718 if (listen(serverfd, 2) == -1)
720 char ebuffer[256] = WINPR_C_ARRAY_INIT;
721 WLog_ERR(TAG,
"CreateNamedPipeA: listen error, %s",
722 winpr_strerror(errno, ebuffer,
sizeof(ebuffer)));
726 UnixChangeFileMode(pNamedPipe->lpFilePath, 0xFFFF);
728 if (!(baseSocket = (NamedPipeServerSocketEntry*)malloc(
sizeof(NamedPipeServerSocketEntry))))
731 if (!(baseSocket->name = _strdup(lpName)))
737 baseSocket->serverfd = serverfd;
738 baseSocket->references = 0;
740 if (!ArrayList_Append(g_NamedPipeServerSockets, baseSocket))
742 free(baseSocket->name);
754 pNamedPipe->serverfd = fcntl(baseSocket->serverfd, F_DUPFD_CLOEXEC, 0);
757 pNamedPipe->pfnUnrefNamedPipe = winpr_unref_named_pipe;
758 baseSocket->references++;
760 if (dwOpenMode & FILE_FLAG_OVERLAPPED)
763 WLog_ERR(TAG,
"TODO: implement this");
767 ArrayList_Unlock(g_NamedPipeServerSockets);
770 NamedPipeCloseHandle(pNamedPipe);
776 ArrayList_Unlock(g_NamedPipeServerSockets);
777 return INVALID_HANDLE_VALUE;
780HANDLE CreateNamedPipeW(WINPR_ATTR_UNUSED LPCWSTR lpName, WINPR_ATTR_UNUSED DWORD dwOpenMode,
781 WINPR_ATTR_UNUSED DWORD dwPipeMode, WINPR_ATTR_UNUSED DWORD nMaxInstances,
782 WINPR_ATTR_UNUSED DWORD nOutBufferSize,
783 WINPR_ATTR_UNUSED DWORD nInBufferSize,
784 WINPR_ATTR_UNUSED DWORD nDefaultTimeOut,
785 WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes)
787 WLog_ERR(TAG,
"is not implemented");
788 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
792BOOL ConnectNamedPipe(HANDLE hNamedPipe,
LPOVERLAPPED lpOverlapped)
795 socklen_t length = 0;
796 WINPR_NAMED_PIPE* pNamedPipe =
nullptr;
800 WLog_ERR(TAG,
"WinPR does not support the lpOverlapped parameter");
801 SetLastError(ERROR_NOT_SUPPORTED);
808 pNamedPipe = (WINPR_NAMED_PIPE*)hNamedPipe;
810 if (!(pNamedPipe->dwFlagsAndAttributes & FILE_FLAG_OVERLAPPED))
812 struct sockaddr_un s = WINPR_C_ARRAY_INIT;
813 length =
sizeof(
struct sockaddr_un);
814#ifdef WINPR_HAVE_ACCEPT4
815 status = accept4(pNamedPipe->serverfd, (
struct sockaddr*)&s, &length, SOCK_CLOEXEC);
817 status = accept(pNamedPipe->serverfd, (
struct sockaddr*)&s, &length);
822 WLog_ERR(TAG,
"ConnectNamedPipe: accept error");
826#ifndef WINPR_HAVE_ACCEPT4
827 if (!winpr_set_cloexec(status, TRUE))
829 WLog_ERR(TAG,
"ConnectNamedPipe: failed to set close-on-exec on accepted socket");
835 pNamedPipe->clientfd = status;
836 pNamedPipe->ServerMode = FALSE;
843 if (pNamedPipe->serverfd == -1)
846 pNamedPipe->lpOverlapped = lpOverlapped;
848 lpOverlapped->Internal = 2;
849 lpOverlapped->InternalHigh = (ULONG_PTR)0;
850 lpOverlapped->DUMMYUNIONNAME.Pointer = (PVOID)
nullptr;
851 (void)SetEvent(lpOverlapped->hEvent);
857BOOL DisconnectNamedPipe(HANDLE hNamedPipe)
859 WINPR_NAMED_PIPE* pNamedPipe =
nullptr;
860 pNamedPipe = (WINPR_NAMED_PIPE*)hNamedPipe;
862 if (pNamedPipe->clientfd != -1)
864 close(pNamedPipe->clientfd);
865 pNamedPipe->clientfd = -1;
871BOOL PeekNamedPipe(WINPR_ATTR_UNUSED HANDLE hNamedPipe, WINPR_ATTR_UNUSED LPVOID lpBuffer,
872 WINPR_ATTR_UNUSED DWORD nBufferSize, WINPR_ATTR_UNUSED LPDWORD lpBytesRead,
873 WINPR_ATTR_UNUSED LPDWORD lpTotalBytesAvail,
874 WINPR_ATTR_UNUSED LPDWORD lpBytesLeftThisMessage)
876 WLog_ERR(TAG,
"Not implemented");
877 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
881BOOL TransactNamedPipe(WINPR_ATTR_UNUSED HANDLE hNamedPipe, WINPR_ATTR_UNUSED LPVOID lpInBuffer,
882 WINPR_ATTR_UNUSED DWORD nInBufferSize, WINPR_ATTR_UNUSED LPVOID lpOutBuffer,
883 WINPR_ATTR_UNUSED DWORD nOutBufferSize,
884 WINPR_ATTR_UNUSED LPDWORD lpBytesRead,
887 WLog_ERR(TAG,
"Not implemented");
888 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
892BOOL WaitNamedPipeA(LPCSTR lpNamedPipeName, DWORD nTimeOut)
896 char* lpFilePath =
nullptr;
897 DWORD dwSleepInterval = 0;
899 if (!lpNamedPipeName)
902 lpFilePath = GetNamedPipeUnixDomainSocketFilePathA(lpNamedPipeName);
907 if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT)
912 dwSleepInterval = 10;
914 while (!winpr_PathFileExists(lpFilePath))
916 Sleep(dwSleepInterval);
917 nWaitTime += dwSleepInterval;
919 if (nWaitTime >= nTimeOut)
930BOOL WaitNamedPipeW(WINPR_ATTR_UNUSED LPCWSTR lpNamedPipeName, WINPR_ATTR_UNUSED DWORD nTimeOut)
932 WLog_ERR(TAG,
"Not implemented");
933 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
938BOOL SetNamedPipeHandleState(HANDLE hNamedPipe, LPDWORD lpMode, LPDWORD lpMaxCollectionCount,
939 LPDWORD lpCollectDataTimeout)
944 WINPR_NAMED_PIPE* pNamedPipe =
nullptr;
945 pNamedPipe = (WINPR_NAMED_PIPE*)hNamedPipe;
949 pNamedPipe->dwPipeMode = *lpMode;
950 fd = (pNamedPipe->ServerMode) ? pNamedPipe->serverfd : pNamedPipe->clientfd;
955 flags = fcntl(fd, F_GETFL);
960 if (pNamedPipe->dwPipeMode & PIPE_NOWAIT)
961 flags = (flags | O_NONBLOCK);
963 flags = (flags & ~(O_NONBLOCK));
965 if (fcntl(fd, F_SETFL, flags) < 0)
969 if (lpMaxCollectionCount)
973 if (lpCollectDataTimeout)
980BOOL ImpersonateNamedPipeClient(WINPR_ATTR_UNUSED HANDLE hNamedPipe)
982 WLog_ERR(TAG,
"Not implemented");
983 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
987BOOL GetNamedPipeClientComputerNameA(WINPR_ATTR_UNUSED HANDLE Pipe,
988 WINPR_ATTR_UNUSED LPCSTR ClientComputerName,
989 WINPR_ATTR_UNUSED ULONG ClientComputerNameLength)
991 WLog_ERR(TAG,
"Not implemented");
992 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
996BOOL GetNamedPipeClientComputerNameW(WINPR_ATTR_UNUSED HANDLE Pipe,
997 WINPR_ATTR_UNUSED LPCWSTR ClientComputerName,
998 WINPR_ATTR_UNUSED ULONG ClientComputerNameLength)
1000 WLog_ERR(TAG,
"Not implemented");
1001 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);