Closed LinusU closed 1 month ago
I think for now it's fine to just assume it's the size we expect, it looks like wine does this anyway. But I'd fill in length anyway just to be sure.
@evmar Updated 👍
it seems like the larger size (rcDevice
field) is only for old (pre-intel) Mac 😅
Opening this to get some discussion around how to implement variable length structs 🤔
According to MSDN:
ref
The problem is that my program (Pocoman) doesn't seem to initialize the
length
property at all. From looking at Ghidra I think that the variable simply isn't initialized at all, so it has the value of whatever happened to be in that stack position previously. (note that I don't have much experience with this so I could absolutely be wrong)Here is what
dbg!(&wndpl);
prints:I'm not really sure what to do here. I'm guessing that the input characteristics of
length
was introduced in a later version, in order to addrcDevice
in a backwards compatible way. But I don't understand how that could be since presumable it has been called with uninitialized data forlength
before that 🤔