Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>setshare()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SETSHARE()
 Sets the default opening mode (share mode) for CA-Clipper Tools file
 functions
------------------------------------------------------------------------------
 Syntax

     SETSHARE(<nShareMode>) --> lAccepted

 Argument

     <nShareMode>  Designates the desired share mode.

 Returns

     SETSHARE() returns .T. when the desired share mode is implemented (must
     be DOS version - 3.1 or higher).

 Description

     The setting you implement here influences all CA-Clipper Tools functions
     that open, read, or write to a file.  The share mode can be set here.
     It determines when a program opens a file under DOS and how other
     programs within a network may address this file.  The CA-Clipper Tools
     default is 0, compatibility mode.  The following codes apply:

     Table 7-23: Share Mode Coding
     ------------------------------------------------------------------------
     Code    Share Mode
     ------------------------------------------------------------------------
     0       Compatibility mode.  Here DOS or the network software itself
             determines the share mode.  In Novell networks, the SHAREABLE
             attribute plays an important role in this relationship.
     1       Both read and write by other programs are locked out.
     2       Write by other programs are locked out.
     3       Read by other programs are locked out.
     4       Not locked.  Read and write by other programs is allowed
     ------------------------------------------------------------------------

 Note

     Important!  This function can only be used with DOS versions 3.1 or
     higher.  Older versions return .F..

 Examples

     .  Change share mode, prohibit writing by others:

        ? SETSHARE(2)          // .T., when >= DOS 3.1

     .  Bad parameter:

        ? SETSHARE(12)         // .F.


See Also: GETSHARE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson