You can just declare a normal C++ structs with the variables defined. For instance, this: https://pastebin.com/EJD7ytn
const struct1 = new DataView(new ArrayBuffer(32));
const struct2 = new DataView(new ArrayBuffer(64));
struct2.setBigInt64(8*1, BigInt(title), true);
struct2.setBigInt64(8*2, BigInt(msg), true);
This means there are two structs of size of 32 bytes and 64 bytes respectively. The first struct gets no data written, so you can just zero it all out. The second one gets two 64bit (8 bytes) values written at offset 8 and 16 (I think DataView starts at offset 0 too). So, for your struct you could for instance declare 4 variables of 8 bytes size (and pointer type or something like uintptr_t) and then set the second and third to title and msg respectively. Hope that helps.