PDA

Click to See Complete Forum and Search --> : EnumJobs


hp320
Aug 20th, 2000, 02:01 AM
Hi !

Anyone used EnumJobs of winspool.drv before ?

Public Declare Function EnumJobs Lib "winspool.drv" Alias "EnumJobsA" (ByVal HPrinter As Long, ByVal FirstJob As Long, ByVal NoJobs As Long, ByVal Level As Long, pJob As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long

if yes, please tell me how to convert pJob (BYTE) to JOB_INFO_1.

Thanks in advance !

parksie
Aug 20th, 2000, 05:44 AM
It wants a pointer, so just change "pJob As Byte" to "pJob As JOB_INFO_1". It might not work, but it's a start

parksie
Aug 20th, 2000, 05:45 AM
Oh yeah, look at EnumJobs in the platform SDK - it tells you exactly what to pass and how.

oetje
Aug 20th, 2000, 05:47 AM
Where can I download the Platform SDK?

parksie
Aug 20th, 2000, 05:52 AM
Here: http://www.microsoft.com/msdownload/platformsdk/setuplauncher.htm

It's about 600megs full, but you only download what you need. (it comes down to about 20megs). What I did, though, was download the launcher, then run that from my computer. Obviously, it couldn't find the files, so I downloaded them separately through an FTP program. This is because I reinstall windows so much I didn't want to lose about 150megs of downloaded SDK ;).

hp320
Aug 20th, 2000, 10:23 PM
Thanks parksie ! I'll look into that.

Actually, I am trying to write a vb program that will monitor the printer usage. I like to intercept the print job before going to the Printer (eg: display/pause/delete the print jobs) dunno whether it is possible for not ?!!

gwdash
Aug 21st, 2000, 11:22 AM
i'm trying to do the same thing. i found out if you have nt, you can use FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification, and FindClosePrinterChangeNotification. I have a general idea how to use them from the platform SDK and from an example for FindNextFileChangeNotification(or something like that).

I don't have solid code, yet:P
Hoping to find some, an other wayo do this is welcome

gfrench
Aug 24th, 2000, 05:20 PM
I have the code, it is rather slow to monitor jobs like that, you do really need to use the FindFirstPrinterChangeNotification but i don't yet know how to use it. Still if you want the code just contact me, it is too big to post on this site.

Hope i can be of use to you


Grant French
E-Mail: grant.french@libertysurf.co.uk
ICQ: 33122184