GetPaperInfo

 

#include “BlackIceDEVMODE.h”

 

DWORD        GetPaperInfo(BlackIceDEVMODE* pDevMode, LPCTSTR szPaperName, DWORD* pWidth, DWORD* pHeight, DWORD* pUnit);

Description

Retrieves information about a paper size specified by its name.

Parameters

BlackIceDEVMODE* pDevMode:

Pointer to the BlackIceDEVMODE structure of the printer.

 

LPCTSTR szPaperName:

Name of the existing paper size.

 

DWORD* pWidth:

Pointer to an integer that will receive the width of the paper size. The pUnit parameter specifies the units.

 

DWORD* pHeight:

Pointer to an integer that will receive the height of the paper size. The pUnit parameter specifies the units.

 

DWORD* pUnit:

Pointer to an integer that will receive the units of pWidth and pHeight. The unit can be one of the following values:

0: hundredths of inches

1: teths of millimeters

2: pixels

 

Return value

On success: The windows paper code of the specified paper that can be used with the SetPaperSize function.

The function returns 0, if an error happens or the paper with the given name does not exist.

Programming Notes

None

Code Example

None