如何将 2 个 32 位无符号整数合并为 64 位整数

How do I combine 2 32-bit Unsigned Integers to 64-bit integer

假设我有 2 个无符号整数
首先是值 &H0D345B40
第二个值 &H9AF34A32

如何生成一个无符号的 64 位整数,其值为 &H324AF39A405B340D

这是我试过的

dim crypt1 as uint32 = &H0D345B40
dim crypt2 as uint32 = &H9AF34A32

Dim output As UInt64 = (CType(CType(crypt1, UInt64), Long) Or (crypt2 << 32))

the output is &H000000009FF75B72

解决了一个蹩脚的方法,但还不错

    dim output() as uint64
    Dim bytes() As UInteger = {crypt1, crypt2}

    Buffer.BlockCopy(bytes, 0, output, 0, 8)