static HRESULT Error(HRESULT hResult, const CComBSTR & message)
HRESULT Error(HRESULT hResult, const char * message)
static HRESULT Error(HRESULT hResult, const CComBSTR & message){    CComPtr<ICreateErrorInfo> pCreateError;    CComPtr<IErrorInfo> pError;    HRESULT result = CreateErrorInfo(&pCreateError);    if(FAILED(result))        return E_NOTIMPL;    result = pCreateError->QueryInterface(&pError);    if(FAILED(result))        return E_NOTIMPL;    result = pCreateError->SetDescription(message);    if(FAILED(result))        return E_NOTIMPL;    result = pCreateError->SetGUID(IID_IDispatch);    if(FAILED(result))        return E_NOTIMPL;    CComBSTR source(L"@mozilla.XPCDispatchTearOff");    result = pCreateError->SetSource(source);    if(FAILED(result))        return E_NOTIMPL;    result = SetErrorInfo(0, pError);    if(FAILED(result))        return E_NOTIMPL;    return hResult;}