Excel11 Typelib generated functions missing or incorrect

  • Thread starter Excel11 typelib gen'ing wrong functions?
  • Start date
E

Excel11 typelib gen'ing wrong functions?

i am using VC++ 2005, and have Excel11. when i goto add a class from the
Excel11 typelib, they seem to be the wrong functions. e.g. for "Range" i get
a generated CRange.h that contains...

// IFont methods
public:
VARIANT get_Background()
{
VARIANT result;
InvokeHelper(0xb4, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
return result;
}
void put_Background(VARIANT& newValue)
{
static BYTE parms[] = VTS_VARIANT ;
InvokeHelper(0xb4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, &newValue);
}
VARIANT get_Bold()
{
VARIANT result;
InvokeHelper(0x60, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
return result;
}

of course, when i compile, i get...
1>c:\work\decompiler\remedy.cpp(5009) : error C2039: 'SetColumnWidth' : is
not a member of 'Range'
1> c:\work\decompiler\excel_11.h(4593) : see declaration of 'Range'

where that function was in Excel9 (i'm upgrading an old app).

what am i doing wrong to not get RANGE functions in CRange.h????
 
B

BillJ

solved! there seems to be a bug in Visual Studio 2005. the generated header
files from a typelib are wrong.

workaround: use an older version of Visual Studio (i used .Net) and generate
the header files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top