I'm not sure if I'm using the dinput HID test infrastructure correctly. Also, an existing test could be extended instead of adding a whole new test function, saving a couple of source code lines and test execution time, but I wasn't sure which one to extend - feel free to suggest one and I will update the test.
Also, maybe the suggested fix is not a great idea. Maybe there are actually some collection objects that are supposed to have a guidType that is not GUID_Unknown? I couldn't find any in the limited number of Windows environments I can access, so I wanted to put it out there for discussion.
The issue I'm trying to solve is that Zusi 3 does not appear to check the DIDFT_NODATA bit in dwType, so it just adds most of the objects listed by EnumObjects() to the SetDataFormat() call, maybe filtering out only those that have guidType = GUID_Unknown, or maybe there's an allow-list of GUIDs to add, and that list includes GUID_ZAxis. I haven't seen complaints about joysticks not working in Zusi 3 on Windows, so I guess collections (and DIDFT_NODATA objects in general) rarely/never have a non-Unknown GUID, or maybe Windows simply accepts these collections in SetDataFormat() and that only fails in Wine.