Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> directory functions overview</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Directory functions overview
------------------------------------------------------------------------------
 Drive Tables

 A workstation maintains three tables which relate to the Directory Handle
 Table of the file server: a Drive Handle Table, a Drive Flag Table and a
 Drive Connection ID Table.
 Each table consists of 32 entries, corresponding to the permanent drive
 letters A to Z, and the following temporary drive letters:

 [  (left bracket)
 \  (backslash)
 ]  (right bracket)
 _  (underline)
 `  (apostrophe)

 For each of the 32 permanent and temporary drives, the Drive Handle Table
 contains a directory handle which is an index into the Directory Handle
 Table of the file server.
 For each drive, the Drive Flag Table contains a value indicating whether
 the drive is allocated, a permanent or temporary drive, or a local or
 network drive.
 The Drive Connection ID Table contains an index into the workstation's
 Server Name Table and Connection Information Table, identifying the file
 server to which the drive letter is mapped.
 NOVLIB functions which allocate and deallocate directory handles, e.g.
 DrvDirMap() and DrvMappingDelete(), map (or assign) workstation drives to
 directory handles by accessing these three workstation tables.

 Search Drive Vector

 The search drive vector contains the drive letters of each search drive
 that is mapped on the workstation.

 Directory Handle Table

 The file server maintains a Directory Handle Table for each connection
 (workstation) logged into it. The Directory Handle Table has 255 entries (1
 to 255), each of which can be set to point to a volume or directory path.
 When a workstation allocates a directory handle, the file server enters the
 volume number and directory entry number for the specified directory into
 the Directory Handle Table for the requesting workstation. Programs running
 on the workstation can then refer to a directory using a directory handle,
 which is actually an index into the Directory Handle Table.

 Directory Handles

 When your program begins executing, the only directory handles accessible
 to it are those associated with drives or search drives contained in the
 Drive Handle Table and Search Drive Vector.
 The DrvFlagGet() and DrvDirHandleGet() functions respectively return a
 status byte for a local or network drive, and the directory handle
 associated with the network drive. DrvFlagGet() returns whether a given
 drive is a local drive, a network drive, or not mapped at all. It also also
 indicates whether the directory handle and network drive are permanently or
 temporarily allocated. Temporary allocations are released when the
 allocating program terminates.
 The SchVectorGet() function returns a 17-byte vector with the drive numbers
 of all search drives.
 DrvDirMap(), and SchDriveDirMap() not only allocate and set directory
 handles, they also map drive letters to the specified directories.

 Drives and Search Drives

 The Directory Handles section earlier in this chapter discusses the
 correspondence of directory handles to network drives. Although NetWare
 programs typically use directory handles when working with directories,
 NOVLIB provides some functions that operate on drives rather than directory
 handles.
 Your programs can allocate only the first 26 drive letters (A to Z) as
 permanent network drives. Any of the 32 drive letters can be allocated as
 temporary drives and more than one temporary directory handle can
 correspond to one drive. A temporary drive remains allocated only as long
 as the program remains active.

 Mapping a Network Drive

 The DrvDirMap() and SchDriveDirMap() functions map network drive letters to
 directories.
 Your program specifies the directory to which the DrvDirMap() function is
 to map a drive by passing two parameters, the drive letter and the
 directory path.

 Search Drives

 NOVLIB provides functions that map search drives, determine whether a drive
 is a search drive and directly access the search drive vector. The search
 drive vector for each workstation is analogous to the DOS PATH variable and
 is an array of 15 drive letters corresponding to the search drives.

 Accessing the Search Drive Vector

 The search drive vector is an array of up to 15 drive letters. For each
 search drive that has been mapped, one of the letters in the search drive
 vector corresponds to the drive letter in the DOS path variable.

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