How To Send Raw Data to a Printer Using the Win32 API from Visual Basic (154078)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q154078 SUMMARY
The Visual Basic Printer object allows for printing through printer drivers, but there may be times when it is desirable to use the Win32 API to send information more directly to the printer. The code sample to follow shows how to achieve this by using API functions that bypass printer drivers to communicate directly with the print spooler.
REFERENCES
The Win32 SDK Help files give a more detailed description of the APIs used
in the sample.
For information on the same procedure for VC++, please see the following
article in the Microsoft Knowledge Base:
138594
: How To Send Raw Data to a Printer by Using the Win32 API
Modification Type: | Minor | Last Reviewed: | 8/30/2004 |
---|
Keywords: | kbAPI kbhowto kbprint KB154078 |
---|
|