Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Create a thread in dll

2 replies · 6,224 views · Started 28 October 2003

I am programming a dll and a app for p800. The app calls a specific function in a dll. This specific function will create a thread as follows.

RThread rThread;

TInt result = rThread.Create( ThreadName,ThreadFunction, KDefaultStackSize, KMinHeapSize, 0x800, NULL, EOwnerThread) ;

ThreadFunction will then continuously running. When I click any control on the app, the following error occurs in the app: E32USER-CBASE 46. Do anyone have any idea?

In fact, I want to code a dll to continuously monitor something. I can only think of creating a new thread to do this. Do anyone have any other suggestion?

Thx in advance.

Hey,

Your thread is getting a STRAY signal. It means:

1. Either you are forgetting to call SetActive() on an Active Object in your new thread
or
2. The iStatus field of your AO is incorrectly getting set to something other than KRequestPending while the active object is already active.

Posting more code over here would help us to tell you mroe on this!!

-Viren

========================

cwp wrote:I am programming a dll and a app for p800. The app calls a specific function in a dll. This specific function will create a thread as follows.

RThread rThread;

TInt result = rThread.Create( ThreadName,ThreadFunction, KDefaultStackSize, KMinHeapSize, 0x800, NULL, EOwnerThread) ;

ThreadFunction will then continuously running. When I click any control on the app, the following error occurs in the app: E32USER-CBASE 46. Do anyone have any idea?

In fact, I want to code a dll to continuously monitor something. I can only think of creating a new thread to do this. Do anyone have any other suggestion?

Thx in advance.