大网数据广告活动
网络与域名解析

Client-Side Pipe Implementation

· 52CE 我爱测

Client-side pipe implementation in Remote Procedure Call (RPC).

The client application must implement the following procedures, which the client stub will call during data transfer:

  • A pull procedure (for an input pipe)
  • A push procedure (for an output pipe)
  • An alloc procedure to allocate a buffer for the transfer data

All of these procedures must use the arguments specified by the MIDL-generated header file. In addition, the client application must have a state variable to identify where to locate or place data.

The alloc procedure can also be as simple or as complex as needed. For example, it can return a pointer to the same buffer every time the stub calls the function, or it can allocate a different amount of memory each time. If your data is already in the proper form (an array of pipe elements, for example) you can coordinate the alloc procedure with the pull procedure to allocate a buffer that already contains the data. In that case, your pull procedure could be an empty routine.

The buffer allocation must be in bytes. The push and pull procedures, on the other hand, manipulate elements, whose size in bytes depends on how they were defined.

This section discusses the client implementation of input and output pipes in the following sections:

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。