Solved

Wait for named pipe

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Mobile 6.5 device Apache Flex 3 45
Handle Exceptions during instantiation 28 415
Issue testing the Class Library 4 55
Authentication of Web Services 3 74
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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