Главная страница | назад

Article #10305: CBuilder4 patch broke MIDAS

Problem: When trying to set the Active property of a TClientDataSet to true in design mode the IDE reports a:

'src->QueryInterface (GetIID(), (LPVOID*)(&intf))': No such interface supported @ D:/CBUILD~1/INCLUDE/VCL/utilcls.h /2014 error message.

Workaround: This is a known bug that occurred when we released the patch to CBuilder4. The workaround to this is to edit the <SERVER> Impl.cpp file. You need to change everyplace in this file where the class tries to set an in/out parameter value with a IProviderPtr without typecasting the to a IProvider*

For example if you created a remote data module that exported a TTable called Table1 some of the server code generated would look as follows: ...

STDMETHODIMP TTestServerImpl::get_Table1(IProviderPtr* Value)




_di_IProvider IProv = m_DataModule->Table1->Provider;


*Value = IProv; //<- HERE IS ONE OF THE PROBLEMS!!!


catch(Exception &e)


return Error(e.Message.c_str(), IID_ITestServer);


return S_OK;



What you need to do is change the line:

*Value = IProv;


*Value = (IProvider*)IProv;

If you do this anywhere in this file that a return value (this includes out parameters) is an IProviderPtr the server should work fine.

Last Modified: 29-NOV-99