With all of these tips flying about, there just had to be a trap to even up things up...

If (when using VC++6 at least - I've not checked this with v7.1) you declare a const int in an .IDL file, MIDL will actually generate a #define in the header file, e.g.

const int BLAH = 42;
becomes:
#define BLAH (42)

The only good thing to say about this is at least it added the parentheses!

Also, the value does not make it into the type library, even if defined within the library block, and so is not available to be #imported.

One possible solution to both of these issues is to use an anonymous enumeration, e.g.:

enum { BLAH = 42 };

This, though, seems to me to be a retrograde step, as we're using a hack from the days before consts were well supported, even though the compiler (well, the C++ compiler at least) would handle them more than happily.