|
|
|
|
- Example: Sending a message from the client computer to the server
Example: Sending a message from the client computer to the server The following example is used to transfer a file from the client computer to the server and to manage the transfer progress on the client computer.
// - - Initialization code of "WIN_RPCClient" window GLOBAL Transfer_Completed is boolean = False Transfer_InProgress is boolean = False Event("ProgBar_Transfer", "WIN_RPCClient", "SendFile") ... AConnection is int AConnection = NetConnect("148.61.125.245", FTPServer, "GUEST", "") ...
// - - Button for sending the transfer IF Transfer_InProgress = True THEN Error("A file transfer is in progress") ELSE Transfer_Completed = False Transfer_InProgress = True IF NetSendFile(AConnection, "C:\autoexec.bat", ... "C:\autoexec.cli", "SendFile", 10) = False THEN Info("The transfer failed") END ... END
// - - ProgBar_Transfer procedure: managing the current transfer PROCEDURE ProgBar_Transfer Message("Transfer in progress") ProgressBar(_EVE.wParam, _EVE.lParam) IF _EVE.wParam = _EVE.lParam THEN Transfer_InProgress = False Transfer_Completed = True Message("Transfer completed") Info("Transfer completed") END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|