开发者

FindFirstFile type problems

I'm writing a function that will check if there's a jpg file in the given folder. My try at this is as follows:

    int containsJpgs(String ^path)
    {
        WIN32_FIND_DATA data;
        HANDLE hFind;
        hFind = FindFirstFile(path + "*.jpg", &data); // Type error.
        if (hFind == INVALID_HANDLE_VALUE) 
        {
            return 0;
        开发者_StackOverflow}
        return 1;
    }

How do I append a System::String ^ to a LPCTSTRto get LPCTSTR? And will the above code work when I do that, or are there other problems?


what about lstrcat()?

EDIT: to convert system::string^ to lpctstr I found this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