Pelles C forum

C language => Pocket PC and Smartphone questions => Topic started by: gromit on May 12, 2009, 08:10:32 AM

Title: Open Folder In Pocket Pc
Post by: gromit on May 12, 2009, 08:10:32 AM
Hi All
I am trying to open a folder which my program
has generated and list the .txt  files therin

But !

I cannot get past a Directory Pointer
Please Help If Poss Thanks

static LRESULT CALLBACK JobListDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
 
 switch (uMsg)
    {
    case WM_INITDIALOG:
    //wcscpy(filname,L"My Documents\\MyFolder\\");       
DIR *pd;
pd=  opendir(L"My Documents\\MyFolder\\");

return TRUE;
break;

  case WM_COMMAND:
            switch (LOWORD(wParam))
            {

      case IDCANCEL:
    // make sure sip is down

EndDialog(hDlg, CANCELLED);
          return TRUE;   

      
error #2048: Undeclared identifier 'DIR'.
error #2048: Undeclared identifier 'pd'.

I Include <dirent.h>

i have been banging away at this for some time and
am programming in mainly WIN32API
Have initially tried -:



DlgDirList(etc

DlgDirListComboBox(etc
and
DlgDirSelectComboBoxEx(

All of which do not appear to want to run on pocket pc




Title: Re: Open Folder In Pocket Pc
Post by: JohnF on May 12, 2009, 10:30:54 AM
I imagine that you need to specify the complete path.

Code: [Select]
pd=  opendir(L"C:\\Documents and Settings\\Name\\My Documents\\MyFolder\\");

And it's _DIR and _opendir

John
Title: Re: Open Folder In Pocket Pc
Post by: gromit on May 15, 2009, 08:19:57 AM
Thanks John that went a long way towards solving my problem

i was over complicating matters in the end.

So Big Thanks
Gromit
Title: Re: Open Folder In Pocket Pc
Post by: Sxandy on November 07, 2014, 08:49:46 AM
With my old HTC Touch Diamond 2 with Windows Mobile 6.5, I had the same problem.
With my very old ASUS 696 with Windows Mobile 6.1, it worked.
It seemed to be a problem with the permissions. :(