Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can i get the shared resource path my lpt1 is mapped
Message
 
 
À
30/07/2002 01:00:29
Devrishi Bhogra
Escorts Claas Limited
Faridabad, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00683808
Message ID:
00683872
Vues:
22
You can use WSH
lcUncPath = ""
loNet = CREATEOBJECT("Wscript.Network")
loPrinters = loNet.EnumPrinterConnections()
FOR i=0 TO oPrinters.Count-1 STEP 2
	? i, loPrinters.Item(i), loPrinters.Item(i+1)
	IF loPrinters.Item(i) == "LPT1"
		lcUncPath = loPrinters.Item(i+1)
		EXIT
	ENDIF
ENDFOR
? lcUncPath
>Hi !!
>
>When i try to copy any text file on my printer using
>
>API function CopyFile("filename","LPT1:",0)
>it works fine.
>
>But in case, i am using a shared printer, i have to specify the shared printer path (\\servername\sharedprinter)
>
>With the help help of which API function , i can get the the path my lpt: is mapped to ?
>Please Help
>
>Note : also suggest me some good book on using API from visual foxpro.
>
>Regards
>Sunny
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform