Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting a printer with net use
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Selecting a printer with net use
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01025501
Message ID:
01025501
Vues:
90
Hi.
I need to capture (NET USE) a printer depending on a value stored in a table (mydata.dbf)..
I've tryed this:
DECLARE INTEGER ShellExecute IN shell32.dll ; 
INTEGER hndWin, ; 
STRING cAction, ; 
STRING cFileName, ; 
STRING cParams, ; 
STRING cDir, ; 
INTEGER nShowWin
if mydata.impresora="01"
     cFileName = "NET USE LPT1: \\ADMINISTRACION\laserjet" 
else
     cFileName = "NET USE LPT1: \\ADMINISTRACION\epsonlx"
endif
cAction = "open" 
ShellExecute(0,cAction,cFileName,"","",1)
But it doesn't work..
I'm shure the mistake is when assigning the cFileName parameter, but i don't know how to work with it..

Any help?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform