Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove Windows Printer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00420415
Message ID:
00420469
Vues:
13
Denis,

I just tested WNetCancelConnection2() and it doesn't work on a local printer. The following will
DECLARE INTEGER OpenPrinter IN winspool.drv;
  STRING @lpname, INTEGER @hPrinter, STRING @pDevMode
DECLARE INTEGER DeletePrinter IN winspool.drv;
  INTEGER hPrinter
DECLARE INTEGER ClosePrinter IN winspool.drv;
  INTEGER hPrinter
lcname = "LPT1:"
lnhandle = 0
IF OpenPrinter(@lcname, @lnhandle, 0) # 0
  = DeletePrinter(lnhandle)
  = ClosePrinter(lnhandle)
ELSE
  ? "Can't open printer!"
ENDIF
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform