|
|
User login
Feeds |
Problems creating a CFbsBitmap object in a thread.
|
|||||
| Tue, 2005-08-02 14:49 | |
|
Hello All,
I am facing a problem in creating the CFbsBitmap in a thread. Below are the steps that i am doing. 1. There is Application UI thread (Say Hello World App's). 2. Creating a new thread in the UI thread. 3. In the new thread created, doing the following things. TSize Size(352,288); CFbsBitmap* Temp_Image=(CFbsBitmap*)new CFbsBitmap; TInt Err = Temp_Image->Create(Size,EColor64K); if(Err != KErrNone) { RDebug::Printf("\nUnable to allocate mem for image--Error = %d", Err); } This prints "Unable to allocate mem for image--Error = -34", which means (KErrCouldNotConnect ) unable to connect to the font and bitmap server. I am not getting why it is returning like this. Do i need to do something else before calling a Create() on CFbsBitmap object?? Please help Thanks in Advance Pinky |
|
Forum posts: 6
Try calling:
Temp_Image -> Reset();
before calling Create()
Forum posts: 5
RFbsSession fbsSession;
if(bInThread)
err = fbsSession.Connect();
for creating bitmaps in thread...
Forum posts: 35
Thanks very much. RFbsSession worked for me. And i learned a new thing too
Thanks again
Pinky
Forum posts: 122
RFbsSession::Connect();
// .. some work here
RFbsSession::Disconnect();
Forum posts: 59
I tried using RFbsSession::Connect for creating a Bitmap in an EXE.
But the connect itself fails with -1.
I am trying it on emulator.
Can u pleasehelp me