From: Jake on 6 Jan 2010 00:10 I have a process which provides some functions. I need to call these functions from a different process. Both processes will always be on the same box. All the code will be in C/C++. I am planning to use pipes with proxying & marshaling to do this. I am confused as to how to make a decision on whether to use named or anonymous pipes for this? What are the advantages/disavantages for either? This needs to be very lightweight. I am not planning to use SOAP or some other RPC mechanism for this. So I was also wondering if there already are any free lightweight free libraries available to do all this so that I don't need to roll my own.
From: Remy Lebeau on 6 Jan 2010 12:56 "Jake" <jake(a)jake.com> wrote in message news:hi160r$2mp$1(a)news.eternal-september.org... > I have a process which provides some functions. > I need to call these functions from a different process. > Both processes will always be on the same box. > All the code will be in C/C++. > > I am planning to use pipes with proxying & marshaling to > do this. Personally, I prefer to use COM objects for such things instead. But that is just me. > I am confused as to how to make a decision on whether to > use named or anonymous pipes for this? An anonymous pipe will only work if one process spawns the other using one of the CreateProcess...() function. Otherwise, you need to use a named pipe instead. -- Remy Lebeau (TeamB)
From: Jake on 6 Jan 2010 23:36 > An anonymous pipe will only work if one process spawns the other using > one of the CreateProcess...() function. Otherwise, you need to use a > named pipe instead. The documentation points to one more diff between Named & Anonymous Pipes - looks like Anonymous Pipes are always blocking/Synchronous. You have to use Named Pipes for Asynchronous/Overlapped I/O. Is this a big issue? Can I not have the read/write to the anonymous thread in a separate thread, so that blocking is not a problem? What are the advantages of using overlapped I/O over blocking in a separate thread? "Remy Lebeau" <no.spam(a)no.spam.com> wrote in message news:eiwEbmvjKHA.4500(a)TK2MSFTNGP06.phx.gbl... "Jake" <jake(a)jake.com> wrote in message news:hi160r$2mp$1(a)news.eternal-september.org... > I have a process which provides some functions. > I need to call these functions from a different process. > Both processes will always be on the same box. > All the code will be in C/C++. > > I am planning to use pipes with proxying & marshaling to > do this. Personally, I prefer to use COM objects for such things instead. But that is just me. > I am confused as to how to make a decision on whether to > use named or anonymous pipes for this? An anonymous pipe will only work if one process spawns the other using one of the CreateProcess...() function. Otherwise, you need to use a named pipe instead. -- Remy Lebeau (TeamB)
From: Kursat on 7 Jan 2010 12:00 "Jake" <jake(a)jake.com> wrote in message news:hi3ode$mpq$1(a)news.eternal-september.org... >> An anonymous pipe will only work if one process spawns the other using >> one of the CreateProcess...() function. Otherwise, you need to use a >> named pipe instead. > > The documentation points to one more diff between Named & Anonymous > Pipes - looks like > Anonymous Pipes are always blocking/Synchronous. You have to use Named > Pipes for > Asynchronous/Overlapped I/O. > Is this a big issue? Can I not have the read/write to the anonymous thread > in a separate thread, so > that blocking is not a problem? What are the advantages of using > overlapped I/O over blocking > in a separate thread? The advantage is that you can use that thread for another task rather than blocking it while your IO proceeds.
From: m on 8 Jan 2010 20:48 Where did you read this? I have used overlapped pipes several times since NT 3.51 and have never seen any distinction between named and anonymous pipes except the usual SD + object name "Jake" <jake(a)jake.com> wrote in message news:hi3ode$mpq$1(a)news.eternal-september.org... >> An anonymous pipe will only work if one process spawns the other using >> one of the CreateProcess...() function. Otherwise, you need to use a >> named pipe instead. > > The documentation points to one more diff between Named & Anonymous > Pipes - looks like > Anonymous Pipes are always blocking/Synchronous. You have to use Named > Pipes for > Asynchronous/Overlapped I/O. > Is this a big issue? Can I not have the read/write to the anonymous thread > in a separate thread, so > that blocking is not a problem? What are the advantages of using > overlapped I/O over blocking > in a separate thread? > > > "Remy Lebeau" <no.spam(a)no.spam.com> wrote in message > news:eiwEbmvjKHA.4500(a)TK2MSFTNGP06.phx.gbl... > > "Jake" <jake(a)jake.com> wrote in message > news:hi160r$2mp$1(a)news.eternal-september.org... > >> I have a process which provides some functions. >> I need to call these functions from a different process. >> Both processes will always be on the same box. >> All the code will be in C/C++. >> >> I am planning to use pipes with proxying & marshaling to >> do this. > > Personally, I prefer to use COM objects for such things instead. But that > is just me. > >> I am confused as to how to make a decision on whether to >> use named or anonymous pipes for this? > > An anonymous pipe will only work if one process spawns the other using one > of the CreateProcess...() function. Otherwise, you need to use a named > pipe instead. > > -- > Remy Lebeau (TeamB) >
|
Pages: 1 Prev: CreateProcess and error 740 (requires elevation) Next: LoadLibrary ERROR_NOACCESS : 998 |