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) { try { _di_IProvider IProv = m_DataModule->Table1->Provider; IProv->AddRef(); *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; To: *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. |