I need make one function with "CallNamedPipe", in C is:
Code: Select all
TCHAR chReadBuf[BUFSIZE];
BOOL fSuccess;
DWORD cbRead, cbWritten, dwMode;
LPTSTR lpszPipename = TEXT("\\\\.\\pipe\\myPIPE");
LPTSTR lpszWrite = TEXT("no llego nada");
fSuccess = CallNamedPipe(
lpszPipename,
lpszWrite,
(lstrlen(lpszWrite)+1)*sizeof(TCHAR),
chReadBuf,
BUFSIZE*sizeof(TCHAR),
&cbRead,
20000);
if (fSuccess || GetLastError() == ERROR_MORE_DATA)
Tank´s