Hi all,
I have a IPC architecture where in i am using Named pipes,
which has N-input (senders) 1 output(receiver), but the problem is i am able to receive only 1 input data on the output side.
Server side only one receiver:
hPipe = CreateNamedPipe(
g_szPipeName,
PIPE_ACCESS_DUPLEX,
PIPE_TYPE_BYTE |
PIPE_READMODE_BYTE |
PIPE_NOWAIT,
PIPE_UNLIMITED_INSTANCES,
BUFFER_SIZE,
BUFFER_SIZE,
NMPWAIT_USE_DEFAULT_WAIT,
&sa);
BOOL bResult = ReadFile(
hPipe,
szBuffer,
sizeof(szBuffer),
&cbBytes,
NULL);
Client Side more than 1 Client:
SECURITY_ATTRIBUTES sa;
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)malloc(SECURITY_DESCRIPTOR_MIN_LENGTH);
InitializeSecurityDescriptor(sa.lpSecurityDescriptor,SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(sa.lpSecurityDescriptor, TRUE, NULL, FALSE);
sa.nLength = sizeof(sa);
sa.bInheritHandle = FALSE;
hPipe = CreateFile(
g_szPipeName,
GENERIC_WRITE,
0,
&sa,
OPEN_EXISTING,
0,
NULL);
DWORD cbBytes;
WriteFile(
hPipe,
pf32InputFrames,
ppInputConnections[0],
&cbBytes,
NULL);
By the way this is in VISTA.