Qt 5.14+ tries to check network connection suitability when any network connection is made. Unfortunately, this is done incorrectly. The return value of IEnumNetworkConnections::Next is only checked for failure, not for S_FALSE. Instead, !*ret is used to quit the loop.
Apparently, Windows puts NULL in the output in this case. It is possible that all of the non-populated slots are actually set to NULL, but Qt only uses count=1. To work around the issue, make Wine set NULL too.
Signed-off-by: Alex Xu (Hello71) alex_y_xu@yahoo.ca --- dlls/netprofm/list.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c index f9b9e2e..833236a 100644 --- a/dlls/netprofm/list.c +++ b/dlls/netprofm/list.c @@ -1013,6 +1013,7 @@ static HRESULT WINAPI connections_enum_Next( i++; } if (fetched) *fetched = i; + if (!i) ret[0] = NULL;
return i < count ? S_FALSE : S_OK; }
Hi Alex,
I have sent a patch for the same issue a few days ago: https://source.winehq.org/patches/data/198363 Does it fix the issue of the application you tested with?
On 1/24/21 6:51 AM, Alex Xu (Hello71) wrote:
Qt 5.14+ tries to check network connection suitability when any network connection is made. Unfortunately, this is done incorrectly. The return value of IEnumNetworkConnections::Next is only checked for failure, not for S_FALSE. Instead, !*ret is used to quit the loop.
Apparently, Windows puts NULL in the output in this case. It is possible that all of the non-populated slots are actually set to NULL, but Qt only uses count=1. To work around the issue, make Wine set NULL too.