Zebra Technologies ZQ110 Printer User manual

Add to My manuals
25 Pages

advertisement

Zebra Technologies ZQ110 Printer User manual | Manualzz

ZQ110

Mobile Printer Windows SDK

API Reference Guide

P1069074-001

Rev.

A

ZQ110

Table of Contents

1. Manual Information ........................................................................................................ 6

1-1 Supported Operating System (OS) & Platform ........................................................... 6

1-2 Supporting Devices ..................................................................................................... 6

2. Properties ....................................................................................................................... 7

2-1 CharacterSet (LONG R/W) ......................................................................................... 7

2-2 International CharacterSet (LONG R/W) .................................................................... 8

2-3 State (LONG R) .......................................................................................................... 8

2-4 PowerValue (LONG R) ............................................................................................... 9

2-5 MsrMsgMode (BOOL W) ............................................................................................ 9

3. Methods ........................................................................................................................ 10

3-1 PrinterOpen .............................................................................................................. 10

3-2 PrinterClose .............................................................................................................. 11

3-3 LineFeed ................................................................................................................... 11

3-4 PrintBarcode ............................................................................................................. 12

3-5 PrintText .................................................................................................................... 14

3-6 PrintBitmap ............................................................................................................... 16

3-7 CheckPrinter ............................................................................................................. 17

3-8 MsrReadReady ......................................................................................................... 17

3-9 MsrReadCancel ........................................................................................................ 18

3-10 MsrReadTrack ........................................................................................................ 18

3-11 DirectIO ................................................................................................................... 19

3-12 NextPrintPos ........................................................................................................... 20

3-13 GetTrack1 ............................................................................................................... 20

3-14 GetTrack2 ............................................................................................................... 20

3-15 GetTrack3 ............................................................................................................... 21

3-16 MsrReadFullTrack................................................................................................... 21

3-17 MsrRead1Track ...................................................................................................... 22

3-18 MsrRead2Track ...................................................................................................... 22

3-19 MsrRead3Track ...................................................................................................... 23

4. Message ........................................................................................................................ 24

4-1 BXL_LPARAM _MSR ............................................................................................... 24

Rev. 1.00 - 2 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

Proprietary Statements

This manual contains proprietary information for Zebra Technologies Corporation. It is intended solely for the information and use of parties operating and maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed to any other parties for any other purpose without the expressed written permission of Zebra Technologies Corporation.

Product Improvements

Since continuous product improvement is a policy of Zebra Technologies Corporation, all specifications and signs are subject to change without notice.

FCC Compliance Statement

NOTE: This equipment has been tested and found to comply with the limits of a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference with radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:

• Reorient or relocate the receiving antenna.

• Increase the separation between the equipment and the receiver.

• Connect the equipment to an outlet or circuit different from that to which the receiver is connected.

• Consult the dealer or an experienced radio/TV technician for help.

WARNING: Exposure to Radio Frequency radiation. To conform to FCC RF exposure requirements this device shall be used in accordance with the operating conditions and instructions listed in this manual.

NOTE: This unit was tested with shielded cables on the peripheral devices. Shielded cables must be used with the unit to ensure compliance.

Changes or modifications to this unit not expressly approved by Zebra Technologies

Cor poration could void the user’s authority to operate this equipment.

Rev. 1.00 - 3 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

Canadian Compliance Statement

This Class B digital apparatus complies with Canadian ICES-003.

Cet appareil numérique de la classe B est conforme á la norme NMB-003 du Canada.

“IC:” before the equipment certification number signifies that the Industry Canada technical specifications were met. It does not guarantee that the certified product will operate to the user’s satisfaction.

Liability Disclaimer

Inasmuch as every effort has been made to supply accurate information in this manual,

Zebra Technologies Corporation is not liable for any erroneous information or omissions.

Zebra Technologies Corporation reserves the right to correct any such errors and disclaims liability resulting therefrom.

No Liability for Consequential Damage

