|GUI ScreenIO for Windows|
The CopyFileFromClient function copies a file from the client to the specified location on the server.
This API will normally copy a file from the client to the specified location on the server.
If the application is not running in client/server mode, it performs a CopyFile. Therefore, for those applications which run in both client/server and in a single machine, you can use this function call and expect it to work in all cases.
The file is first transferred, using the original filename, to a temporary directory on the server. When the transfer is complete, the server executes CopyFile to copy the file to the specified destination, changing the name if requested.
Because the server uses the same temporary directory for all clients, you must ensure that the filename is unique for each client. The function will fail if the same filename is copied from two clients at the same time.
Files available to copy to your system:
Pathspec of source file (up to 1024 bytes).
Pathspec of destination (up to 1024 bytes).
Copy options; set the desired one to TRUE before you call GSWINAPI.
To replace an existing file of the same name:
SET CF-IF-EXIST-REPLACE TO TRUE
To fail if the target file exists:
SET CF-IF-EXIST-FAIL TO TRUE
Same as CF-IF-EXIST-REPLACE, replaces the destination file:
SET CF-SYNCHRONIZE-FILE TO TRUE
Note: When operating under Client Server, this option operates
slightly different than CF-IF-EXIST-REPLACE.
CF-IF-EXIST-REPLACE will always copy the file from the client and replace the file on the server.
The CF-SYNCHRONIZE-FILE option will copy the file from the client to the GUI ScreenIO Server's internal Cache and then it will replace the destination file on the server. Upon subsequent calls to Copy the same file, it will compare date and time of the cached version and the client's version, and only transmit the file if it is different. In all cases it will copy from cache to your destination. This can be dramatically faster, and is meant as a way of collecting files from remote clients, and keeping those files up-to-date.
This argument is standard for all CALLs to GSWINAPI. It is used to select the desired API or function, and to return the status of the operation.
Used to return the status of a call to GSWINAPI. A value of zero is a failure, any other value indicates success.
Recommended usage is to test the 88-level value WIN32API to see if it worked, then to use the text error message to see why it failed.
* ------------------------: If function failed,
Error code that was returned by Windows. This is not generally useful unless you have the Windows Platform SDK documentation available to you.
Plain-text error message that describes why the operation failed.
The number of these present varies depending on how many arguments are used by the desired function. These are not used, but must be present because this CALL requires seven arguments.
You should be aware that malicious and knowledgeable users may be able to substitute a Trojan file for the one you intended to copy from their machine to the server. Use this Up-Load capability with great care. It is unwise to upload anything from the client that may be executable. It would be wise to run a virus scanner on your server that checks each file as it is written.
|© 2000-2019 Norcom, all rights reserved|