Hello
I am trying to get a directory listing in another thread in my GapiDraw app. I create the thread like this
iProcessPhotos.Create( _L("ProcessPhotos") ,Init, 1024*256, 1024*1024, 1024*1024*2,this);
iProcessPhotos.Resume();
TInt CMyApplication::Init(TAny *aPtr)
{
RFs session;
session.Connect();
_LIT(aScanDir,"E:\\Images\\");
//TRAPD(err, session.MkDir(aScanDir)); this works
CDir* fileList;
CDir* dirList;
session.GetDir(aScanDir,KEntryAttNormal,ESortByName,fileList,dirList);
delete fileList;
delete dirList;
session.Close();
return KErrNone;
}
I can make a directory using
//TRAPD(err, session.MkDir(aScanDir)); this works
, but the thread seems to hang on GetDir method. I have tried using TRAP to catch the error but nothing is returned. I have also tried using RThread().SetExceptionHandler method to catch an error but have had no luck.
I define the Thread in myapplication.h
Any ideas
Thanks in Advance
Dynz
I am trying to get a directory listing in another thread in my GapiDraw app. I create the thread like this
iProcessPhotos.Create( _L("ProcessPhotos") ,Init, 1024*256, 1024*1024, 1024*1024*2,this);
iProcessPhotos.Resume();
TInt CMyApplication::Init(TAny *aPtr)
{
RFs session;
session.Connect();
_LIT(aScanDir,"E:\\Images\\");
//TRAPD(err, session.MkDir(aScanDir)); this works
CDir* fileList;
CDir* dirList;
session.GetDir(aScanDir,KEntryAttNormal,ESortByName,fileList,dirList);
delete fileList;
delete dirList;
session.Close();
return KErrNone;
}
I can make a directory using
//TRAPD(err, session.MkDir(aScanDir)); this works
, but the thread seems to hang on GetDir method. I have tried using TRAP to catch the error but nothing is returned. I have also tried using RThread().SetExceptionHandler method to catch an error but have had no luck.
I define the Thread in myapplication.h
Any ideas
Thanks in Advance
Dynz