From: Anna R Békefi <annareginabekefi@gmail.com> --- dlls/combase/errorinfo.c | 70 ++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/dlls/combase/errorinfo.c b/dlls/combase/errorinfo.c index c383854e2d3..47934c199cb 100644 --- a/dlls/combase/errorinfo.c +++ b/dlls/combase/errorinfo.c @@ -499,14 +499,31 @@ static ULONG WINAPI restricted_errorinfo_Release(IRestrictedErrorInfo *iface) static HRESULT WINAPI restricted_errorinfo_GetErrorDetails(IRestrictedErrorInfo *iface, BSTR *description, HRESULT *error, BSTR *restricted_description, BSTR *capability_sid) { - FIXME("%p, %p, %p, %p, %p: stub\n", iface, description, error, restricted_description, capability_sid); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_IRestrictedErrorInfo(iface); + + TRACE("%p, %p, %p, %p, %p.\n", iface, description, error, restricted_description, capability_sid); + + if (description) + *description = info->description ? SysAllocString(info->description) : NULL; + if (error) + *error = info->hr; + if (restricted_description) + *restricted_description = info->restricted_description ? SysAllocString(info->restricted_description) : NULL; + if (capability_sid) + *capability_sid = info->capability_sid ? SysAllocString(info->capability_sid) : NULL; + + return S_OK; } static HRESULT WINAPI restricted_errorinfo_GetReference(IRestrictedErrorInfo *iface, BSTR *reference) { - FIXME("%p, %p: stub\n", iface, reference); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_IRestrictedErrorInfo(iface); + + TRACE("%p, %p.\n", iface, reference); + + if (!reference) return E_POINTER; + *reference = info->reference ? SysAllocString(info->reference) : NULL; + return S_OK; } static HRESULT WINAPI restricted_errorinfo_ierror_QueryInterface(IErrorInfo *iface, REFIID riid, void **obj) @@ -529,32 +546,57 @@ static ULONG WINAPI restricted_errorinfo_ierror_Release(IErrorInfo *iface) static HRESULT WINAPI restricted_errorinfo_ierror_GetGUID(IErrorInfo *iface, GUID *guid) { - FIXME("%p, %p: stub\n", iface, guid); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_restricted_IErrorInfo(iface); + + TRACE("%p, %p.\n", iface, guid); + + if (!guid) return E_INVALIDARG; + *guid = info->guid; + return S_OK; } static HRESULT WINAPI restricted_errorinfo_ierror_GetSource(IErrorInfo *iface, BSTR *source) { - FIXME("%p, %p: stub\n", iface, source); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_restricted_IErrorInfo(iface); + + TRACE("%p, %p.\n", iface, source); + + if (!source) return E_INVALIDARG; + *source = info->source ? SysAllocString(info->source) : NULL; + return S_OK; } static HRESULT WINAPI restricted_errorinfo_ierror_GetDescription(IErrorInfo *iface, BSTR *description) { - FIXME("%p, %p: stub\n", iface, description); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_restricted_IErrorInfo(iface); + + TRACE("%p, %p.\n", iface, description); + + if (!description) return E_INVALIDARG; + *description = info->description ? SysAllocString(info->description) : NULL; + return S_OK; } static HRESULT WINAPI restricted_errorinfo_ierror_GetHelpFile(IErrorInfo *iface, BSTR *helpfile) { - FIXME("%p, %p: stub\n", iface, helpfile); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_restricted_IErrorInfo(iface); + + TRACE("%p, %p.\n", iface, helpfile); + + if (!helpfile) return E_INVALIDARG; + *helpfile = info->help_file ? SysAllocString(info->help_file) : NULL; + return S_OK; } static HRESULT WINAPI restricted_errorinfo_ierror_GetHelpContext(IErrorInfo *iface, DWORD *help_context) { - FIXME("%p, %p: stub\n", iface, help_context); - return E_NOTIMPL; + struct restricted_error_info *info = impl_from_restricted_IErrorInfo(iface); + + TRACE("%p, %p.\n", iface, help_context); + + if (!help_context) return E_INVALIDARG; + *help_context = info->help_context; + return S_OK; } static const IErrorInfoVtbl restricted_errorinfo_ierror_vtbl = -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10659