惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
IT之家
IT之家
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - liuym

TB 编程整理 三 ICE开发初级研究 二 示例程序一 - liuym - 博客园 一 VC2008环境中ICE的配置 无法定位序数 3109 于LIBEAY32.dll - liuym 转:Virtual List的使用方法 转:VC++编程之CListCtrl控件的使用 2 转:VC++编程之CListCtrl控件的使用 好用 转:删除,修改注册表中需要设置权限的项 转:软件能够修复硬盘吗?―硬盘损坏全分析 转:CWnd 对象怎么和 HWND 窗口句柄相互转化 VC 多文档窗口 子窗口最大化时切换窗口 窗口没有最大化显示的问题 转:Windows VC6编译安装Boost库 转:送给那些一心想要传送文件的朋友(TCP协议).cpp-from CSDN 转:如何去了解、熟悉一个已经开发完的项目 进行维护、二次开发或者升级 DLL中资源和主程序资源冲突 - liuym - 博客园 转:一种巧妙的删除程序自己的方法 转:双缓冲图形刷新技术 和 WGF双缓冲绘图框架 软件保护建议(转)
递归创建文件夹
liuym · 2010-05-26 · via 博客园 - liuym

BOOL CreateMyDirectory(LPCTSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)

{

    BOOL ret = FALSE;

    CString dir = lpPathName;

    int pos = 0;

    if (CreateDirectory(dir,lpSecurityAttributes))

        return TRUE;

    do

    {             

        pos = dir.ReverseFind('\\');

        dir = dir.Left(pos);

        //if(!PathFileExists(dir))

        if(!CheckFileExit(dir))

        { 

            if(CreateDirectory(dir,lpSecurityAttributes))

                CreateMyDirectory(lpPathName,lpSecurityAttributes);

        }

        else 

            ret = TRUE;        

    }

    while(!ret);

    return TRUE;

}