Subj : file modes To : Chris Hoppman From : Jasen Betts Date : Sun Jul 04 2004 02:02 pm Hello Chris. 02 Jul 04 23:08, you wrote to all: CH> How would you go about setting file modes in tp? CH> Like CH> fm_deny_read_write; CH> fm_allow_read_write; CH> filemode := ?? Get yourself a good dos reference like "Ralf Brown's interrupt list" (inter*.zip) the TP internals ar closely linked with DOS, === Cut === the following tables are takes from the above. Bitfields for access and sharing modes: Bit(s) Description (Table 0521) 2-0 access mode 000 read only 001 write only 010 read/write 011 (DOS 5+ internal) passed to redirector on EXEC to allow case-sensitive filenames 3 reserved (0) 6-4 sharing mode (DOS 3+) 000 compatibility mode 001 "DENYALL" prohiboth read and write access by others 010 "DENYWRITE" prohiwrite access by others 011 "DENYREAD" prohiread access by others 100 "DENYNONE" allow full access by others 111 network FCB (only available during server call) 7 inheritance if set, file is private to current process and will not be inherited by child processes (Table 0522) Values of DOS file sharing behavior: | Second and subsequent Opens First |Compat Deny Deny Deny Deny Open | All Write Read None |R W RW R W RW R W RW R W RW R W RW - - - - -| - - - - - - - - - - - - - - - - - Compat R |Y Y Y N N N 1 N N N N N 1 N N W |Y Y Y N N N N N N N N N N N N RW|Y Y Y N N N N N N N N N N N N - - - - -| Deny R |C C C N N N N N N N N N N N N All W |C C C N N N N N N N N N N N N RW|C C C N N N N N N N N N N N N - - - - -| Deny R |2 C C N N N Y N N N N N Y N N Write W |C C C N N N N N N Y N N Y N N RW|C C C N N N N N N N N N Y N N - - - - -| Deny R |C C C N N N N Y N N N N N Y N Read W |C C C N N N N N N N Y N N Y N RW|C C C N N N N N N N N N N Y N - - - - -| Deny R |2 C C N N N Y Y Y N N N Y Y Y None W |C C C N N N N N N Y Y Y Y Y Y RW|C C C N N N N N N N N N Y Y Y Legend: Y = open succeeds, N = open fails with error code 05h C = open fails, INT 24 generated 1 = open succeeds if file read-only, else fails with error code 2 = open succeeds if file read-only, else fails with INT 24 ------------------------------------------------------------------------------- Jasen --- GoldED+/LNX 1.1.4.7 * Origin: (3:640/1042) .