Reading SD card | developer.brewmp.com Reading SD card | developer.brewmp.com

Developer

Reading SD card

Forums:

Hi,
I would like to list all files currently stored in SD card. I have below code:

Header file:
#define READ_FROM_SCARD "fs:/card0/"

C File:
ReadingSDcard()
{
IFileMgr * pIFileMgr;
int ret;

ISHELL_CreateInstance(pMe->m_pIShell, AEECLSID_FILEMGR, (void **)&pIFileMgr)

// Look for file under fs:/card0/ which can be SD card
ret = IFILEMGR_EnumInit(pIFileMgr, READ_FROM_SCARD, FALSE);
if( ret == SUCCESS ) {
//Do something
}
else
{
// Show message about unable read SD card.
}

}

My phone has SD card plugged in and I can use menu on my phone to see the files stored on the SD card. but ret variable always equal EFAILED.

I have added 0x0101414E (CARD0_ACCESS) to Dependencies tab of the .mif file.

What is wrong in my code? how can I list files on SD card?

Thanks
Tran Hong Quang

Hi,
Which target you are using??
--Mangesh

Hi,
Which target you are using??
--Mangesh