symbian 线程问题
高手请进:
我现在建立一个线程
TInt result1 = iThread.Create(_L("ReadImage"),(TThreadFunction)ReadImageDraw, 4096,
KMinHeapSize, KMinHeapSize*1000*2, iEagleEyePlayContainer, EOwnerThread) ;
User::LeaveIfError(result1) ;
iThread.Resume();
线程体函数:static void ReadImageDraw(CEagleEyePlayContainer *iCEagleEyePlayContainer)
{
iCEagleEyePlayContainer->DrawImage();
}
void CEagleEyePlayContainer::DrawImage()
{
RFs fs;
fs.Connect();
RFbsSession::Connect(fs);
RWsSession session;
session.Connect(fs);
CFbsBitGc* bitgc = NULL;
CWsScreenDevice* screenDevice = new(ELeave)CWsScreenDevice(session);
// User::LeaveIfError(screenDevice->Construct());
CFbsScreenDevice* fbsDevice = CFbsScreenDevice::NewL(KNullDesC,screenDevice->DisplayMode());
User::LeaveIfError(fbsDevice->CreateContext(bitgc));
bitgc->BitBlt(TPoint(0,0),Playbmp);
delete bitgc;
delete screenDevice;
delete fbsDevice;
session.Close();
fs.Close();
}
程序执行到 CFbsScreenDevice* fbsDevice = CFbsScreenDevice::NewL(KNullDesC,screenDevice->DisplayMode());时就报错无效的窗口句柄,不知道怎么解决,请高手帮忙
或者有其他的办法可以实现在线程体函数里面绘制一幅图也可以
[解决办法]
难道没有人回答吗??
[解决办法]
检查前面函数的返回值。
[解决办法]