Title: [MSVC] Enum/typedef namespace bug with #import

I'm hoping someone out in the ether has a workaround for the enum #import
bug in VC++6. I really need to keep the namespace to avoid naming clashes.
In the process of all this, I've noticed the following:

1. If the typedef'd name is the same as the enumeration tag, it's referenced
as 'enum X', otherwise just 'X'. In this later case, the compiler also gets
lost and nukes upon encountering the first such unqualified (and thereby
unknown) type.

2. No enum tags or typedefs are qualified with the namespace tag but
interfaces and coclasses are.

3. Manually editing the '.tli' causes the compiler to immediately regenerate
it.

4. Adding a 'using namespace' fixes these errors but, regretfully, causes
other problems (such as a multitude of 'ambiguous symbol' errors).

The control being #imported is completely under my control so I can muck
with it's IDL as much as needed. It's been tested in VB and appears fine so
I'd prefer not to break that but now I'm inserting it into the client apps
and really need it to be done using the import rather than dragging the .h
file. Manually editing the .tlh & .tli also needs to be avoided since I
expect to be making modifications to the control as I integrate the client
code (I could build a SED script but...).

<RANT>
On a personal note, I'd like to add that Microsoft must have been aware of
this problem for years. If it's not been fixed (and I saw no indication of
this last night on their web pages), the responsible party should be
terminated with prejudice. There is NO excuse for this kind of sloppy
product, especially after so many service packs. I was going to add a bug
report but that part of the site was broken (surprise!).
</RANT>

TIA!

Ciao,
Dee

Reply via email to