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


Home
QNX Community Resources
QNX Documentation Library
PtAppGetResources

PtAppGetResources

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

PtAppGetResources()

Retrieve one or more resource values for an application

Synopsis:

int PtAppGetResources(int n_args,
                      PtArg_t *args)

Arguments:

n_args
The number of items in the args array.
args
Indicates which resources are retrieved.

Library:

ph

Description:

This function sets pointers to resource values within the application.

You must initialize the args array with PtSetArg() or Pt_ARG() before calling PtAppGetResources(). The Pt type of a resource determines how that resource should be set or queried. You use the Pt type when setting a resource entry with PtSetArg(). For a list of application callbacks, see PtAppSetResources().

For more information, see the Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.


WARNING: Because PtAppGetResources() returns pointers directly into the internals of the widget, don't modify those values directly. If you wish to retrieve the value of a given resource and then modify that value:
  1. Get the resource.
  2. Copy the resource to a temporary variable.
  3. Modify the temporary variable.
  4. Using the modified copy, set the resource.

Returns:

0
Success.
-1
An error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAppAddCallback(), PtAppGetResource(), PtAppRemoveCallback(), PtAppSetResources(), PtAppSetResource(), PtSetArg().