In no event shall Zebra Technologies Corporation or anyone else involved in the creation, production, or delivery of the accompanying product (including hardware and software) be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or the results of use of or inability to use such product, even if Zebra Technologies Corporation has been advised of the possibility of such damages.

Because some states do not allow the exclusion of liability for consequential or incidental damages, the above limitation may not apply to you.

Rev. 1.00 - 4 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

Copyrights

The copyrights in this manual and the label print engine described therein are owned by

Zebra Technologies Corporation. Unauthorized reproduction of this manual or the software in the label print engine may result in imprisonment of up to one year and fines of up to

$10,000 (17 U.S.C.506). Copyright violators may be subject to civil liability.

This product may contain ZPL® , ZPL II® , and ZebraLink

™ programs; Element Energy

Equalizer® Circuit; E3® ; and AGFA fonts. Software © ZIH Corp. All rights reserved worldwide.

ZebraLink and all product names and numbers are trademarks, and Zebra, the Zebra logo,

ZPL, ZPL II, Element Energy Equalizer Circuit, and E3 Circuit are registered trademarks of

ZIH Corp. All rights reserved worldwide.

Monotype® , Intellifont® and UFST® are trademarks of Monotype Imaging, Inc. registered in the United States Patent and Trademark Office and may be registered in certain jurisdictions.

Andy ™, CG Palacio™, CG Century Schoolbook™, CG Triumvirate™, CG Times™,

Monotype Kai

™, Monotype Mincho™ and Monotype Sung™ are trademarks of Monotype

Imaging, Inc. and may be registered in some jurisdictions.

HY Gothic Hangul ™ is a trademark of Hanyang Systems, Inc.

Angsana

™ is a trademark of Unity Progress Company (UPC) Limited.

Andale® , Arial® , Book Antiqua® , Corsiva® , Gill Sans® , Sorts® and Times New Roman® are trademarks of The Monotype Corporation registered in the United States Patent and

Trademark Office and may be registered in certain jurisdictions.

Century Gothic™, Bookman Old Style™ and Century Schoolbook™ are trademarks of The

Monotype Corporation and may be registered in certain jurisdictions.

HGPGothicB ™ is a trademark of the Ricoh company, Ltd. and may be registered in some jurisdictions.

Univers ™ is a trademark of Heidelberger Druckmaschinen AG, which may be registered in certain jurisdictions, exclusively licensed through Linotype Library GmbH, a wholly owned subsidiary of Heidelberger Druckmaschinen AG.

Futura® is a trademark of Bauer Types SA registered in the United States Patent and

Trademark Office and may be registered in some jurisdictions.

TrueType® is a trademark of Apple Computer, Inc. registered in the United States Patent and Trademark Office and may be registered in certain jurisdictions.

All other product names are the property of their respective owners.

All other brand names, product names, or trademarks belong to their respective holders.

© 2014 ZIH Corp.

Rev. 1.00 - 5 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

1. Manual Information

This SDK Manual provides information on the dll files required for Windows application program development.

1-1 Supported Operating System (OS) & Platform

Supported OS:

Microsoft Windows CE 5.x

Microsoft Windows XP

Microsoft Windows Vista

Microsoft Windows 7

Microsoft Windows 8

Supported Platform:

Pocket PC 2002

Pocket PC 2003

Pocket PC 2003 second edition

Windows Mobile 5

Windows Mobile 6

Custom Platform for Armv4i CPU

* Supported .Net Framework

1-2 Supporting Devices

This is a list of verified devices. If your PDA CPU type is Armv4 or Armv4i, it is compatible with the module driver.

Bluebird BIP-6000

Widefly WF35

HP iPAQ 212

Rev. 1.00 - 6 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

2. Properties

The constant values used in the dll files provided are declared in the BxlConst.h file.

The development environment was based on C++.

Code

BXL_CS_PC437

BXL_CS_KATAKANA

BXL_CS_PC850

BXL_CS_PC860

BXL_CS_PC863

BXL_CS_PC865

BXL_CS_WPC1252

BXL_CS_PC866

BXL_CS_PC852

BXL_CS_PC858

BXL_CS_PC864

BXL_CS_THAI42

BXL_CS_WPC1253

BXL_CS_WPC1254

BXL_CS_WPC1257

BXL_CS_FARSI

BXL_CS_WPC1251

BXL_CS_PC737

BXL_CS_PC775

BXL_CS_THAI14

BXL_CS_PC862

BXL_CS_PC855

BXL_CS_PC857

BXL_CS_PC928

BXL_CS_THAI16

BXL_CS_WPC1256

BXL_CS_PC1258

BXL_CS_KHMER

BXL_CS_PC1250

BXL_CS_LATIN9

BXL_CS_USER

2-1 CharacterSet (LONG R/W)

As the attribute that defines the Code Page of the printer, the default setting is

BXL_CS_437. Use the SetCharacterSet(), GetCharacterSet() functions to set values or recall previously set values.

The Code Pages that can be used are as follows:

27

28

29

30

31

33

36

37

38

39

40

41

42

47

48

255

Value

0

1

2

3

4

5

16

17

18

19

22

23

24

25

26

Description

Code page PC437

Katakana

Code page PC850

Code page PC860

Code page PC863

Code page PC865

Code page WPC1252

Code page PC866

Code page PC852

Code page PC858

Code page PC864

Code page THAI42

Code page WPC1253

Code page WPC1254

Code page WPC1257

Code page Farsi

Code page WPC1251

Code page PC737

Code page PC775

Code page THAI14

Code page PC862

Code page PC855

Code page PC857

Code page PC928

Code page THAI16

Code page PC1256

Code page PC1258

Code page KHMER

Code page PC1250

Code page Latin 9

User set page

Rev. 1.00 - 7 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

2-2 International CharacterSet (LONG R/W)

As the attribute that defines the International Character Set of the printer, the default setting is BXL_ICS_USA. Use the SetInterChrSet(), GetInterChrSet()functions to set values or recall previously set values.

The International Character Sets that can be used are as follows:

Code

BXL_ICS_USA

BXL_ICS_FRANCE

Value

0

1

Description

USA code setting

FRANCE code setting

BXL_ICS_GERMANY

BXL_ICS_UK

BXL_ICS_DENMARK1

BXL_ICS_SWEDEN

BXL_ICS_ITALY

BXL_ICS_SPAIN

BXL_ICS_NORWAY

BXL_ICS_DENMARK2

2

3

4

5

6

7

9

10

GERMANY code setting

UK code setting

DENMARK1 code setting

SWEDEN code setting

ITALY code setting

SPAIN code setting

NORWAY code setting

DENMARK 2 code setting

2-3 State (LONG R)

This attribute sets the printer State. It can only be read, and is automatically set when examining the printer state by using the CheckPrinter function. Note:State values can be set in duplication, each value can be confirmed via bit calculation. The values of this attribute can be recalled by using the GetState function.

Printer State values are as follows:

Code

BXL_STS_NORMAL

BXL_STS_PAPEREMPTY

BXL_STS_COVEROPEN

BXL_STS_POWEROVER

BXL_STS_MSR_READY

BXL_STS_PRINTING

Value

0

1

2

4

8

16

Description

Printer status is normal

No paper in printer

The printer paper cover is open

The printer battery capacity is insufficient

Currently in MSR read mode, printing not possible

Currently printing or transmitting data

BXL_STS_ERROR

BXL_STS_NOT_OPEN

32

64

BXL_STS_ERROR_OCCUR 128

An error has occurred

The printer is not open

An error has occurred

Rev. 1.00 - 8 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

2-4 PowerValue (LONG R)

This attribute sets the battery capacity value of the printer. It can only be read, and is set every time the status of the printer battery changes. The values of this attribute can be recalled by using the GetPowerValue function.

Battery Capacity values are as follows:

Code

BXL_PWR_HIGH

BXL_PWR_MIDDLE

BXL_PWR_LOW

BXL_PWR_SMALL

BXL_PWR_NOT

Value

0

1

2

3

4

Description

Battery charge status: 95%

