Skip navigation.
Home
The QNX Community Portal

View topic - Reasons why ApCreateModule may fail

Reasons why ApCreateModule may fail

Isn't the name clear?

Reasons why ApCreateModule may fail

Postby alj1990 » Fri Dec 05, 2008 7:48 pm

Does anyone have the knowledge of the specific reasons why the ApCreateModule call may return NULL on occasion? It seems that 99.99% of the time, the same code works with no issues at all.

The Photon Library Reference documentation states for ApCreateModule,
"Returns: A pointer to the instance of the created module, or NULL if an error occurred or a setup function aborted the creation."


I am looking for specifics on "NULL if an error occurred."

Thanks in advance for any information.
alj1990
New Member
 
Posts: 2
Joined: Fri Dec 05, 2008 7:35 pm

RE: Reasons why ApCreateModule may fail

Postby ysinitsky » Fri Dec 05, 2008 8:55 pm

If the return value is NULL, what does
strerror( errno );
say?
ysinitsky
Senior Member
 
Posts: 164
Joined: Wed Dec 14, 2005 8:46 pm

Postby alj1990 » Fri Dec 05, 2008 9:11 pm

Does strerror(errno) actually return the error for the failure of ApCreateModule?

Since the failure of ApCreateModule occurs so rarely, I am not sure how to reproduce the error to be able to use strerror in order to determine the error code.

Hope I understood your post.
alj1990
New Member
 
Posts: 2
Joined: Fri Dec 05, 2008 7:35 pm

Postby micro » Mon Dec 08, 2008 3:43 pm

why not use a if-statement for deciding if it was NULL and then put sterror(errno)
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests