getRefTypeInfo: Find the ITypeInfo object for the type given in a...

getRefTypeInfoR Documentation

Find the ITypeInfo object for the type given in a TypeDescriptionRef object.

Description

This function resolves the ITypeInfo-class element in a type library for a given TypeDescriptionRef-class object. These TypeDescriptionRef-class objects arise in the description of parameter types and return types of DCOM methods via getFuncs and we need to resolve them to find their actual definitions in terms of DCOM interfaces. This function performs that action of mapping the information in the TypeDescriptionRef-class object to a ITypeInfo-class.

Usage

getRefTypeInfo(info, href, lib = NULL, follow = !is.null(lib))

Arguments

info

the ITypeInfo-class object in which to resolve the reference.

href

the identifier for the reference, typically the reftype slot of a TypeDescriptionRef-class object

follow

a logical value indicating whether to resolve the referenced type across type libraries. This arises when library A refers to this type as a parameter or return value but it is actually defined in a type library, B say. We can resolve this in library A, but the results may be generic (e.g. an enumeration may have a name Constants rather than the more specific name). If we resolve the type in library B, then we can get the more specific ITypeInfo-class object.

lib

an object of class ITypeLib-class. This is connected to the follow argument the purpose of which you should understand before reading this. This argument provides the library instance in which we encountered the reference (given by href). If it is provided and follow is TRUE, then we will use this lib value to determine if we the ITypeInfo object is defined in a different library or this one. If it is defined in a different library and follow is TRUE, then we will resolve it there. So, this lib parameter allows us to compare the origin of the definition of the type and resolve it appropriately.

Value

An object of some class derived from ITypeInfo-class depending on the type the reference identifies.

Author(s)

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

References

http://msdn.microsoft.com/library http://www.omegahat.org/RWinTypeLibs

See Also

getTypeInfo, specifically the method for ITypeInfo, TypeDescriptionRef. getRefTypeName


omegahat/SWinTypeLibs documentation built on Jan. 17, 2024, 6:40 p.m.