Battery charge status: 85% or higher

Battery charge status: 50% or higher

Battery charge status: 25% or higher

Battery charge status: 25% or lower

2-5 MsrMsgMode (BOOL W)

This function sets MSR Message capacity value of the printer. The default setting is

FALSE. Use the SetMsrMsgMode() functions to set values. Default value is FALSE.

Battery Capacity values are as follows:

Code Value Description

TRUE

FALSE

0

1

Disable MSR Message functions

Enable MSR Message functions

Rev. 1.00 - 9 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3. Methods

The functions disclosed in the provided module are declared in the ExportFunc.h file. The development environment was based on C++.

3-1 PrinterOpen

In order to use the module, this function is enabled. For PDA types with different In/Out ports, port settings for each are required. In general, two-way communication is possible with just the strOutPortName setting. long PrinterOpen(

LPCTSTR strOutPortName,

Long lTimeout

);

[Parameters]

* strOutPortName

[in] Unicode Data ending with null. The virtual Serial Port number and Baudrate of the currently connected device is conveyed for printing. If strOutPortName is NULL, strOutPortName sets to In/Out data processing (for example, COM4:19200).

* lTimeout

[in] Specifies the timeout, in milliseconds, used to calculate the total timeout period for open operations.

[Return Values]

Code Value Description

BXL_SUCCESS

BXL_CREATE_ERROR

BXL_NOT_OPENED

0

102

101

Returns after function success

Failure to create communication target

Unable to open communication port

BXL_STATUS_ERROR

BXL_BAD_ARGUMENT

BXL_WRITE_ERROR

BXL_READ_ERROR

103

108

300

301

Error occurred during status check

Incorrect argument specified

Failure to transmit data

Error in received value or reception failure

Rev. 1.00 - 10 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-2 PrinterClose

This function disables the SDK module. Functions related to printing and MSR are no longer available for use. long PrinterClose();

[Parameters]

None

[Return Values]

Code

BXL_SUCCESS

Value

0

Description

Returns after function success

3-3 LineFeed

This function dictates line feeding to the integer value conveyed for printing. long LineFeed (

int nFeed,

);

[Parameters]

* nFeed

[in] The integer value conveys the number of lines for line feeding in the form of printing value.

[Return Values]

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_STATUS_ERROR

BXL_WRITE_ERROR

0

101

103

300

Returns after function success

Unable to open communication port

Error occurred during status check

Failure to transmit data

Rev. 1.00 - 11 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-4 PrintBarcode

This function supports the 1-dimension and 2-dimension barcode printing function. long PrintBarcode(

PCHAR Data, long symbology, long Height, long Width, long Alignment, long TextPosition

);

[Parameters]

* Data

[in] ANSI Code Data ending with null. Barcode data to be printed are conveyed.

* symbology

[in] Defines the barcode type. The barcode type is defined in BxlConst.h.

Code

BXL_BCS_UPCA

BXL_BCS_UPCE

Value Data Number Limit

101 11 ≤ n ≤ 12

102 11 ≤ n ≤ 12

Data Value Range

48 ≤ data ≤ 57

48 ≤ data ≤ 57

BXL_BCS_EAN13

BXL_BCS_JAN13

103

104

12 ≤ n ≤ 13 48 ≤ data ≤ 57

BXL_BCS_EAN8

BXL_BCS_JAN8

105

7 ≤ n ≤ 8 48 ≤ data ≤ 57

106

BXL_BCS_Code39 107 1 ≤ n ≤ 255

48 ≤ data ≤ 57, 65 ≤ data ≤ 90, data =32,36,37,43,45,46,47

BXL_BCS_ITF 108

1 ≤ n ≤ 255

(even number)

48 ≤ data ≤ 57

BXL_BCS_Codabar 109

BXL_BCS_Code93

BXL_BCS_Code128

BXL_BCS_PDF417

110

111

200

BXL_BCS_QRCODE 202~3

BXL_BCS_DATAMATRIX 204

BXL_BCS_GS1_xxxxx 50~64

