Results 1 to 8 of 8

Thread: EnumJobs

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2

    Question

    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 !

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Oh yeah, look at EnumJobs in the platform SDK - it tells you exactly what to pass and how.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Where can I download the Platform SDK?

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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 .
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2

    Lightbulb

    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 ?!!

  7. #7
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    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
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  8. #8
    Member
    Join Date
    Aug 2000
    Posts
    60

    Cool

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width