Enumeration of network resources WNetOpenEnum returns ERROR_BAD_NETPATH ​​(error 53) After a long time

I am trying to get all shared PCs using the code present at http://msdn.microsoft.com/en-us/library/windows/desktop/aa385341(v=vs.85).aspx

The problem I am facing is that the WNetOpenEnum method takes a huge amount of time to open the Microsoft Windows Network resource and returns an ERROR_BAD_NETPATH error.

I noticed that Windows Explorer has access to shared PCs and their folders.

I also noticed that WNetConnectionDialog works fine too. If I select the Browse button, she will be able to update network connections and see shared PCs and their folders.

It is strange that this code works fine for a point-to-point connection.

  • Can someone help me in solving this problem?
  • Also can someone suggest me how to update shared resources using the Windows API?
  • Are there any methods in QT / boost that can find common PCS?
+4
source share

All Articles