To create a TypeLib for your Enum collection:

The following code, after compiling, would give you a typelib with exactly 1 enum with 5 elements. You could add others as needed. To compile, you will need something like mktyplib.exe that comes with VC++. Note the GUIDs -- be sure and create unique ones on your machine. I used the GUID-generator to VC++ to do it, but you can also create your own mini-VB program to do it.

[ uuid(180E3A21-A98F-11d1-8739-00A024704CB5), // LIBID_Lines.
helpstring("MyCompany MyProg 1.0 Type Library"),

library MyProg


// enumSeverityType
typedef [uuid(E7FEA390-A986-11d1-8739-00A024704CB5),
helpstring("Error severity from MyCompany OLE components"), helpcontext(300)]
enum {
[helpstring("Not really an error -- informational message.")] TypeNone = 0,
[helpstring("Severity = Low -- Can delay or even ignore the error as needed.")] TypeLow = 1,
[helpstring("Severity = Medium -- Important error, but handling can be delayed.")] TypeMedium = 2,
[helpstring("Severity = High -- Must handle immediately.")] TypeHigh = 3,
[helpstring("Critical error -- stop all processing and exit")] TypeCritical = 9
} enumSeverityType;