Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If you have a shared local printer, can you test?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
If you have a shared local printer, can you test?
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01239774
Message ID:
01239774
Views:
49
Hi everybody,

Can you please test the following code:
#define CRLF chr(13) + chr(10)
strComputer = "."
 objWMIService = GetObject("winmgmts:" + "{impersonationLevel=impersonate}!\\" + strComputer + "\root\cimv2")
colShares = objWMIService.ExecQuery("SELECT * FROM Win32_Share") 
FOR EACH loShare IN colShares
   =MESSAGEBOX('Name: ' + loShare.Name + ;
CRLF + 'Description: '+   loShare.Description + ;
CRLF + 'Path:' + loShare.Path)
next
The idea is to figure if the local printer is shared. However, I don't have local printer to test.

-------------------
Never mind, it's easy to use from Win32_Printer and Share_Name. I didn't find this property myself.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform