Changeset 16 for rxutilex/trunk/FUNCTIONS
- Timestamp:
- Sep 20, 2014, 1:17:51 PM (11 years ago)
- File:
-
- 1 edited
-
rxutilex/trunk/FUNCTIONS (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rxutilex/trunk/FUNCTIONS
r4 r16 3 3 (See file 'TODO' for functions which are under consideration to be added.) 4 4 5 Sys2CheckNamedPipe - Check the status of a named pipe 6 Sys2ConnectNamedPipe - Enable client sessions on a named pipe 7 Sys2CreateNamedPipe - Create a named pipe 8 Sys2DisconnectNamedPipe - Acknowledge that a named pipe session has ended 5 9 Sys2DropFuncs - Deregister all functions 6 10 Sys2FormatTime - Format calender time (strftime wrapper) … … 15 19 Sys2QueryProcess - Get information about a process 16 20 Sys2QueryProcessList - Get the list of running processes 21 Sys2Read - 17 22 Sys2ReplaceModule - Unlock a DLL (DosReplaceModule wrapper) 18 23 Sys2Version - Get the version of this library … … 20 25 21 26 If an internal error occurs in any function, the variable SYS2ERR will contain 22 an error message of the form "RC: description" where RC is a non-zero error 27 an error message of the form "RC: description" where RC is a non-zero error 23 28 code, and description indicates the internal function call that failed. If 24 29 no error occurs, SYS2ERR will be "0". 30 31 32 ------------------------------------------------------------------------- 33 Sys2CheckNamedPipe 34 35 Check the status of a named pipe. 36 37 REXX ARGUMENTS: 38 1. The pipe handle (from Sys2CreateNamedPipe or DosOpen). (REQUIRED) 39 40 REXX RETURN VALUE: 41 String of the format "bytes status", where bytes is the number of bytes 42 currently waiting in the pipe, and status is one of: DISCONNECTED, 43 LISTENING, CONNECTED, or CLOSING. 44 45 46 ------------------------------------------------------------------------- 47 Sys2ConnectNamedPipe 48 49 Start 'listening' by allowing clients to connect to a previously-created 50 named pipe. 51 52 REXX ARGUMENTS: 53 1. The pipe handle, as returned by Sys2CreateNamedPipe. (REQUIRED) 54 55 REXX RETURN VALUE: 56 1 on success, or 0 if an error occurred. 57 58 59 ------------------------------------------------------------------------- 60 Sys2CreateNamedPipe 61 62 Creates a named pipe with the specified name and parameters. 63 64 Note that the standard REXX functions such as CHARIN/OUT, which operate 65 directly on file names, are not capable of using the pipe handle returned 66 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 host end 68 needs to use the pipe handle from this function, and must therefore use 69 Sys2Read/Sys2Write in order to read and write data from the pipe. 70 71 REXX ARGUMENTS: 72 1. The name of the pipe, in the form "\PIPE\something". (REQUIRED) 73 2. The size of the outbound buffer, in bytes. (REQUIRED) 74 3. The size of the inbound buffer, in bytes. (REQUIRED) 75 4. The pipe's timeout value, in milliseconds. (DEFAULT: 3000) 76 5. The number of simultaneous instances of this pipe which are allowed. 77 Must be between 1 and 254, or 0 indicating no limit. (DEFAULT: 1) 78 6. Pipe blocking mode, one of: 79 W = WAIT mode, read and write block waiting for data (DEFAULT) 80 N = NOWAIT mode, read and write return immediately 81 7. Pipe mode, one of: 82 I = Inbound pipe (DEFAULT) 83 O = Outbound pipe 84 D = Duplex (inbound/outbound) pipe 85 8. Privacy/inheritance flag, one of: 86 0 = The pipe handle is inherited by child processes (DEFAULT) 87 1 = The pipe handle is private to the current process 88 9. Write-through flag, one of: 89 0 = Allow delayed writes (write-behind) to remote pipes (DEFAULT) 90 1 = Force immediate writes (write-through) to remote pipes 91 92 REXX RETURN VALUE: A four-byte pipe handle. 93 94 95 ------------------------------------------------------------------------- 96 Sys2DisconnectNamedPipe 97 98 Unlocks a named pipe after a client has closed its connection. 99 100 REXX ARGUMENTS: 101 1. The pipe handle, as returned by Sys2CreateNamedPipe. (REQUIRED) 102 103 REXX RETURN VALUE: 104 1 on success, or 0 if an error occurred. 25 105 26 106 … … 91 171 Years prior to 1970 or later than 2037 cannot be supported due to the 92 172 limitations in how the C library calculates epoch time. Specifying 93 1969 or earlier will generate a REXX error. Any date later than 2037 173 1969 or earlier will generate a REXX error. Any date later than 2037 94 174 will return a value of 0 (and SYS2ERR will report an error in 'mktime'). 95 175 NOTE: A 2-digit year can be specified, in which case the number will be 96 added to 1900 if it is 70 or higher, or to 2000 otherwise. 176 added to 1900 if it is 70 or higher, or to 2000 otherwise. 97 177 e.g. '20' ==> 2020 98 178 '75' ==> 1975 … … 134 214 135 215 ------------------------------------------------------------------------- 136 Sys2LocateDLL 137 138 Searches for a DLL by name and returns its fully-qualified path. 216 Sys2LocateDLL 217 218 Searches for a DLL by name and returns its fully-qualified path. 139 219 140 220 If a DLL with the given name is currently loaded, that instance of the 141 221 DLL will be returned. Otherwise, standard DLL loading rules (according 142 222 to the current LIBPATH and/or extended LIBPATH configuration) are used to 143 search for a DLL whose module name matches the one specified. 144 145 REXX ARGUMENTS: 146 1. The name of the DLL to search for. (REQUIRED) 147 148 149 REXX RETURN VALUE: 150 The fully-qualified path of the DLL, if found; "" otherwise. 223 search for a DLL whose module name matches the one specified. 224 225 REXX ARGUMENTS: 226 1. The name of the DLL to search for. (REQUIRED) 227 228 229 REXX RETURN VALUE: 230 The fully-qualified path of the DLL, if found; "" otherwise. 151 231 152 232 … … 219 299 220 300 Gets a list of running processes. The results will be returned in a stem 221 variable, where stem.0 contains number of items, and each stem item is a 301 variable, where stem.0 contains number of items, and each stem item is a 222 302 string of the form: 223 303 pid parent-pid process-type priority cpu-time executable-name … … 241 321 242 322 ------------------------------------------------------------------------- 323 Sys2Read 324 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) 331 2. Number of bytes to read. (REQUIRED) 332 333 REXX RETURN VALUE: 334 String containing the bytes read, or "" in case of error. 335 336 337 ------------------------------------------------------------------------- 243 338 Sys2ReplaceModule 244 339
Note:
See TracChangeset
for help on using the changeset viewer.
