Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PtGetStruct

PtGetStruct

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PtGetStruct()

Retrieve the specified resource

Synopsis:

int PtGetStruct( char *base, 
                 PtResourceRec_t const *mod, 
                 PtArg_t *arg );

Arguments:

base
The base address in the widget from which to fetch the resource.
mod
The resource record for the resource.
arg
A pointer to a PtArg_t structure (see the Photon Library Reference) that describes the resource you want to retrieve. For more information, see below.

Description:

This function retrieves the resource specified by arg from the widget at address base as described by mod.

If the value and len members of arg are non-NULL, they're assumed to contain the addresses of pointers of the type appropriate for the resource. The pointers are set to point to the resource's value in the widget's internal memory.


Note: Don't use these pointers to change the resource's value.

If either of the value and len members of arg is NULL, the retrieved resources are stored in these members.

Returns:

0
Successful completion.
-1
An error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtSetStruct(), PtSuperClassGetResources(), PtSuperClassSetResources()

PtArg_t in the Photon Library Reference