# PDL_isAppLicensedForDevice

This API allows Plug-in apps to check if the app has been licensed for the host device.

The first time the app runs and the call is made, the API goes over the network to Palm to verify the license. If licensed, the result is cached and the call always returns 1 each time the app is run after that. Failure always results in the API's trying again.

## Syntax

>     int PDL_isAppLicensedForDevice(const char *appid);

Argument | Description
--- | ---
appid | Application ID, i.e., "com.mycompany.myapp"

## Returns

>     0 - The app is not licensed.
>     1 - The app is licensed.

## Example

>     if (PDL_isAppLicensedForDevice("com.mycompany.myapp") ==0)
>       fprintf(stdout, "This device is not licensed for this application");
>     else
>       fprintf(stdout, "This device is licensed for this application");

To include this call in your make file, use the -lcplite option to link with the copy protection library that comes with the PDK.

Note:

If your app is using copy protection, you should make sure your executable is stripped of symbols. You can use the strip utility program that comes with the ARM compiler to remove symbols from your executable.

In Windows, you can find this utility at `C:\\Program Files\\CodeSourcery\\Sourcery G++ Lite\\arm-none-linux-gnueabi\\bin\\strip.exe`. No output file needs to be specified; symbols are removed in-place.