呵呵,PING不行, 还是EYES的方法好.
DWORD WNetOpenEnum(
DWORD dwScope, // scope of enumeration
DWORD dwType, // resource types to list
DWORD dwUsage, // resource usage to list
LPNETRESOURCE lpNetResource, // pointer to resource structure
LPHANDLE lphEnum // pointer to enumeration handle buffer
);
typedef struct _NETRESOURCE { // nr
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPTSTR lpLocalName;
LPTSTR lpRemoteName;
LPTSTR lpComment;
LPTSTR lpProvider;
} NETRESOURCE;
DWORD WNetEnumResource(
HANDLE hEnum, // handle to enumeration
LPDWORD lpcCount, // pointer to entries to list
LPVOID lpBuffer, // pointer to buffer for results
LPDWORD lpBufferSize // pointer to buffer size variable
);
DWORD WNetCloseEnum(
HANDLE hEnum // handle to enumeration
);