zordes
asked on
An example for pipes.pas?
I have downloaded the pipes.pas from Russel Libbys web-page. I have no experience in using named pipes. Has somebody a working example how to use the server and clients?
ASKER
Thanks it works fine.
Could ypu please give me a tip, how to communicate between to applications?
Do I have to set the ServerName in client app?
Thank You
Regards
Zordes
Could ypu please give me a tip, how to communicate between to applications?
Do I have to set the ServerName in client app?
Thank You
Regards
Zordes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You.
My app works as expected.
Just the last remark. I assume that the PipeServer can be created in a dll of the desktop application. Do You agree?
My app works as expected.
Just the last remark. I assume that the PipeServer can be created in a dll of the desktop application. Do You agree?
Hi, :)
yes, the pipe can be created from within a dll. The only reasons I can think of right now for why a pipe wouldn't be created, is that if the pipename is already occupied, or that the user context from which the process is running does not have enough privileges to create pipes.
regards
Hypo
yes, the pipe can be created from within a dll. The only reasons I can think of right now for why a pipe wouldn't be created, is that if the pipename is already occupied, or that the user context from which the process is running does not have enough privileges to create pipes.
regards
Hypo
ASKER
That was really a prompt solution!
Thanks again.
Thanks again.
I have put together an example of how to connect to a server and send data over the pipe. I've attached the code (pas and dfm) below in a zip-file, and also added included the pas-code as a snippet below. I noticed that there is a bug in the pipes.pas file that I got from Russel's page, don't know if it is the same version as you use. However, the bug is in the function TPipeListenThread.Create, and can be fixed in the way mentioned below:
constructor TPipeListenThread.Create(P
begin
// Perform inherited create (suspended)
inherited Create(True);
// Increment the thread counter
// FPipeServer.FThreadCount.I
PipeServer.FThreadCount.In
...
Regards
Hypo
Open in new window