-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[It is best to ask these questions on the omega-help at omegahat.org
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
http://www.omegahat.org/Prerelease/
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).
library(SWinTypeLibs)
library(RDCOMClient)
library(RDCOMServer)
library(RDCOMEvents)
e = COMCreate("Excel.Application")
options(error=recover)
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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
- --
Duncan Temple Lang duncan at wald.ucdavis.edu
Department of Statistics work: (530) 752-4782
371 Kerr Hall fax: (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD4DBQFDVBXi9p/Jzwa2QP4RAkO/AJwM9F5zIfobp68N7dNprm+xFtBurQCYx4Le
5MQipX6lXIRc5N9wTzJFvw==vlry
-----END PGP SIGNATURE-----