Solved

Wait for named pipe

Posted on 2010-08-26
4
839 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now