BXL_BCS_AZTEC_xxxxx 210~212

1 ≤ n ≤ 255

1 ≤ n ≤ 255

2 ≤ n ≤ 255

Refer to Command

Manual

48 ≤ data ≤ 57, 65 ≤ data ≤ 68, data =36,43,45,46,47,58

0 ≤ data ≤ 127

0 ≤ data ≤ 127

0 ≤ data ≤ 255

0 ≤ data ≤ 255

0 ≤ data ≤ 255

0 ≤ data ≤ 255

0 ≤ data ≤ 255

* Height

[in] This value sets the barcode height in Dot units. The value range is 1~255 at one dimensional barcodes and GS1 UCC/EAN-128 barcode or the range is 1~8 at GS1

DataBar barcode. The other two dimensional barcodes are not affected by this value.

Rev. 1.00 - 12 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

* Width

[in] This value sets the barcode width according to a value range of 2~7 at one dimensional barcodes or the range is 1~8 at GS1 DataBar barcode and AZTEC barcode.

If the print area of the barcode exceeds the printing paper, barcode printing may not be possible.

The other Two dimensional barcodes are not affected by this value.

* Alignment

[in] This value sets the barcode alignment.

Code

BXL_ALIGNMENT_LEFT

BXL_ALIGNMENT_CENTER

Value

0

1

Description

Left-aligned

Centered

BXL_ALIGNMENT_RIGHT 2 Right-aligned

* Attribute

- This value sets the text position at one dimensional barcodes.

[in] This value sets the print position of the barcode data. Two dimensional barcodes have only the BXL_BC_TEXT_NONE value.

Code Value Description

BXL_BC_TEXT_NONE

BXL_BC_TEXT_ABOVE

0 Barcode data not printed

1 Barcode data printed above barcode

BXL_BC_TEXT_BELOW 2 Barcode data printed below barcode

- This values sets height of separator between 2D and 1D barcode symbol at GS1 barcode. The value is 1 or 2.

[Return Values]

Code

BXL_SUCCESS

Value

0

Description

Returns after function success

BXL_NOT_OPENED

BXL_STATUS_ERROR

BXL_WRITE_ERROR

BXL_BC_DATA_ERROR

BXL_BC_NOT_SUPPORT

101

103

300

500

501

Unable to open communication port

Error occurred during status check

Failure to transmit data

Error in barcode data

Barcode type not supported

Rev. 1.00 - 13 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-5 PrintText

This function supports the text printing function. long PrintText(

LPCTSTR Data,

long Alignment,

long Attribute,

long TextSize

);

[Parameters]

* Data

[in] Unicode Data ending with null. Conveys the barcode data to be printed.

* Alignment

[in] This value sets the barcode alignment.

Code

BXL_ALIGNMENT_LEFT

Value

0

Description

Left-aligned

BXL_ALIGNMENT_CENTER 1 Centered

BXL_ALIGNMENT_RIGHT 2 Right-aligned

* Attribute

[in] This value sets the text properties. The following values can be duplicated.

Code Value Description

BXL_FT_DEFAULT

BXL_FT_FONTB

BXL_FT_BOLD

BXL_FT_UNDERLINE

BXL_FT_REVERSE

0

1

2

4

8

Font A, print using the basic device font

Basic setting value

Set to Font B

Adds Bold lettering attribute

Adds Underlining attribute

Adds Reverse lettering attribute

Rev. 1.00 - 14 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

* TextSize

[in] This value sets the text size properties. The width and height values can be duplicated.

Code Value Description

BXL_TS_0WIDTH

BXL_TS_1WIDTH

BXL_TS_2WIDTH

BXL_TS_3WIDTH

BXL_TS_4WIDTH

0

16

32

48

64

Width magnification set to x1

Width magnification set to x2

Width magnification set to x3

Width magnification set to x4

Width magnification set to x5

BXL_TS_5WIDTH

BXL_TS_6WIDTH

BXL_TS_7WIDTH

Code

BXL_TS_0HEIGHT

BXL_TS_1HEIGHT

