Solved

Wait for named pipe

Posted on 2010-08-26
4
861 Views
Last Modified: 2013-12-04
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
Comment
Question by:lavitz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 33530840
0
 

Author Comment

by:lavitz
ID: 33541734
yes, iam using this function to wait when server creates pipe. But iam search for  solution with windows event.
0
 

Author Comment

by:lavitz
ID: 33560717
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
 
LVL 4

Assisted Solution

by:parnasso
parnasso earned 250 total points
ID: 35006260
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question