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?
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With