Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
$$$ and FOPEN('PRN') -- Sometimes they work ??
Message
From
23/06/1999 01:55:40
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00231857
Message ID:
00232836
Views:
17
***********************************************************************
* FUNCTION COPYF_RS.PRG
***********************************************************************
* Purpose.....: Copy a file to a port or another file.
* Parameters..: tcInFile -- file containing characters to copy
* tcOutFile -- file or port to write to
* tuNoOverWrite -- zero or false to write over existing file
* default is one
* Returns.....: integer -- return values from WINERROR.H in Visual C++ INCLUDE
* Notes.......: Thanks to Ed Rauh on the Universal Thread:
* CopyF_RS can be used to send a file unambiguously to a print device.
*
* Make certain to specify port names with a trailing :
* IOW, to send something to printer port 1, specify LPT1:, not LPT1.
* This works with network redirected printer ports (ports redirected
* using MS Networking's NET USE or Novell's CAPTURE commands).
* You can also specify a share name rather than a port (IOW, you can
* use the \\Server\Printer share name notation for a network printer
* under both Win9x and NT.)
*
* The parameter names in the DLL DECLARE statement (e.g. cSourceFileName)
* are optional, and are not used by Visual FoxPro or the shared library
* function. The @ sign must be used either in the DECLARE or in the call
* to indicate parameters passed by reference.
*
* Substitue a WAIT WINDOW or your own message handler for 'MSG_RS'
*
* Examples....:
* COPYF_RS('C:\MyFile','LPT1:',0)
* send characters in file MyFile to port LPT1:
* liErrorNumber = COPYF_RS('D:\TEMP\MyFile','PRN:',0)
* send MyFile to default printer
* put any error code in liErrorNumber
* COPYF_RS('D:\\MyServer\MyFile','\\SomeServer\SharedPrinter',0)
* COPYF_RS('OldFileName','NewFileName',1)
* copy file 'OldFileName' to a new file named
* 'NewFileName' but don't overwrite an exiting file.
* Calls.......: CopyFile in KERNEL32.DLL
* Created.....: 1999.06.22
* History.....: From Ed Rauh in UT
**********************************************************************
Peter Robinson ** Rodes Design ** Virginia
Previous
Reply
Map
View

Click here to load this message in the networking platform