Directory Depth 구하는 함수 (VC)
DWORD QueryMaximumDepthofSomePath(LPCTSTR lpszPath){ WIN32_FIND_DATA wfs; HANDLE hFile = NULL; TCHAR FullDirPath[MAX_PATH]; TCHAR NewDirPath[MAX_PATH]; ZeroMemory(FullDirPath, sizeof(FullDirPath)); ZeroMemory(NewDirPath, sizeof(NewDirPath)); int nCount = 1; //디렉토리 깊이 (입력받은 lpszPath 부터 카운트 한다.) int nTotCount = 0; //최하위 디렉토리 깊이 // 폴더가 존재 하는지, 드라이브인지 체크 if ( PathIsRoot(lpszPath) || _access(lpszPath, 0) == -1 ) { return 0; } wsprintf(FullDirPath, “%s\\*.*”,lpszPath); // Start scaning […]
Directory Depth 구하는 함수 (VC) 더 읽기"