BXL_TS_2HEIGHT

BXL_TS_3HEIGHT

BXL_TS_4HEIGHT

BXL_TS_5HEIGHT

80

96

112

Value

0

1

2

3

4

5

6

7

Width magnification set to x6

Width magnification set to x7

Width magnification set to x8

Description

Height magnification set to x1

Height magnification set to x2

Height magnification set to x3

Height magnification set to x4

Height magnification set to x5

Height magnification set to x6

Height magnification set to x7

Height magnification set to x8

BXL_TS_6HEIGHT

BXL_TS_7HEIGHT

[Return Values]

Code

BXL_SUCCESS

BXL_NOT_OPENED

BXL_STATUS_ERROR

BXL_WRITE_ERROR

Value

0

101

103

300

Description

Returns after function success

Unable to open communication port

Error occurred during status check

Failure to transmit data

Rev. 1.00 - 15 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-6 PrintBitmap

This function prints image files. Only bmp files are supported. long PrintBitmap (

LPCTSTR FileName, long Width, long Alignment, long Level

);

[Parameters]

* FileName

[in] Expressed as a row of Unicode characters, the full path of the image file is set.

* Width

[in] This value is the width of the image file to be converted. The value range is 0~384.

When setting the value as below, the image size is modified to fit conditions.

Code

BXL_WIDTH_FULL

Value

-1

Description

Set to a value of 384, image is fit to full size of paper

No variation given to image size BXL_WIDTH_NONE -2

* Alignment

[in] This value sets the barcode alignment.

Code

BXL_ALIGNMENT_LEFT

Value

0

Description

Left-aligned

BXL_ALIGNMENT_CENTER

BXL_ALIGNMENT_RIGHT

1

2

Centered

Right-aligned

* Level

[in] This value sets the color level of the image. The value range is 0~100.

[Return Values]

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_STATUS_ERROR

BXL_WRITE_ERROR

0

101

103

300

BXL_BITMAPLOAD_ERROR 400

Returns after function success

Unable to open communication port

Error occurred during status check

Failure to transmit data

Failure to read image file

Rev. 1.00 - 16 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-7 CheckPrinter

This function checks the printer status and sets the printer status properties. long CheckPrinter ();

[Parameters]

None

[Return Values]

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_READ_ERROR

BXL_WRITE_ERROR

0

101

301

300

Returns after function success

Unable to open communication port

Failure to receive data

Failure to transmit data

3-8 MsrReadReady

This function switches the printer to MSR Ready status. Printing is not possible when in ready status. After returning via BXL_SUCCESS and if the State property is

BXL_STS_MSR_READY, the standby status is deemed normal. long CheckPrinter ();

[Parameters]

None

[Return Values]

Code

BXL_SUCCESS

BXL_NOT_OPENED

BXL_WRITE_ERROR

Value

0

101

300

Description

Returns after function success

Unable to open communication port

Failure to transmit data

Rev. 1.00 - 17 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-9 MsrReadCancel

This function deactivates the MSR Ready status of the printer.

Long MsrReadCancel();

[Parameters]

None

[Return Values]

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_WRITE_ERROR

BXLMSR_NOTREADY

BXLMSR_FAILEDMODE

0

101

300

602

601

Returns after function success

Unable to open communication port

Failure to transmit data

Not in READY status

In automatic read mode

3-10 MsrReadTrack

This function recalls MSR data. If the MSR is in read mode and BXLMSR_DATAEMPTY is returned, the card has not yet been read in the MSR. Scanning the card in the MSR again may be tried, or the MSRReadCancel function may be used to cancel read mode.

Long MsrReadTrack (

PCHAR Data1,

PCHAR Data2,

PCHAR Data3

);

[Parameters]

* PCHAR Data1

[in, out] MSR Data Track 1 read from the buffer defined by the caller.

* PCHAR Data2

[in, out] MSR Data Track 2 read from the buffer defined by the caller.

* PCHAR Data3

[in, out] MSR Data Track 3 read from the buffer defined by the caller.

[Return Values]

Code

