Write files in MemoryCard problem | developer.brewmp.com Write files in MemoryCard problem | developer.brewmp.com

Developer

Write files in MemoryCard problem

Forums:

My app must read and write memorycard. But there has a problem and I can't solve. I can make folder in memorycard, can create file but can't write in this file. This is my function:
void download::writeFile(byte* buff,char* fileFullPath,int length)
{

IFile* pFile = IFILEMGR_OpenFile(pFileMgr, fileFullPath, _OFM_READWRITE);
if (!pFile)
pFile = IFILEMGR_OpenFile(pFileMgr,fileFullPath, _OFM_CREATE);
else
IFILE_Seek(pFile, _SEEK_END, 0);

if (pFile)
{
int b = IFILE_Write(pFile, buff, length);
if (b == 0)
{
DBGPRINTF("********************** CANNOT WRITE TO FILE");
}

IFILE_Release(pFile);
pFile=NULL;
}

I added external class ID , set ACL... everything but can't. I used this function and it is OK to write files in Memory Handset. Why? Please help me! Thanks.