queryTypeLibPath        package:SWinTypeLibs        R Documentation

_F_i_n_d _t_h_e _f_u_l_l _p_a_t_h _o_f _t_h_e _a_s_s_o_c_i_a_t_e_d _t_y_p_e _l_i_b_r_a_r_y.

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

     This function (and its methods) can locate the full  name of the
     file that is the type library associated with an appropriate
     object  in R. It can be used on DCOM objects (of class
     'COMIDispatch'), 'ITypeInfo' objects derived from a DCOM object or
     from a type library, or from a type library itself. Additionally,
     it can also be called with the UUID (specifically the GUID)
     identifying a class/interface and it consults the  Windows'
     registry to find the associated type library. It is a convenient
     way to find the actual file itself from an instance of a DCOM
     object, so that it can be loaded directly in other sessions
     without having to create the DCOM object first.

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

     queryTypeLibPath(guid, version, lcid = 0)

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

    guid: the object identifying the type library. This can be a
          'COMIDispatch', or 'link{ITypeInfo}', or a UUID or character
          string giving the  UUID.

 version: if specified, an integer vector of length 2 giving the  major
          and minor version numbers (in that order) of the library of
          interest. 

    lcid: a numeric value giving the locale identifier to identify the
          particular version of the library of interest.  The default
          works well.

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

     A character vector or an error. The character vector is the full
     name of the file identifying the type library for the given
     object.

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

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

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

     <URL: http://www.omegahat.org/SWinTypeLibs>

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

     'LoadTypeLib'

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

     ## Not run: 
       library(RDCOMClient)
       e = COMCreate("Excel.Application")
       fileName = queryTypeLibPath(e)

       lib1 = LoadTypeLib(fileName)
       lib2 = LoadTypeLib(e)
       # lib1 and lib2 should be the same.
     ## End(Not run)

