Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetresource.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetresource.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetresource.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetresource.html on line 8

PtAppSetResource()

Set a single application callback resource

Synopsis:

#define PtAppSetResource( type, value, len ) ...

Arguments:

type
The resource manifest.
value
The value of the argument being passed.
len
Depends on the type of resource.

Library:

ph

Description:

This function sets a resource for the application. The type argument contains the resource manifest and value contains the value of the argument being passed. The way the len argument is used depends on the resource type. 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.

Returns:

0
Success.
-1
An error occurred.

Examples:

int exit_cb(void *data,
            PtCallbackInfo_t *cbinfo)
{
  printf( "I\'m exiting\n" );
  return( Pt_CONTINUE );
};
...
    PtAppCallback_t exit_callback = {exit_cb, NULL}};
    PtAppSetResource(Pt_CB_APP_EXIT, &exit_callback, 0);

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

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


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetresource.html on line 130

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetresource.html on line 130