依睛(IT blog) 我回来了,PHP<-->C/C++ LINUX

笨鸟

统计

积分与排名

友情连接

最新评论

查看文件是否存在 FindFirstFile

/* c*/

#include   <windows.h>
#include <stdio.h>
int
main(int   argc,   char   *argv[])
{
    WIN32_FIND_DATA   FindFileData;
    HANDLE   hFind;

    hFind   =   FindFirstFile("tet.c", &FindFileData);

    if   (hFind == INVALID_HANDLE_VALUE)  
    {
        printf   ( "Invalid   File   Handle.   Get   Last   Error   reports   %d\n ",   GetLastError   ());
    }  
    else  
    {
        printf   ( "The   first   file   found   is   %s\n ",   FindFileData.cFileName);
        FindClose(hFind);
    }

    return   (0);
}

posted on 2009-01-30 14:31 向左向右走 阅读(1006) 评论(0)  编辑 收藏 引用 所属分类: C/C++学习资料库

只有注册用户登录后才能发表评论。