createCOMObject | R Documentation |
This generic function is called when the
COM mechanism needs to create a COM object.
This happens in two ways: a) when a client
attempts to create a new instance of COM class,
or b) when we convert an S value to a COM object
as the return value or result from a COM method.
The different methods for this generic take
care of interpreting the S object suitably.
In (a), typically the previously registered
S description of the COM class is fetched
from disk using the class UUID in the request
and a suitable S object and dispatch mechanism
are generated.
In case (b), we rely on there being a suitable
method for createCOMObject
.
The default is to create a COM object using
genericCOMHandler
.
Each method must return an S object that is simply an external pointer to a C++ object. The collection of available C++ classes is listed in the regular documentation for this package.
createCOMObject(def)
def |
an S object either describing the COM class and how to instantiate objects and control the dispatching of methods, or a regular S value that needs to be exposed as a dynamic COM object. |
The methods must return an external pointer
whose contents identify a C++ object that extends
the RCOMObject
class.
Typically, people will use the existing classes
and modify the code provided in the examples and methods
in this package. It is possible to introduce new C++ classes
that control the dispatching in different ways or offer
different interfaces.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry
genericCOMHandler
COMSIDispatchObject
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.