Click here to Skip to main content
12,826,142 members (31,642 online)
Click here to Skip to main content
Add your own
alternative version


30 bookmarked
Posted 21 Aug 2001

CCeFileFind - A FileFind class for Windows CE

, 21 Nov 2001 CPOL
Rate this:
Please Sign up or sign in to vote.
CCeFileFind - A FileFind class for Windows CE.


This class was originally posted by Waseem Anis on CodeGuru. However after misunderstanding how the class works and finding (and subsequently fixing) several bugs, I decided that Waseem's article and code although excellent, needed some clarification.

As most Windows CE programmers know, Microsoft has not provided a FindFile MFC class to wrap the Windows CE FindFile APIs. This functionality lacking in the Windows CE SDK is provided in the CCeFileFind.

Using the class

The example code below demonstrates using the CeFileFind class to determine the device's storage card directory.

CCeFileFind p_ff;
BOOL bFilesFound =  p_ff.FindFile(_T("\\*"));

    bFilesFound = p_ff.FindNextFile();
    if(p_ff.IsTemporary() && p_ff.IsDirectory())
        m_csDirectoryName = p_ff.GetFileName();

NB. Note how FindFile is executed first, then FindNextFile is executed and then GetFileName is executed. FindFile and FindNextFile must occur in the demonstrated order. Any further questions or queries, feel free to contact me.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Ray Kinsella
Web Developer
Ireland Ireland
A very confused human being, a slightly less confused developer.

You may also be interested in...


Comments and Discussions

QuestionOne File is always lost Pin
TEisenhauer25-Feb-08 21:15
memberTEisenhauer25-Feb-08 21:15 
GeneralWin32 not MFC version Pin
Anonymous7-Dec-04 14:43
sussAnonymous7-Dec-04 14:43 
GeneralDrive mapping under CE Pin
Alex Evans23-Sep-04 19:23
memberAlex Evans23-Sep-04 19:23 
GeneralRe: Drive mapping under CE Pin
Ray Kinsella23-Sep-04 23:41
memberRay Kinsella23-Sep-04 23:41 
GeneralRe: Drive mapping under CE Pin
Alex Evans24-Sep-04 18:31
memberAlex Evans24-Sep-04 18:31 
GeneralLink Error Help ned Pin
pakolaw26-May-03 23:08
memberpakolaw26-May-03 23:08 
GeneralRe: Link Error Help ned Pin
MDR27-May-03 0:20
memberMDR27-May-03 0:20 
GeneralRe: Link Error Help ned Pin
pakolaw27-May-03 0:29
memberpakolaw27-May-03 0:29 
GeneralRe: Link Error Help ned Pin
MDR27-May-03 0:35
memberMDR27-May-03 0:35 
GeneralRe: Link Error Help ned Pin
editfmah8-May-07 12:52
membereditfmah8-May-07 12:52 
GeneralRe: Link Error Help ned Pin
zaphoed13-Mar-08 1:31
memberzaphoed13-Mar-08 1:31 
GeneralBug Pin
machiav16-Dec-02 23:28
membermachiav16-Dec-02 23:28 
GeneralRe: Bug Pin
Ray Kinsella16-Dec-02 23:32
memberRay Kinsella16-Dec-02 23:32 
GeneralRe: Bug Pin
piemelvriend22-Jul-04 23:38
memberpiemelvriend22-Jul-04 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170326.1 | Last Updated 22 Nov 2001
Article Copyright 2001 by Ray Kinsella
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid