Yeah the solution I had also uses the same API call to WNetGetConnection.

This API call only works in Windows 2000 and up, but I would hope at this point that doesn't matter.