Win32: API calls to list available network shares on a server?

青春壹個敷衍的年華 提交于 2019-12-06 06:17:37
ChrisW

According to the docs there's a NetShareEnum and a WNetEnumResource function.

net view \\1.2.3.4

Check out http://www.ss64.com/nt/net_share.html

Edit: If you want to do this programmatically, it looks like NetShareEnum would work.

It appears you can use WMI to get this information. Check this post for some neat PowerShell tutorials that show now to use the Win32_Share WMI object.

Never use WMI (not installed natively)
Use Win32 api to enumerate shares, posted millions of times on google groups( win32)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!