GetCOMClassDef: Find S COM class definition from a class UUID

View source: R/management.S

GetCOMClassDefR Documentation

Find S COM class definition from a class UUID

Description

This function is called by a COM factory to create an instance of a particular COM class defined in S when such an object is requested by a client. This looks for the information to create the COM object in two ways.

Firstly, it attempts to look in the registry for the class entry for the given UUID identifier. If this exists, it looks for entries for profile to see if there is an S script that it should execute before creating the server. This can be used to initialize the R session appropriately so that packages, methods, data, etc. are available to support the server. It then checks to see if there is an entry in the registry named rda and if so, deserializes the file given by that entries value. The first object from deserializing is used as the COM server object. If no rda entry exists but there is an entry named Svariable, we then attempt to retrieve the S object that is currently bound/assigned to that variable and use that.

The typical mechanism does not use rda or Svariable entries. Instead, the developer of a COM server in S registers the server definition using registerCOMClass. GetCOMClassDef then uses the UUID passed to it to find the definition in a list of such server definitions. This list is stored in a serialized S object residing on the system and created during the call to registerCOMClass.

Usage

GetCOMClassDef(clsid, rda = getCOMClassDefFileName(), verbose = FALSE)

Arguments

clsid

the UUID identifying the particular COM class definition. This is an object of class uuid from the Ruuid package or a character vector giving the UUID in string form.

rda

the name of an R data file containing the serialized object giving the list of COM class definitions.

verbose

a logical value indicating whether to write diagnostic messages about progress to the console.

Value

An object that "defines" an S COM server which can be passed to createCOMObject.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry

See Also

registerCOMClass createCOMObject


omegahat/RDCOMServer documentation built on July 17, 2022, 7:25 p.m.