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

Examples (RPC)

· 52CE 我爱测

Examples that demonstrate Remote Procedure Call (RPC) concepts.

The Platform Software Development Kit (SDK) includes examples that demonstrate a variety of Remote Procedure Call (RPC) concepts, as follows:

  • ASYNCRPC illustrates the structure of an RPC application that uses asynchronous remote procedure calls. It also demonstrates various methods of notification of the call's completion.

  • CLUUID demonstrates use of the client-object UUID to enable a client to select from multiple implementations of a remote procedure.

  • DATA directory contains four programs: DUNION illustrates discriminated (nonencapsulated) unions; INOUT demonstrates [in], [out] parameters; REPAS demonstrates the represent_as attribute; XMIT demonstrates the transmit_as attribute.

  • DYNEPT demonstrates a client application managing its connection to the server through dynamic endpoints.

  • FILEREP directory contains four samples illustrating how developers can write a simple file replication service, a multi-user file replication service, a service supporting security features, and a service using RPC asynchronous pipes.

  • HANDLES directory contains three programs, AUTO, CXHNDL, USRDEF, which demonstrate auto_handle, [context_handle], and generic (user-defined) handles, respectively.

  • HELLO is a client/server implementation of "Hello, world."

  • PICKLE directory contains two programs: PICKLP demonstrates data procedure serialization; PICKLT demonstrates data type serialization; both programs use the [encode] and [decode] attributes.

  • PIPES demonstrates the use of the pipe-type constructor.

  • RPCSVC demonstrates the implementation of a service with RPC.

  • STROUT demonstrates how to allocate memory at a server for a two-dimensional object (an array of pointers) and pass it back to the client as an [out]-only parameter. The client then frees the memory. This technique allows the stub to call the server without knowing in advance how much data will be returned.

    This program also allows the user to compile either for UNICODE or ANSI.

All of the source files and makefiles for these programs are located in the Platform SDK.

For basic RPC application development and simpler examples, please see the Tutorial topics.

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)

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

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