please dont rip this site Prev Next

AddJob info  Overview  Group

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 

See


file: /Techref/os/win/api/win32/func/src/f01_6.htm, 5KB, , updated: 2002/11/1 18:03, local time: 2024/11/12 21:39,
TOP NEW HELP FIND: 
18.223.125.42:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/os/win/api/win32/func/src/f01_6.htm"> AddJob</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .