dl_open()

Opens a Designer library

Call
#include <vv_des.h>
DLIBPTR dl_open(libname_stp)

UCHAR *libname_stp

Pointer to the name of the Designer library to open

Returns  
DLIBPTR A pointer to the newly created Designer library structure is returned
NULLP Error. VV_ERR is set to the following:
  ERROPEN A disk file with the specified name could not be opened
  DL_LIBCOR The specified Designer library is corrupted.
  FL_NLIB The specified file is not a Designer library file
  MEMLACK There is insufficient memory to allocate a library structure, a string to hold the library name, or a new node in the linked list of library logical attribute arrays
Description

dl_open() allocates memory for a library structure and a string to hold the library name. The specified Designer library is then opened.

If the specified library is not already included in the linked list of library logical attributes currently in use, the appropriate array (PC/memory-mapped color, PC/memory-mapped monochrome, terminal color, or terminal monochrome) is read from the library and added to the linked list.

Related Functions

dl_close(), dl_fmget(), dl_mnget(), sdl_lock()

Cautions

You must close all open libraries before leaving your application. You can do this by calling dl_close() to close the library. You can also ensure that all libraries are closed by calling vv_exit() just before returning in main() and in any of your abort functions.

dl_open() does not lock the library. By default, dl_mnget(), dl_fmget(), and dl_wnget() lock the library before reading from it and unlock it before returning. Always enable library locking in a multi-user system. The default is for Designer library locking to be enabled.

PCDOS Systems:

A backslash is interpreted as introducing a special character (e.g., "\t" is a tab character) in C. Therefore, when specifying a DOS path name, use a double backslash (for example, "c:\\file.ext").


Home Contents Previous Next