Fix AssocQueryString() error reporting in wxMSW.
Don't report ERROR_NO_ASSOCIATION as an (unexpected) error, it is perfectly normal to get it if a command is not defined for the given extension. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -262,11 +262,15 @@ wxString wxAssocQueryString(ASSOCSTR assoc,
|
||||
&dwSize // And its size
|
||||
);
|
||||
|
||||
// Do not use FAILED() here as S_FALSE can be returned but is still an
|
||||
// error in this context.
|
||||
// Do not use SUCCEEDED() here as S_FALSE could, in principle, be returned
|
||||
// but would still be an error in this context.
|
||||
if ( hr != S_OK )
|
||||
{
|
||||
wxLogApiError("AssocQueryString", hr);
|
||||
// The only really expected error here is that no association is
|
||||
// defined, anything else is not expected.
|
||||
if ( hr != HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) )
|
||||
wxLogApiError("AssocQueryString", hr);
|
||||
|
||||
return wxString();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user