The CreatePipe function creates an anonymous pipe, and returns handles to the read and write ends of the pipe.
BOOL CreatePipe(
|
PHANDLE hReadPipe, |
// address of variable for read handle |
|
PHANDLE hWritePipe, |
// address of variable for write handle |
|
LPSECURITY_ATTRIBUTES lpPipeAttributes, |
// pointer to security attributes |
|
DWORD nSize |
// number of bytes reserved for pipe |
|
); |
Windows NT: The lpSecurityDescriptor member of the structure specifies a security descriptor for the new pipe. If lpPipeAttributes is NULL, the pipe gets a default security descriptor.
Windows 95: The lpSecurityDescriptor member of the structure is
ignored.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
CreatePipe creates the pipe, assigning the specified pipe size to the storage buffer. CreatePipe also creates handles that the process uses to read from and write to the buffer in subsequent calls to the ReadFile and WriteFile functions.
To read from the pipe, a process uses the read handle in a call to the ReadFile function. ReadFile returns when one of the following is true: a write operation completes on the write end of the pipe, the number of bytes requested has been read, or an error occurs.
When a process uses WriteFile to write to an anonymous pipe, the write operation is not completed until all bytes are written. If the pipe buffer is full before all bytes are written, WriteFile does not return until another process or thread uses ReadFile to make more buffer space available.
ReadFile, SECURITY_ATTRIBUTES, WriteFile
See also:
| file: /Techref/os/win/api/win32/func/src/f10_13.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2012/2/9 23:22,
38.107.179.230:LOG IN |
| ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/os/win/api/win32/func/src/f10_13.htm"> CreatePipe</A> |
| Did you find what you needed? |
|
PIC 16 series Microcontroller Instruction Set Reference. And his Hobby Electronics web site at http://hobby_elec.piclist.com. |
Robotics nuts!Check out http://users.frii.com/dlc/robotics/projects/botproj.htm from Dennis Clark. This guy ROCKS! He has made (and sells but also releases code, docs, etc...) for a number of cool little robotic modules including whiskers, IR proximity detect and remote control, Sonar proximity detect, PWM, Servo, compass. Most of these use the little PIC 12C508 controller which costs basically nothing and is soooo tiny.The 4 servos, 2400 baud serial servo controller is a wonder of magic and he sells the programmed chip for $8. Wow! |
.