TypeLibCLSID, TypeLibDesc, TypeLibName

These three properties of the Project object describe the Type Library, created to describe COM components.

Usage

cClassID = prjProject.TypeLibCLSID
cDescription = prjProject.TypeLibDesc
prjProject.TypeLibDesc = cDescription
cName = prjProject.TypeLibName

Parameter

Value

Meaning

cClassID

Character

The ClassID of the type library. This is the 16-byte unique ID for this class, represented in hexadecimal, with curly braces and hyphens added for better (but not much!) readability.

cDescription

Character

The description of the servers in the type library. Set this on the Servers tab of the Project Info dialog, or programmatically via this property.

cName

Character

The name of the type library, without the TLB or VBR extension. Typically, the name of the project.


These three properties are associated with the type library, which is a file or set of files used by COM to communicate the interfaces and capabilities of an object. Type libraries are used internally by COM to register new servers on the system, and by object browsers to display the information about a server to a developer. TypeLibCLSID and TypeLibName are read-only, generated by the system, but TypeLibDesc is yet another place to store comments.TypeLibCLSID is a number—unique across space and time (we can almost hear Rod Serling or someone like that intoning those words gravely)—generated by Windows that identifies the set of interfaces present in this project. The number is re-created each time you select "Recreate Component IDs" from the build dialog, or send .T. for the optional fifth parameter to the Build method. This class ID is used as a unique key into the Registry to store project-level information on your servers, such as the type library description and the locations of the type library and help file.TypeLibName is the name of the generated TLB and VBR files. All the ones we generate take on the same name as the project in which they are contained.TypeLibDesc is read-write at design-time, and gives you a place to add a brief description of the servers in the type library.

Trying to set the description to more than 126 characters programmatically causes problems. If you set TypeLibDesc to 127 characters or more, you get back an empty string on testing the value from the Project. But look in the Project Info dialog and the value is there. Somewhere beyond that, the value stops sticking and even the dialog is blank.


Example

? oProject.TypeLibCLSID
? oProject.TypeLibName
oProject.TypeLibDesc = "My servers for testing"

See Also

Project, Server


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .