반응형 NetShareEnum1 [MFC] Shared Folder 찾아서 제거하기 #include #include #pragma comment(lib, "Netapi32.lib") PSHARE_INFO_502 BufPtr; NET_API_STATUS res; LPTSTR lpszServer = NULL; DWORD er = 0, tr = 0, resume = 0; DWORD total = 0; do { res = NetShareEnum(lpszServer, 502, (LPBYTE *)&BufPtr, MAX_PREFERRED_LENGTH, &er, &tr, &resume); if (res == ERROR_SUCCESS || res == ERROR_MORE_DATA) { total += er; PSHARE_INFO_502 p = BufPtr; DWORD i = 0; for (i = 1; .. 2017. 1. 16. 이전 1 다음 반응형