How can I return both an error string and error code to VB6 from an ATL activex control?
I'm trying to return a detailed error to VB6 using CComCoClass::Error , but it seems I can only return an error code /or/ a message - but not both. return Error(_T("Not connected"), __uuidof(IMyInterface), HRESULT_FROM_WIN32(ERROR_CONNECTION_INVALID)); results in a generic "Method 'Request' of object 'IMyInterface' failed" error message in Err.Description on the VB6 side (but ERROR_CONNECTION_INVALID in Err.Number), while return Error(_T("Not connected")); results in the appropriate error message, but a generic error code in Err.Number. How can I get the best of both worlds? Steffen Opel You