BXL_SUCCESS

BXL_NOT_OPENED

BXL_WRITE_ERROR

BXLMSR_DATAEMPTY

Value

0

101

300

603

Description

Returns after function success

Unable to open communication port

Failure to transmit data

Not in READY status

Rev. 1.00 - 18 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-11 DirectIO

This function can send and read data defined by the user.

Long DirectIO (

PCHAR Data,

UINT uiWrite,

PCHAR pRequet,

UINT uiRead

);

[Parameters]

* PCHAR Data,

[in] Data to be sent to the printer, data is ANSI code

* UINT uiWrite

[in] Size of data to be sent to the printer

* PCHAR pRequet

[in, out] Sets the values read from the buffered defined by the caller

* UINT uiRead

[in, out] Converts the size of data to be read by the caller to the actual size of read data

[Return Values]

Code

BXL_SUCCESS

BXL_NOT_OPENED

BXL_STATUS_ERROR

BXL_WRITE_ERROR

BXL_READ_ERROR

Value

0

101

103

300

301

Description

Returns after function success

Unable to open communication port

Error occurred during status check

Failure to transmit data

Error in received value or reception failure

Rev. 1.00 - 19 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

3-12 NextPrintPos

If the label function is set, the paper is fed to the next printing position.

Long NextPrintPos ();

[Parameters]

* None

[Return Values]

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_STATUS_ERROR

BXL_WRITE_ERROR

0

101

103

300

Returns after function success

Unable to open communication port

Error occurred during status check

Failure to transmit data

3-13 GetTrack1

This function returns MSR Track1 data. If the MSR is in read mode and NULL is returned, the card has not yet been read by the MSR. Swipe the card again.

MSRReadCancel function can be used to cancel read mode.

TCHAR * GetTrack1 ();

[Parameters]

* None

[Return Values]

If the function is successful, MSR Track1 data will be returned. If it has failed, the function will return NULL pointer.

3-14 GetTrack2

This function returns MSR Track2 data. If the MSR is in read mode and NULL is returned, the card has not yet been read by the MSR. Swipe the card again.

MSRReadCancel function can be used to cancel read mode.

TCHAR * GetTrack2 ();

[Parameters]

* None

Rev. 1.00 - 20 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

[Return Values]

If the function is successful, MSR Track2 data will be returned. If it has failed, the function will return NULL pointer.

3-15 GetTrack3

This function returns MSR Track3 data. If the MSR is in read mode and NULL is returned, the card has not yet been read by the MSR. Swipe the card again.

MSRReadCancel function can be used to cancel read mode.

TCHAR * GetTrack3 ();

[Parameters]

* None

[Return Values]

If the function is successful, MSR Track2 data will be returned. If it has failed, the function will return NULL pointer.

3-16 MsrReadFullTrack

This function returns MSR Full Track data. If the MSR is in read mode and ERROR Code is returned, the card has not yet been read by the MSR. Swipe the card again.

MSRReadCancel function can be used to cancel read mode. long MsrReadFullTrack (PCHAR Track, UINT uiLength);

[Parameters]

* PCHAR Track

[in, out] MSR Track data read from the buffer defined by the caller.

If Printer sentinel mode is 0 or 1(None, Static), each Track, Track Data format set as below.

1,2,3 Track Format : [TRACK1 DATA] 0x1C [TRACK2 DATA] 0x1C [TRACK3 DATA]

1,3 Track Format : [TRACK1 DATA] 0x1C 0x1C [TRACK3 DATA]

If Printer sentinel mode is 2(Dynamic), Track Data format set as below.

1,2,3 Track Format : [TRACK1 DATA] [TRACK2 DATA] [TRACK3 DATA]

* UINT uiLength

[in] Size of Track buffer to be sent to the printer

Rev. 1.00 - 21 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

[Return Values]

If the function is successful, MSR Full track data will be returned. If it has failed, the function will return error code and NULL pointer.

Code

BXL_SUCCESS

BXL_NOT_OPENED

BXL_NOT_SUPPORT

