I only noticed this problem when we recently bought a smart TV and found that it could see my PC as a media player but could not access any of the files on it, but it could access my wife's computer and see and play her media.
On investigation I found that my wife's PC was behaving like the TV - it could see my PC as a media player by not as a computer or any of my files. This could have been the case for months past because my PC can see hers but she very rarely tries to access mine.
I tried all the recommended fixes in this thread but only two worked - Network Reset and \ipaddress - and only to make my PC visible/accessible to my wife's PC, not the TV.
Network reset works... but only on the first reboot, because the services are RESTARTED...
I did it twice and thought the problem was resolved... NOT! After the next reboot, same problem!
I have to RESTART the "Function Discovery Provider Host" service after each reboot.
I can live with that for now, as long as everything is ok after RESUME from sleep (which it is)