Changeset 17 for rxutilex/trunk/FUNCTIONS
- Timestamp:
 - Sep 21, 2014, 8:45:02 AM (11 years ago)
 - File:
 - 
      
- 1 edited
 
- 
          
  rxutilex/trunk/FUNCTIONS (modified) (9 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
rxutilex/trunk/FUNCTIONS
r16 r17 4 4 5 5 Sys2CheckNamedPipe - Check the status of a named pipe 6 Sys2Close - Close a file or named pipe 6 7 Sys2ConnectNamedPipe - Enable client sessions on a named pipe 7 8 Sys2CreateNamedPipe - Create a named pipe … … 14 15 Sys2LoadFuncs - Register all functions 15 16 Sys2LocateDLL - Search for a loaded/loadable DLL 17 Sys2Open - Open a file or stream (with >2GB support) 16 18 Sys2PutClipboardText - Copy a text string to the clipboard 17 19 Sys2QueryForegroundProcess - Get the PID of the current foreground process … … 19 21 Sys2QueryProcess - Get information about a process 20 22 Sys2QueryProcessList - Get the list of running processes 21 Sys2Read - 23 Sys2Read - Read bytes from a file or named pipe 22 24 Sys2ReplaceModule - Unlock a DLL (DosReplaceModule wrapper) 25 Sys2Seek - Set file read/write pointer (with >2GB support) 23 26 Sys2Version - Get the version of this library 27 Sys2Write - Write bytes to a file or named pipe 24 28 25 29 … … 45 49 46 50 ------------------------------------------------------------------------- 51 Sys2Close 52 53 Close a file or stream (wrapper to DosClose). 54 55 REXX ARGUMENTS: 56 1. File handle (returned by Sys2Open). (REQUIRED) 57 58 REXX RETURN VALUE: 59 1 on success, or 0 if an error occurred. 60 61 62 ------------------------------------------------------------------------- 47 63 Sys2ConnectNamedPipe 48 64 … … 60 76 Sys2CreateNamedPipe 61 77 62 Creates a named pipe with the specified name and parameters. 78 Creates a named pipe with the specified name and parameters. Only byte 79 mode is supported; message mode is not. 63 80 64 81 Note that the standard REXX functions such as CHARIN/OUT, which operate 65 82 directly on file names, are not capable of using the pipe handle returned 66 83 from this function. While the client end can use such functions after 67 using STREAM to issue an OPEN WRITE or OPEN READ command, the hostend84 using STREAM to issue an OPEN WRITE or OPEN READ command, the server end 68 85 needs to use the pipe handle from this function, and must therefore use 69 86 Sys2Read/Sys2Write in order to read and write data from the pipe. 87 88 Named pipes can be created in inbound-only, outbound-only, or duplex 89 (inbound/outbound) mode. An error will result if attempting to write 90 to an inbound-only pipe, or read from an outbound-only pipe. 91 92 To activate a named pipe so that client processes can connect to it, use 93 Sys2ConnectNamedPipe. To check the pipe's connection status, as well as 94 the amount of data currently in the pipe, use Sys2CheckNamedPipe. To 95 unlock a named pipe after a client has closed the connection, use 96 Sys2DisconnectNamedPipe. Finally, the pipe should be destroyed using 97 Sys2Close when no longer needed. 70 98 71 99 REXX ARGUMENTS: … … 232 260 233 261 ------------------------------------------------------------------------- 234 262 Sys2Open 263 264 Opens a file or other stream; files larger than 2GB are supported (this 265 function is a wrapper to DosOpenL). Direct-DASD mode is not supported by 266 this function, nor is setting the initial extended attributes. 267 268 REXX ARGUMENTS: 269 1. Name of file or stream to open. (REQUIRED) 270 2. Open action flags, must be either "O" (open if exists), "R" (replace 271 if exists), or nothing (fail if exists), optionally followed by "C" 272 (create if file does not exist). If "C" is not specified, the 273 operation will fail if the file does not exist. Note that a value 274 of "" alone will therefore fail automatically. (DEFAULT: "O") 275 In summary, the possible combinations are: 276 O = Open only (if file exists, open it; if not, fail) 277 OC= Open/create (if file exists, open it; if not, create it) 278 R = Replace only (if file exists, replace it; if not, fail) 279 RC= Replace/create (if file exists, replace it; if not, create it) 280 C = Create only (if file exists, fail; if not, create it) 281 (empty) = No-op (if file exists, fail; if not, fail) 282 3. Access mode flags, one or both of: (DEFAULT: "RW") 283 R = Open file with read access. 284 W = Open file with write access. 285 4. Sharing mode flags, any combination of: (DEFAULT: "W") 286 R = Deny read access to other processes 287 W = Deny write access to other processes 288 5. Deny legacy DosOpen access, one of: 289 0 = Allow DosOpen to access the file (DEFAULT) 290 1 = Deny access using the DosOpen API 291 6. Privacy/inheritance flag, one of: 292 0 = The file handle is inherited by child processes. (DEFAULT) 293 1 = The file handle is private to the current process. 294 7. Initial file attributes when creating a file: (DEFAULT: "") 295 A = Archive attribute set 296 D = Directory attribute set 297 S = System attribute set 298 H = Hidden attribute set 299 R = Read-only attribute set 300 8. Initial file size when creating or replacing a file; ignored if 301 access mode is read-only. (DEFAULT: 0) 302 9. I/O mode flags, any or all of: (DEFAULT: "") 303 T = Write-through mode (default is normal write) 304 N = No-cache mode (default is to use filesystem cache) 305 S = Sequential access 306 R = Random access 307 * S and R can combine as follows: 308 Neither: No locality known (default) 309 S only: Mainly sequential access 310 R only: Mainly random access 311 Both: Random/sequential (i.e. random with some locality) 312 313 REXX RETURN VALUE: 314 File handle, or "" in case of error. 315 316 317 ------------------------------------------------------------------------- 235 318 Sys2PutClipboardText 236 319 … … 323 406 Sys2Read 324 407 325 Read bytes from a previously-opened stream (wrapper to DosRead). The 326 format of file handles supported by this function is currently limited 327 to those returned by Sys2CreateNamedPipe. 328 329 REXX ARGUMENTS: 330 1. File handle (as returned by Sys2CreateNamedPipe). (REQUIRED) 408 Read bytes from a previously-opened stream (wrapper to DosRead). 409 410 REXX ARGUMENTS: 411 1. File handle (as returned by Sys2Open or Sys2CreateNamedPipe). 412 (REQUIRED) 331 413 2. Number of bytes to read. (REQUIRED) 332 414 … … 350 432 351 433 ------------------------------------------------------------------------- 434 Sys2Seek 435 436 Move the read/write pointer to the specified location in an open 437 file/stream; files larger than 2GB are supported (this function is a 438 wrapper to DosSetFilePtrL). 439 440 REXX ARGUMENTS: 441 1. File handle (returned by Sys2Open). (REQUIRED) 442 2. The signed distance in bytes to move. (REQUIRED) 443 3. Move method, one of: 444 B = Beginning of file 445 C = Current position (DEFAULT) 446 E = End of file 447 448 REXX RETURN VALUE: 449 The new file position, in bytes. 450 451 452 ------------------------------------------------------------------------- 352 453 Sys2Version 353 454 … … 357 458 REXX RETURN VALUE: Current version in the form "major.minor.refresh" 358 459 460 461 ------------------------------------------------------------------------- 462 Sys2Write 463 464 Write bytes to a previously-opened stream (wrapper to DosWrite). 465 466 REXX ARGUMENTS: 467 1. File handle (as returned by Sys2Open or Sys2CreateNamedPipe). 468 (REQUIRED) 469 2. Data to be written. (REQUIRED) 470 471 REXX RETURN VALUE: 472 The number of bytes successfully written. 473  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  