The Microsoft documentation for the DISPLAYCONFIG_TARGET_DEVICE_NAME struct has this to say about its connectorInstance
member:
The one-based instance number of this particular target only when the adapter has multiple targets of this type. The connector instance is a consecutive one-based number that is unique within each adapter. If this is the only target of this type on the adapter, this value is zero.
When I have a single monitor connected to a video card, I get back a 1 in this field. However, when I have multiple monitors connected to a video card, I get a 0 in this field for each of them.
I was expecting this to be 1... 2... 3..., etc. What's more, the code based upon this assumption has been in production for over a year with no reported issues. Then within the last month or two we suddenly got a flood of user support issues that boil down to our getting zero back for all connected monitors (for users with multiple monitors). Maybe that's coincidence, but it makes me wonder if some behavior changed on the Windows side of things...
...only when the adapter has multiple targets of this type. ... If this is the only target of this type on the adapter, this value is zero.
Maybe I'm misunderstanding what's meant here by 'type'. It's kind of vague, so it could be referring to something in the EDID, or some combination of attributes... bleh.
Anyone familiar enough with the DisplayConfigGetDeviceInfo(...) API to provide any insight on this?