如何将 typedef union 翻译成delphi?
1)
typedef union __rfun_gop_event_info
{
unsigned int evt;
struct
{
unsigned int reserved1:1;
unsigned int reserved0:1;
unsigned int f30:1;
unsigned int f29:1;
}frame;
}rfun_gop_event_info;
2)
typedef union __rfun_gop_event_info
{
unsigned int evt;
struct
{
unsigned int reserved1:1;
unsigned int reserved0:1;
unsigned int f30:1;
unsigned int f29:1;
}frame;
}rfun_gop_event_info;
谢谢。
1)
typedef union __rfun_gop_event_info
{
unsigned int evt;
struct
{
unsigned int reserved1:1;
unsigned int reserved0:1;
unsigned int f30:1;
unsigned int f29:1;
}frame;
}rfun_gop_event_info;
2)
typedef union __rfun_gop_event_info
{
unsigned int evt;
struct
{
unsigned int reserved1:1;
unsigned int reserved0:1;
unsigned int f30:1;
unsigned int f29:1;
}frame;
}rfun_gop_event_info;
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 Delphi Corner 上的这篇文章,它解释了变体记录,这正是您所需要的:
DelphiCorner:变体记录:相当于 C-union 结构
摘录包含示例:
Have a look at this article at Delphi Corner that explains variant records which is exactly what you need:
DelphiCorner: Variant Records: The equivalent to the C-union structure
Excerpt containing example: