Windows Printer Driver Development notes (2)

Source: Internet
Author: User
This section describes how to write rendering plug-ins.

This plug-in is a COM component and needs to provide the system with a COM component of ipr1_emuni2 interface.

The important functions are:
1. enabledriver
2. disabledriver
Register an array of function pointers in enabledriver. These functions are used to hook the corresponding DDI Interpretation Section. In this way, the default universal printer driver behavior can be changed.

3.
Enablepdev creates a Data Structure customized by the printer vendor, and then initializes the data structure.
4.
Disablepdev is responsible for recycling the memory occupied by this data structure.

Important Data Structure
Typedef struct _ javasbj {
DWORD dwsize; // the size of the Data Structure
P0000em p0000em; // pointer to the custom OEM Data Structure
Handle hengine; // handle of the physical device
Handle hprinter; // printer handle
Handle hoem;
Pdevmode ppublicdm;
Pvoid poemdm;
Pdrvprocs;
} Mongobj;

5.
The getinfo function is used to obtain some printer information.

6. publishdriverinterface
This function can be used to obtain

Iprintoemdriveruni interface pointer, which is very useful and can call some functions provided by the universal printer driver.
For example, output a command to the printer, drvwritespoolbuf.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.