Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i get the shared resource path my lpt1 is mapped
Message
 
 
To
30/07/2002 01:00:29
Devrishi Bhogra
Escorts Claas Limited
Faridabad, India
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00683808
Message ID:
00683872
Views:
21
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform