gpt4 book ai didi

c# - 需要帮助从 C 中的 union 转换为 C#

转载 作者:行者123 更新时间:2023-11-30 21:14:18 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
C++ union in C#

C 代码:

typedef struct _EVENT_HEADER {
USHORT Size; // Event Size
USHORT HeaderType; // Header Type
USHORT Flags; // Flags
USHORT EventProperty; // User given event property
ULONG ThreadId; // Thread Id
ULONG ProcessId; // Process Id
LARGE_INTEGER TimeStamp; // Event Timestamp
GUID ProviderId; // Provider Id
EVENT_DESCRIPTOR EventDescriptor; // Event Descriptor
union {
struct {
ULONG KernelTime; // Kernel Mode CPU ticks
ULONG UserTime; // User mode CPU ticks
} DUMMYSTRUCTNAME;
ULONG64 ProcessorTime; // Processor Clock
// for private session events
} DUMMYUNIONNAME;
GUID ActivityId; // Activity Id

} EVENT_HEADER, *PEVENT_HEADER;

除了 union ,我什么都转换了。如何将其转换为 C#?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com