Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CopyFile not working with captured port
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00510833
Message ID:
00511896
Views:
14
In general you have to think of many processes being attached to the printer, queue or printer-port. Think of your PC's OS, the network-OS and VFP. There are too many combinations to explain, and a general printer-attaching routine should contain them all (think of the adding of NT2K and 15 combinations are added).
To understand this, try -on the concerning PC !- to fuzz around with Capture and look at Net Use's result, and the other way around, Net Use and Capture's result (Capture Show). Depending on the PC's OS mixing is not allowed, and what it comes to is that you should try to be native. IMO you concrete problem here is that the printer-port (or whatever partitiating part) is in use.
Think also of explicitly Deleting the attached printer before attaching again (e.g. Net Use /Delete).

I must say, I think a Copy File was never used by us, and may cause additional problems. Think of two processes may need the printer (port etc.) at the same time. Try to be as native as possible, which in this case would be !Copy YourFile >PRN; this eliminates the VFP thread.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform