delorie.com/djgpp/doc/libc/libc_156.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

dlopen

Syntax

 
#include <dlfcn.h>

void *dlopen (const char *filename, int mode);

Description

This function loads a dynamic executable image, whose file name is pointed to by filename, into memory and returns a handle associated with the image for use with the dlsym (see section dlsym) and dlclose (see section dlclose) functions.

If filename contains a path it is used, else it searches the path specified by the environment variable LD_LIBRARY_PATH. The typical extension used is `.DXE', and these dynamic loadable images are created using dxe3gen (@xref{dxe3gen, , dxe3gen, utils}).

The mode field is a combination of RTLD_xxx flags, of which only RTLD_GLOBAL works (others are defined in `dlfcn.h' for Unix compatibility). The RDLD_GLOBAL flag means all symbols in this module are made public and subsequently loaded modules with unresolved symbols will `see' them and will try to find the unresolved references through them.

Return Value

NULL on failure, handle for the loaded image on success.

Portability

ANSI/ISO C No
POSIX 1003.1-2001; not 1003.2-1992


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004