Open marvinlehmann opened 7 years ago
Thank you for this PR. Well the direction is just outbound/inbound so a byte is more than enough. Mapping as USHORT it's maybe an error, but should not be a problem as long as the value is below the byte size.
I'll merge this soon and update on maven too. May I add you to contributors?
OK! Yea, that's fine =)
I noticed that the WinDivertAddress fields weren't set properly because the native memory of the JNA structure didn't get updated.
- https://java-native-access.github.io/jna/4.2.1/com/sun/jna/Structure.html#getPointer--
Unrelated: I also noticed that WinDef.USHORT is used for the direction which has a size of 2 bytes but it originally is defined as UINT8 (uint8_t) with a size of 1 byte. Could this generally be a problem? I'm just interested because I don't know much about JNA.