COMIDispatch-class | R Documentation |
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 can be created by calls of the form COMCreate
or implicitly when a COM object is returned from a
COM method call.
ref
:Object of class "externalptr"
this is the C++ value identifying the COM object.
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
Duncan Temple Lang (duncan@r-project.org)
http://www.omegahat.net/RDCOMClient http://www.omegahat.net/RDCOMServer http://www.omegahat.net/SWinTypeLibs http://www.omegahat.net/SWinRegistry
COMCreate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.