Windows 中的命名管道与邮件槽通信技术解析
1. Windows 中的命名管道
在 Windows 3.x 应用程序中使用命名管道时,其概念和一般用途与 Windows NT 中的命名管道基本相同,但有一个显著区别:Windows 3.x 工作站不支持命名管道服务器,因此 Windows 应用程序只能作为命名管道客户端。
以下是 Windows 命名管道 API 与 Win32 API 的对应关系:
| WIN32 API | Windows API |
| — | — |
|CreateFile()|OpenFile()|
|ReadFile()|_lread()|
|WriteFile()|_lwrite()|
|CloseHandle()|_lclose()|
|PeekNamedPipe()|DosPeekNmPipe()|
|WaitNamedPipe()|DosWaitNmPipe()|
|CallNamedPipe()|DosCallNmPipe()|
|TransactNamedPipe() </