COMIDispatchClass: Representation of generic COM object in R

COMIDispatch-classR Documentation

Representation of generic COM object in R

Description

These classes are used to represent in S an arbitrary COM object. IUnknown is the most basic and provides us with very little information about the underlying COM object. COMIDispatch is the work-horse for this package and provides a mechanism by which one can access the methods and properties of the COM object using the IDispatch interface, i.e. dynamic bindings rather than compiled ones.

COMIDispatch is a trivial extension of IUnknown that provides type information which we use to dispatch methods. The IUnknown class is merely a reference to the C/C++-level COM object.

Reference counting is done automatically in the C code so that the COM object should persist as long as there is an S object that refers to it and will be released when no S value refers to it. Of course, other clients can clobber the COM object and the S references will be meaningless.

Objects from the Class

Objects can be created by calls of the form COMCreate or implicitly when a COM object is returned from a COM method call.

Slots

ref:

Object of class "externalptr" this is the C++ value identifying the COM object.

Methods

\$

signature(x = "COMIDispatch"): accessor for a method in the COM object. This returns a function that can be used to invoke the named method See $ in COMAccessors

\$<-

signature(x = "COMIDispatch", "ANY"): generates an error as one cannot assign to a function/method. This is implemeted this way for symmetry so that assigning to a property (x[["foo"]] <- 1) has the same basic syntax as accessing it x[["foo"]]

. If we made this operator a property assignment, we would have x$foo <- 1 work but x$foo failing. See COMAccessors

[[

signature(x = "COMIDispatch", "numeric"): access an element of a list via the DCOM object's Item method, assuming we it has one. See COMAccessors

[[<-

signature(x = "COMIDispatch", "character"): set a property value using the specified name. See COMAccessors

Author(s)

Duncan Temple Lang (duncan@r-project.org)

References

http://www.omegahat.net/RDCOMClient http://www.omegahat.net/RDCOMServer http://www.omegahat.net/SWinTypeLibs http://www.omegahat.net/SWinRegistry

See Also

COMCreate


omegahat/RDCOMClient documentation built on July 24, 2022, 5:45 a.m.