SetRegistrationCode

Description

Enables support for third-party software packages that require a registration code.

Syntax

SetRegistrationCode ( idPackage, regvalue )

Argument

Description

idPackage

An integer that references the software package on the Pocket PC device or emulator. Currently, the only recognized value is 1. This value references the FieldSoftware PrinterCE SDK.

regvalue

A string that sets the registration code supplied by the third-party software.

Returns

Integer. Returns 1 for success and -1 for failure. When an application is running on the desktop or in the development environment, SetRegistrationCode always returns -1.

Usage

Before you call print functions from an application that you deploy to a Pocket PC device or emulator, you can supply the registration code for third-party print software in the regvalue argument to the SetRegistrationCode function.

If you do not call SetRegistrationCode before you try to print from a deployed application, PocketBuilder assumes you are using an evaluation copy of the FieldSoftware PrinterCE SDK and attempts to make application print function calls using the evaluation software.

Examples

Example 1

These statements in a Clicked event send the registration code for authorized use of the FieldSoftware PrinterCE SDK from a Pocket PC, then access this software to print the current page.

integer li_return

long ll_job

li_return = SetRegistrationCode(1,"555A55B555")

ll_job = PrintOpen("myprintjob")

li_return = PrintPage (li_job)

li_return = PrintClose (li_job)

See also