BXLMSR_DATAEMPTY

Value

0

101

107

603

Description

Returns after function success

Unable to open communication port

If sentinel mode set 2, it isn ’t support

Not in READY status

3-17 MsrRead1Track

This function returns MSR 1 Track data. If the MSR is in read mode and ERROR Code is returned, the card has not yet been read by the MSR. Swipe the card again.

MSRReadCancel function can be used to cancel read mode. long MsrRead1Track (PCHAR Track, UINT uiLength);

[Parameters]

* PCHAR Track

[in, out] MSR Track data read from the buffer defined by the caller.

* UINT uiLength

[in] Size of Track buffer to be sent to the printer

[Return Values]

If the function is successful, MSR 1 track data will be returned. If it has failed, the function will return error code and NULL pointer.

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_NOT_SUPPORT

BXLMSR_DATAEMPTY

0

101

107

603

Returns after function success

Unable to open communication port

If sentinel mode set 2, it isn

’t support

Not in READY status

3-18 MsrRead2Track

This function returns MSR 2 Track data. If the MSR is in read mode and ERROR Code is returned, the card has not yet been read by the MSR. Strip the card with the MSR again.

MSRReadCancel function can be used to cancel read mode. long MsrRead2Track (PCHAR Track, UINT uiLength);

Rev. 1.00 - 22 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

[Parameters]

* PCHAR Track

[in, out] MSR Track data read from the buffer defined by the caller.

* UINT uiLength

[in] Size of Track buffer to be sent to the printer

[Return Values]

If the function is successful, MSR 2 track data will be returned. If it has failed, the function will return error code and NULL pointer.

Code

BXL_SUCCESS

BXL_NOT_OPENED

BXL_NOT_SUPPORT

BXLMSR_DATAEMPTY

Value

0

101

107

603

Description

Returns after function success

Unable to open communication port

If sentinel mode set 2, it isn ’t support

Not in READY status

3-19 MsrRead3Track

This function returns MSR 3 Track data. If the MSR is in read mode and ERROR Code is returned, the card has not yet been read by the MSR. Swipe the card again.

MSRReadCancel function can be used to cancel read mode. long MsrRead3Track (PCHAR Track, UINT uiLength);

[Parameters]

* PCHAR Track

[in, out] MSR Track data read from the buffer defined by the caller.

* UINT uiLength

[in] Size of Track buffer to be sent to the printer

[Return Values]

If the function is successful, MSR 3 track data will be returned. If it has failed, the function will return error code and NULL pointer.

Code Value Description

BXL_SUCCESS

BXL_NOT_OPENED

BXL_NOT_SUPPORT

BXLMSR_DATAEMPTY

0

101

107

603

Returns after function success

Unable to open communication port

If sentinel mode set 2, it isn

’t support

Not in READY status

Rev. 1.00 - 23 - Mobile Printer

Windows SDK API Reference Guide

ZQ110

4. Message

If some events have occurred in printer, the SDK will send WM_MSR_ARRIVED

(WM_USER+3) message.

4-1 BXL_LPARAM _MSR

This message will be posted when the printer reads MSR Track data from MSR sensor. lParam = 0 wParam

wParam is set by the following data.

Value

BXL_MSG_TRACK1

BXL_MSG_TRACK2

BXL_MSG_TRACK3

Example:

BXL_MSG_TRACK1 + BXL_MSG_TRACK2 = 0x03

Description

0x01

0x02

0x04

Rev. 1.00 - 24 - Mobile Printer

Windows SDK API Reference Guide

www.zebra.com

Zebra Technologies International, LLC Zebra Technologies Europe Limited

475 Half Day Road Dukes Meadow

Suite 500, Lincolnshire Millboard Road

Illinois 60069 USA Bourne End

Phone: +1.847.634.6700 Buckinghamshire, SL8 5XF, UK

Toll-Free: +1.800.230.9494 Phone: +44 (0)1628 556000

Fax: +1.847.913.8766 Fax: +44 (0)1628 556001

advertisement

Related manuals

Download PDF

advertisement