getDLLRegisteredRoutines        package:base        R Documentation

_R_e_f_l_e_c_t_a_n_c_e _I_n_f_o_r_m_a_t_i_o_n _f_o_r _C/_F_o_r_t_r_a_n _r_o_u_t_i_n_e_s _i_n _a _D_L_L

_D_e_s_c_r_i_p_t_i_o_n:

     This function allows us to query the set of routines in a DLL that
     are registered with R to enhance dynamic lookup, error handling
     when calling native routines, and potentially security in the
     future. This function provides a description of each of the
     registered routines in the DLL for the different interfaces, i.e.
     '.C', '.Call', '.Fortran' and '.External'.

_U_s_a_g_e:

     getDLLRegisteredRoutines(dll)

_A_r_g_u_m_e_n_t_s:

     dll: a 'DLLInfo' object.  This can be retrieved from the object
          returned from 'getLoadedDLLs'. Essentially, it provides 
          information about the name and location of the DLL, whether R
          uses dynamic lookup when resolving symbols in the DLL and
          also references to the R data structures that allow us to
          resolve symbols (i.e. 'DllInfo' and 'HINSTANCE').

_D_e_t_a_i_l_s:

     This takes the registration information after it has been
     registered and processed by the R internals. In other words, it
     uses the extended information

_V_a_l_u_e:

     A list with four elements corresponding to the routines registered
     for the .C, .Call, .Fortran and .External interfaces. Each element
     is a list with as many elements as there were routines registered
     for that interface. Each element identifies a routine and is an
     object of class 'NativeSymbolInfo'. An object of this class has
     the following fields: 

    name: the registered name of the routine (not necessarily the name
          in the C code).

 address: the memory address of the routine as resolved in the loaded
          DLL. This may be 'NULL' if the symbol has not yet been
          resolved.

     dll: an object of class 'DLLInfo' describing the DLL. This is same
          for all elements returned from 'getDLLRegisteredRoutines'.

numParameters: the number of arguments the native routine is to be
          called with. In the future, we will provide information about
          the types of the parameters also. 

_A_u_t_h_o_r(_s):

     Duncan Temple Lang <duncan@wald.ucdavis.edu>

_R_e_f_e_r_e_n_c_e_s:

     "Writing R Extensions Manual" for symbol registration. R News,
     Volume 1/3, September 2001.   "In search of C/C++ & Fortran
     Symbols"

_S_e_e _A_l_s_o:

     'getLoadedDLLs'

_E_x_a_m_p_l_e_s:

     dlls <- getLoadedDLLs()
     getDLLRegisteredRoutines(dlls[["base"]])

