Re: [R] COM objects with early bindings in R

From: Duncan Temple Lang <>
Date: Tue 18 Oct 2005 - 07:21:39 EST

Hash: SHA1

[It is best to ask these questions on the mailing list or directly to me as the maintainer of the code.]

There are new versions of the RDCOM packages. They are not officially released because I haven't had time yet. But they are available from

The function generateInterface() is now used to create a better collection of code than the old createCOMSClass() function.

Then something along the following lines (depending on your taste) will do create the interface code. If you want events, set events = TRUE. You can output the result into a directory and many files or a single file or text connection depending on what you want (i.e. package or direct use).




e = COMCreate("Excel.Application")

lib = LoadTypeLib(e)

# Generate the code to interface to ALL the classes. tmp = generateInterface(lib, "Workbooks", events = FALSE)

out = writeCode(tmp, "ExcelCode.S")

I'd love some feedback.

Pfaff, Bernhard Dr. wrote:
> Dear list member,
> I am using the packages RDCOMClient and SWinTypeLibs and try to import a COM
> object (created in Delphi) in R that is of type 'early binding' instead of
> late 'late binding'. Is there a possibility to do this in R?
> Currently, the following returns an error message:
> l1 = LoadTypeLib("c:\\Programme\\INVESCO\\QaCalendar\\Calendar.dll")
> print(getTypeLibTypes(l1))
> IQaCalPeriodicInit QaCalPeriodic IQaSeriesInit
> "dispatch" "coclass" "dispatch"
> QaSeries _QaSerLib QaSerLib
> "coclass" "dispatch" "coclass"
> IQaCalSporadicInit QaCalSporadic _QaCalendarLib
> "dispatch" "coclass" "dispatch"
> QaCalendarLib QaCalendarIntersectRules QaDistanceRules
> "coclass" "enum" "enum"
> createCOMSClass(l1[["QaSerLib"]], "test")
> Error in generateOperators(libEntry, className) :
> invalid subscript type
> Any help, pointers or a working example is much appreciated.
> Best Regards,
> Bernhard
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 1.1
> year 2005
> month 06
> day 20
> language R
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

iD4DBQFDVBXi9p/Jzwa2QP4RAkO/AJwM9F5zIfobp68N7dNprm+xFtBurQCYx4Le 5MQipX6lXIRc5N9wTzJFvw==
-----END PGP SIGNATURE----- mailing list PLEASE do read the posting guide! Received on Tue Oct 18 07:28:42 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 19:00:45 EST