Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get printer network name using API for copyfile api
Message
De
05/03/2004 15:58:44
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Get printer network name using API for copyfile api
Divers
Thread ID:
00883676
Message ID:
00883676
Vues:
67
I am using copyfile api to send a file to a printer and it works great. However, I noticed today that it requires not the windows printer name (as we retrieve using getprinter() in vfp) but the sharename. Now I will have to determine if the printer is local or network and if network determine its network name. Is there a simple way to do this? I have many printername retrieval functions but none that I've found so far will return the sharename for a network printer based on its windows name on the workstation...

For instance if I use SET PRINTER TO NAME GETPRINTER() then SET('PRINTER',3) will have the windows name whether it is local or not and if it is a network printer it will not contain the network name. I need to somehow get the network name of the printer so I can pass it to copyfile...

TIA,
Tracy
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform