用VB或VC实现搜索共享文件夹的功能

最好是VC6.0, 搜索本机上/指定网络上的所有共享文件夹.列表
2024-11-25 23:19:01
推荐回答(1个)
回答1:

using : NetShareEnum

The NetShareEnum function retrieves information about each shared resource on a server.

NET_API_STATUS NetShareEnum(
LPWSTR servername,
DWORD level,
LPBYTE *bufptr,
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries,
LPDWORD resume_handle
);

the second parameter is to specify the level data eg:share names or share informations...
the third parameter is the return pointer to a struct or a buffer include the share infos

if level = 0 then bufptr is a pointer to a SHARE_INFO_0 struct (the shared info)