Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking LPT1 printer online
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00308803
Message ID:
00309504
Vues:
56
George,

>One of the reasons (there are many) I'm switching is to familiarize myself >with NT functionality and its API. I just can't stay 'way from this low level stuff.:-)

Its funny you mention that, I was just talking to someone about how alluring this whole low level stuff is, and to date, I have yet to use any of it in work-related code. :)

I am looking at some NT specific API functions:
FindNextPrinterChangeNotification
FindFirstPrinterChangeNotification
FindClosePrinterChangeNotification

These are all in winspool.drv as are OpenPrinter, and ClosePrinter (to get and release a handle to a printer respectively)

Now I was going to say that I was going to play with these, and get back to you, but I can't get the printer handle with OpenPrinter:

DECLARE INTEGER OpenPrinter IN "winspool.drv" AS OpenPrinterA STRING, @INTEGER, INTEGER
DECLARE INTEGER ClosePrinter IN "winspool.drv" LONG

PRIVATE ln_handle
ln_success = 0
ln_handle = 0

ln_successs = OpenPrinterA(GETPRINTER(),@ln_handle,0) &&Error here
...


comes back with an error "Too Many Arguments"

I am somewhat stumped. Any ideas?

As for the find functions, they get information like unable to connect to printer, and print job completed back from a printer or print driver. There are several flags that can be set (check them out in MSDN). There are also some structures involved so I thought this would give me an excuse to download Christof's Struct Class, but I am going to have to wait on that.

Anyway, I suffer from the same fascination with Low Level stuff you do George, so any insight here will be appreciated. I am not sure how if at all, this will help Andrus, but now I'm curious what info these functions will return.

Best,
Bill
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform