DlpCallApplication(3)

NAME
DlpCallApplication - run a program on a PalmOS device

LIBRARY
libpconn

SYNOPSIS
#include <palm.h>
#include <pconn/pconn.h>
int
DlpCallApplication(PConnection *pconn, const udword version, const struct dlp_appcall *appcall, const udword paramsize, const ubyte *param, struct dlp_appresult *appresult);

DESCRIPTION
DlpCallApplication calls a Palm application via an action code.

version specifies the version of PalmOS on the Palm. This is because the API of this function changed between 1.0 and 2.0. In practice, you can simply set version to 0x02000000 for a Palm running PalmOS 2.0 or later.

appcall specifies the application to run. It is of the following form:

    struct dlp_appcall
    {
    	udword creator;
    	udword type;
    	uword action;
    };

where appcall.creator is the application's four-letter creator, appcall.type is its executable type, and appcall.action is the action code. Presumably this makes sense to people who write PalmOS programs.

paramsize specifies the size of the parameter.

param is the parameter data.

appresult will be filled in with the result of running the program. It is of the following form:

    struct dlp_appresult
    {
    	uword action;
    	udword result;
    	udword size;
    	ubyte data[2048];
    };

where appresult.action is the action code with which the application was called, appresult.result is the exit value, appresult.size is the size of appresult.data, and appresult.data is the returned data.

RETURN VALUE

SEE ALSO
libpconn(3), new_PConnection(3).

BUGS
This function has barely been tested. It may not work.

The API could use a lot of work.