int GetCustomerName(LPCTSTR szCustomerPath, CString strFileName[])
    {
        int nFileCount = 0;
        WIN32_FIND_DATA finder;
        CString strCustomerFile(szCustomerPath);
        strCustomerFile += L"//*.txt";
        HANDLE hFind = ::FindFirstFile(strCustomerFile, &finder);
        if (INVALID_HANDLE_VALUE == hFind)
        {
            nFileCount = 0;
        }
        else
        {
            do
            {
                strFileName[nFileCount] = finder.cFileName;
                FILETIME fileTime = finder.ftCreationTime;

                nFileCount++;
            }while(::FindNextFile(hFind, &finder) != 0);
        }
        ::FindClose(hFind);
        return nFileCount;
    }

(迁移2011-05-08)

发表评论

电子邮件地址不会被公开。 必填项已用*标注

鄂ICP备17003086号. Copyright © 2016. All Rights Reserved.