-
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 !
-
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
-
Oh yeah, look at EnumJobs in the platform SDK - it tells you exactly what to pass and how.
-
Where can I download the Platform SDK?
-
Here: http://www.microsoft.com/msdownload/...uplauncher.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 ;).
-
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 ?!!
-
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
-
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: [email protected]
ICQ: 33122184