Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDL enumeration not displayed in type library

Tags:

com

idl

I have a COM object written using the MS ATL library. I have declared a bunch of enumerations in the IDL but they do NOT appear when viewing the type library using the MS COM Object Viewer tool. The problem seems to be that the missing enums are not actually used as parameters by any of the COM methods - how can I force these enums to appear?

For example, in the IDL:

// Used by Foo method, so appears in the type library
typedef enum FOO
{
    FOO_1,
    FOO_2,
} FOO;

// Not used by any method, so won't appear in the type library
typedef enum BAR
{
    BAR_1,
    BAR_2,
} BAR;

[id(1)] HRESULT Foo([in] FOO eFoo);

Even though the enums in question aren't directly used by any methods, they will still be useful to anyone using the object, but I can't get them to export.

Has anyone seen this before?

like image 225
Rob Avatar asked Sep 24 '08 06:09

Rob


1 Answers

Did you put them in the library section of the IDL? Only types mentioned in the library section go into the TLB.

library MyLib {
    // ...
    enum BAR;
like image 181
Motti Avatar answered Sep 18 '22 20:09

Motti