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

Transmit_as and Represent_as

· 52CE 我爱测

Transmit_as and represent_as share the same layout except for the leading token; the token reads FC_TRANSMIT_AS or FC_REPRESENT_AS, but the underlying code is common.

Transmit_as and represent_as share the same layout except for the leading token; the token reads FC_TRANSMIT_AS or FC_REPRESENT_AS, but the underlying code is common.

The description has the following layout:

FC_TRANSMIT_AS | FC_REPRESENT_AS
flags<1>
quintuple_index<2>
presented_type_memory_size<2>
transmitted_type_buffer_size<2>
transmitted_type_offset<2>

The flags<1> byte consists of the upper flag nibble and the lower alignment nibble.

The alignment nibble keeps the wire alignment of the transmitted type. This is needed when buffer sizing and using the transmitted type size from the format code.

The flag nibble can have the following flags:

#define PRESENTED_TYPE_IS_ARRAY     0x10
#define PRESENTED_TYPE_ALIGN_4      0x20
#define PRESENTED_TYPE_ALIGN_8      0x40

The PRESENTED_TYPE_IS_ARRAY flag marks a top-level transmit as (or represent as) argument being an array of something and passed-by value. The –Oi interpreter uses this flag to step over such an argument (which is actually a pointer on stack, not the array). The other two flags are also used only in previous interpreters to step correctly over a presented type on the stack.

The quintuple_index<2> is an index of the callback routine quintuple (this is actually a quadruple) of functions. The table is common to both transmit as and represent as and there is an obvious mapping for the position of the routines, as the same entry points service transmit as and represent as codes. The mapping is from_local => to_xmit, to_local => from_xmit, free_inst => free_xmit, free_local => free_inst.

The presented_type_memory_size<2> always provides a size for the presented/local type, including unknown represent as types.

The transmitted_type_buffer_size<2> is either zero, when the size is varying, or the actual fixed size. This is an optimization that enables skipping some callbacks when sizing the buffer.

The transmitted_type_offset<2> is the usual relative type offset to the transmitted type format string.

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)

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

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