VMS Help  —  CRTL  dlopen
    Provides an interface to the dynamic library loader to allow
    shareable images to be loaded and called at run time.

    Format

      #include  <dlfcn.h>

      void *dlopen  (char *pathname, int mode);

1  –  Arguments

 pathname

    The name of the shareable image. This name is saved for
    subsequent use by the dlsym function.

 mode

    This argument is ignored on OpenVMS systems.

2  –  Description

    The dlopen function provides an interface to the dynamic library
    loader to allow shareable images to be loaded and called at run
    time.

    This function does not load a shareable image but rather saves
    its pathname argument for subsequent use by the dlsym function.
    dlsym is the function that actually loads the shareable image
    through a call to LIB$FIND_IMAGE_SYMBOL.

    The pathname argument of the dlopen function must be the name
    of the shareable image. This name is passed as-is by the dlsym
    function to the LIB$FIND_IMAGE_SYMBOL routine as the filename
    argument. No image-name argument is specified in the call
    to LIB$FIND_IMAGE_SYMBOL, so default file specification of
    SYS$SHARE:.EXE is applied to the image name.

    The dlopen function returns a handle that is used by a dlsym or
    dlclose call. If an error occurs, a NULL pointer is returned.

3  –  Return Values

    x                  A handle to be used by a dlsym or dlclose
                       call.
    NULL               Indicates an error.
Close Help