473,583 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interprocess communication in Windows

308 Contributor
Hi all,

I am very new to Implementation of the Interprocess communication.I am trying to implement the concept in c++.I created the pipe using Createnamedpipe () function ,connecting to that pipe using ConnectNamedPip e() function and then reading the file created on the file at one end.

But I am bit curious about the how the process/user at the other end of the pipe will communicate with the my terminal.How the things goes in the background..?

Can anyone help me ?

Thanks!
:)
Dec 5 '08 #1
3 4081
JosAH
11,448 Recognized Expert MVP
@madankarmukta
A (named) pipe is a classic example of a producer/consumer scenario. A pipe is a buffer that serves as a queue; the producer writes to one end and the consumer reads from the other end.

If the buffer is full the producer is blocked; the consumer is allowed to run. If the buffer is empty the consumer is blocked and the producer is allowed to run. Anywhere in between both are allowed to run but the access to the buffer is monitored by a mutex; i.e. if one party is accessing the buffer, the other party is temporarily blocked.

Both the producer and the consumer are processes handled by the OS. The pipe can be a buffer in memory or an actual entry in the file system.

kind regards,

Jos
Dec 5 '08 #2
madankarmukta
308 Contributor
@JosAH
Hi Jos ,
Thanks for giving quick reply.

So from the scenario which i described in my post, reflect that I created the producer.. I am not sure how to implement the consumer. Can anyone help me ?

Thanks!
Dec 8 '08 #3
Banfa
9,065 Recognized Expert Moderator Expert
In the consumer you call CreateNamedPipe to either create a new pipe or create an instance of an existing named pipe (i.e. open a handle onto an existing pipe) or CreateFile to create an instance of an existing named pipe. You can use ReadFile and WriteFile to read and write data to the pipe.

I suggest you read the pipe reference Pipes (Windows)
Dec 8 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
400
by: Jeroen | last post by:
Question, We are in the process of creating a windows service in C#. Another GUI application, also written in C# has to communicate from another machine to this service. What is the best technique to use for interprocess communications in this situation? Thanks in advance, Jeroen
4
2159
by: Charles Packer | last post by:
I need to do the following simple interprocess communication (IPC) among these processes that are all on the same box: -- A daemon waits for "I'm here" announcements from multiple clients -- One or more clients send an "I'm here" to the daemon upon command via the client's GUI (Each client's GUI is viewed by a different human user) The...
5
2640
by: guy | last post by:
In the past I've used sockets in C++ to allow apps to communicate with each other over a local network. Is there anything better/more advanced in .NET or should I continue to use sockets and the .NET Socket class under C#? The (mini) project that I'm about to start will receive stream live data (stock market prices) and reformat that data...
2
2370
by: ribaud | last post by:
Hi all, i am working on a communication method between two apps. the first app is a pure c++ project, potentially usable on windows and linux. the second app will be a dotnet app using winforms. it will give orders to the first app. winforms are used to make a good looking and simple interface for third party users. The communication method...
3
4788
by: James Aguilar | last post by:
Oh wise readers of comp.lang.python, Lend a newbie your ears. I have read several old articles from this group about memory mapping and interprocess communication and have Googled the sh** out of the internet, but have not found sufficient to answer my questions. Suppose that I am writing a ray tracer in Python. Well, perhaps not a ray...
7
2048
by: Michael Butscher | last post by:
Hi, this is not really Python-specific but I need it for Python. I'm wanting a method for interprocess communication which is OS- independent (sockets would be the normal way to go), but which works if multiple users use the machine at the same time so that one user has no access to the communication of programs of another user. ...
4
2074
by: batista | last post by:
Hello all, I need suggestions and possibly solutions to the problem stated below: I have an application written purely in .NET ( Windows Form Application) and another application that is supposed to be written in MFC(Visual C++) or Win32 GUI Application. The problem is to communicate data between the two applications. for example,
0
1486
by: Murali | last post by:
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their stdout and stderr. The problem is that, for...
2
1785
by: Murali | last post by:
Hi Python Gurus, I am writing a GUI app (on linux) using pygtk which would launch some external applications and display their stdout and stderr inside the output window of my application synchronously. I am using the subprocess module's Popen to launch the external programs and to capture their stdout and stderr. The problem is that, for...
0
7895
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8193
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5374
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3818
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1433
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.