createCOMEventServer {RDCOMEvents} | R Documentation |
Create an instance of an S-level COM server
that handles dispatching events to S functions specified by the collection
of named functions.
The dispatcher maps the event types to the functions using the mapping
of identifiers to names given by ids
.
These identifiers are computed from the ITypeInfo
in the type library for the event source's interface.
This relates the names of the methods to unique identifiers
that were determined when the interface was defined.
The collection of functions provide methods for the
events of interest and are invoked when an event is received
by the C-level COM server.
createCOMEventServer(methods, ids, guids = character(0), direct = TRUE, verbose = FALSE)
methods |
a named list of S functions that are considered handlers for the different events that the source can generate. |
ids |
a mapping between the event names and their internal identifiers that are used when the event is received by this low-level event handler. |
guids |
a character vector giving the UUIDs that this server
implements. These are used when a DCOM client queries the
supported interfaces using the basic QueryInterface of
IUnknown interface. |
direct |
a logical value which, if TRUE causes the
low-level C COM server to be created; if FALSE , just
the S-level COM dispatch mechanism is returned which can be passed
to the R_RCOMSObject C routine in a future call.
|
verbose |
a logical value which if TRUE indicates that
events with no handler method should be announced on the console.
This is useful for debugging. |
If direct
is FALSE
,
the return value is a list giving
the Invoke
function that handles the dispatching
of the COM calls to the S functions, and also a degenerate
or NULL
function for mapping names to identifiers.
This is not needed as the event and argument names are already mapped
by the definition of the event handler interface.
If direct
is TRUE
, this function returns
an S external pointer object that contains a reference
to the underlying C++ COM object that interacts with DCOM
and the event source.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry
createCOMEventServerInfo
getEventNameIDs