beautypg.com

Avery Dennison 6035 Programmer Manual Rev.CA 6/01 User Manual

Page 57

background image

4-16 Programmer’s Manual

unsigned short far pascal StockPrompt

(unsigned short far * lpusLenInches,

unsigned short far * lpusWidthInches);

void main()

{

PRINTINIT rConfig;

unsigned short usStatus = 0;

/* Initialize printer with no font storage */

rConfig.lpuchFntAddr = 0;

rConfig.ulFntSize = 0;

usStatus = pcl

I

nit(&rConfig);

if (usStatus != 0)

{

printf("Init Failed \nError: %d", usStatus);

exit(1);

}

/* Calibrate with the function doing all the prompts */

usStatus = pclCalibrate(0xFFFF, 0xFFFF, 0xFFFF, 0, 0);

if (usStatus != 0)

{

printf("Calibrate Failed \nError: %u", usStatus);

pclClose();

exit(1);

}

/* Calibrate with constant 2" width and paper type */

/* Let function prompt for the stock length */

usStatus = pclCalibrate(0xFFFF, 200, MMS_LOW_ENERGY, 0, 0);

if (usStatus != 0)

{

printf("Calibrate Failed \nError: %u", usStatus);

pclClose();

exit(1);

}

/* Calibrate paper but use our callback function to prompt */

usStatus = pclCalibrate(0, 0, 0, StockTypePrompt,

StockPrompt);