RTD issue with Excel 2007

B

bradmo

I have an RTD server implentation that is working fine with Excel 2003, but
not with 2007. #VALUE errors are shown when trying to use it with 2007.

I created a simple test project to try and narrow down the source of the
problem, but have not been able to uncover any useful information.

The closest I've come to finding a meaningful error message has been by
executing the following .vbs test script:

Set x = CreateObject("Rtd.Server")
x.ServerStart Nothing

The error message returned when running the script is:

test.vbs(2, 1) (null): Library not registered.

I have debug code in the constructor for the class that implements
IRtdServer and have confirmed that the class is being initialized
successfully. Any calls to the IRtdServer interface, however, fail with the
above error message.

Any idea what the problem could be?
 
B

bradmo

I was able to find the source of the problem in the COM Shim Wizard generated
C++ code for the shim used to isolate the RTD component. In the RTD proxy
class definition located in RTDProxy.h, IDispatchImpl was explicitly pointing
to the Excel 1.5 type library. Changing it to 1.6 solved the problem.

IDispatchImpl<Excel::IRtdServer, &Excel::IID_IRtdServer,
&Excel::LIBID_Excel, 1, 5>

This was confusing because elsewhere in the generated code where the Excel
type library is being imported, no specific versions are being specified.
 

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