|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| No
| Import Library
| winspool.lib
| Header File
| winspool.h
| Unicode
| WinNT
| Platform Notes
| None
|
|
|
AddJob
The AddJob function obtains a path string that specifies a file that you can use to
store a spooled print job.
BOOL AddJob(
HANDLE hPrinter,
| // specifies printer for the print job
| DWORD Level,
| // specifies version of print job information data structure
| LPBYTE pData,
| // pointer to buffer to receive print job information data
| DWORD cbBuf,
| // specifies size of buffer pointed to by pData
| LPDWORD pcbNeeded
| // pointer to variable to receive size of print job information data
| );
|
|
Parameters
hPrinter
Handle that specifies the printer for the print job. This must be a local
printer that is configured as a spooled printer. If hPrinter is a handle to a remote printer connection, or if the printer is configured
for direct printing, the AddJob function fails.
Level
Specifies the version of the print job information data structure that the
function stores into the buffer pointed to by pData. Set this parameter to one.
pData
Pointer to a buffer to receive an ADDJOB_INFO_1 data structure and a path string.
cbBuf
Specifies the size, in bytes, of the buffer pointed to by pData. The buffer needs to be large enough to contain an ADDJOB_INFO_1 structure and a path string.
pcbNeeded
Pointer to a variable to receive the total size, in bytes, of the ADDJOB_INFO_1 data structure plus the path string. If this value is less than or equal to cbBuf and the function succeeds, this is the actual number of bytes written to the
buffer pointed to by pData. If this number is greater than cbBuf, the buffer is too small, and you must call the function again with a buffer
size at least as large as *pcbNeeded.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error
information, call GetLastError.
Remarks
You can call the CreateFile function to open the spool file specified by the Path member of the ADDJOB_INFO_1 structure, and then call the WriteFile function to write print job data to it. Once that is done, call ScheduleJob to notify the print spooler that the print job can now be scheduled by the
spooler for printing.
See Also
ADDJOB_INFO_1, CreateFile, OpenPrinter, ScheduleJob, WriteFile
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|