Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 865
  • Last Modified:

Wait for named pipe

Hi,

I have question about named pipes in windows.
Client pipe app should call
WaitNamedPipe and this function waits for named pipe.
Next app calls CreateFile.

I need different solution for waiting for pipe ( if exists).
I need event created by CreateEvent and when event is set it means that named pipe exists and its ready.

Iam trying add named pipes to boost:asio and there is no problem with server named pipe
becouse server call  ConnectNamedPipe and waits for client. Then i get LPOVERLAPPED that asio need.

BOOL WINAPI ConnectNamedPipe(
  __in         HANDLE hNamedPipe,
  __inout_opt  LPOVERLAPPED lpOverlapped
);


 

0
lavitz
Asked:
lavitz
  • 2
2 Solutions
 
jkrCommented:
0
 
lavitzAuthor Commented:
yes, iam using this function to wait when server creates pipe. But iam search for  solution with windows event.
0
 
lavitzAuthor Commented:
Ok, i was thinking that WaitNamedPipe waits even named pipe was not created. Its work before and i dont know how. So could someone confirm this?
0
 
parnassoCommented:
I can confirm that WaitNamedPipe returns inmediately if the named piped has not been created yet.

About the overlapped question, could you be more clear?
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now