-
April 7th, 2010, 01:03 AM
#1
Creating NamedPipes
Hello Everybody,
I have a Win32 Server Program which creates many pipes.I know that, name of the pipe will be having a standard format and cannot be changed.Pipe name creation will be as follows,
LPTSTR lpszPipename = TEXT(\\\\.\\pipe\\SamplePipe);
hPipe = CreateNamedPipe(lpszPipename, PIPE_ACCESS_DUPLEX,PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,BUFSIZE, BUFSIZE,0,NULL);
Now my question is, can we create a named pipe dynamically, means creating a pipe during run time.
Hope my qustion is somewhat clear.
Shiva..
-
April 7th, 2010, 04:07 AM
#2
Re: Creating NamedPipes
Originally Posted by sivalingam.m
Code:
LPTSTR lpszPipename = TEXT(\\\\.\\pipe\\SamplePipe);
hPipe = CreateNamedPipe(lpszPipename, PIPE_ACCESS_DUPLEX,PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,BUFSIZE, BUFSIZE,0,NULL);
Now my question is, can we create a named pipe dynamically, means creating a pipe during run time.
The code you showed does exactly what you asked: it creates (or, at least, tries to create) a named pipe during run time.
BTW, I don't know a way to create a named pipe before run time (in design time) nor after the run time.
Victor Nijegorodov
-
April 7th, 2010, 04:13 AM
#3
Re: Creating NamedPipes
Originally Posted by sivalingam.m
I know that, name of the pipe will be having a standard format and cannot be changed.
That's new to me. The name of the pipe can be changed alright once both server and client sides agree on new name.
Now my question is, can we create a named pipe dynamically, means creating a pipe during run time.
Hope my qustion is somewhat clear.
No your question is not. Actually the code you quoted already is dynamic pipe creation. So what made you think it's not dynamic? or it's not a creation?
Best regards,
Igor
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|