Partager via


Parallel Port Driver API Test (Compact 7)

3/12/2014

The Parallel Port Test analyzes the functionality of the API set for a parallel port driver for Windows Embedded Compact.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the hardware requirement for the Parallel Port test.

Requirement Description

PCL printer

A Printer Control Language (PCL) printer attached to the parallel port of the Windows Embedded Compact device.

Subtests

The following table lists the subtests included in this test.

SubTest ID Description

1000

Open/Close Port

Verifies that the CreateFile function call succeeds on the specified device attached to the parallel port. Fails if the parallel port driver is unable to communicate with the attached printer.

1001

Read/Set Timeouts (IOCTL)

Verifies that the IOCTL_PARALLEL_SET_TIMEOUTS and IOCTL_PARALLEL_GET_TIMEOUTS I/O control codes (IOCTLs) successfully set and retrieve timeout values for the parallel port. Fails if the parallel port driver does not support the tested IOCTLs. Also fails if the parallel port driver is unable to communicate with the attached printer.

1002

Read/Set Timeouts (Win32)

Verifies that the SetCommTimeouts and GetCommTimeouts function calls successfully set and retrieve timeout values for the parallel port. Fails if the parallel port driver does not support timeouts. Also fails if the parallel port driver is unable to communicate with the attached printer.

1003

Get Device Status

Verifies that the IOCTL_PARALLEL_STATUS IOCTL behaves properly. Fails if the parallel port driver does not support the tested IOCTL. Also fails if the parallel port driver is unable to communicate with the attached printer.

1004

Write Bytes (IOCTL)

Verifies that the IOCTL_PARALLEL_WRITE IOCTL behaves properly. Fails if the parallel port driver does not support the tested IOCTL. Also fails if the parallel port driver is unable to communicate with the attached printer.

1005

Write Bytes (Win32)

Verifies that the WriteFile function behaves properly on an open parallel port handle. Fails if the parallel port driver does not export a function for writing. Also fails if the parallel port driver is unable to communicate with the attached printer

1006

Get Device ID

Verifies that the IOCTL_PARALLEL_GETDEVICEID IOCTL behaves properly. Fails if the parallel port driver does not support the tested IOCTL. Also fails if the parallel port driver is unable to communicate with the attached printer.

Setting Up the Test

Ensure that the printer is attached to the parallel port of the Windows Embedded Compact -based device.

Running the Test

The Parallel Port Test executes the tux -o -d partest command line on default execution. You can modify the test by editing the command line. The following table shows the command-line parameter for the test.

Command line parameter Description

-d LPTx

Specifies the "x" device name of the parallel port to test. The default value is LPT1.

Verifying the Test

When the test completes, verify that "PASS" appears in the test log for all subtests.

Troubleshooting the Test

  1. Make sure the parallel port connection is not loose.
  2. Ensure that the printer supports the PCL protocol.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Communication Bus Tests