oleaut32: Dont output an error when the typelib cannot be found

Alexandre Julliard julliard at winehq.org
Tue Dec 18 05:55:51 CST 2012


Alistair Leslie-Hughes <leslie_alistair at hotmail.com> writes:

> diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
> index fa9b050..04914e0 100644
> --- a/dlls/oleaut32/typelib.c
> +++ b/dlls/oleaut32/typelib.c
> @@ -2544,9 +2544,11 @@ static HRESULT TLB_PEFile_Open(LPCWSTR path, INT index, LPVOID *ppBase, DWORD *p
>                      return S_OK;
>                  }
>              }
> -
> -            hr = E_FAIL;
>          }
> +
> +        TRACE("No TYPELIB resource found\n");
> +        hr = E_FAIL;
> +        SetLastError(0);

Setting last error to 0 is almost always wrong. In this case it's most
likely just a side effect of CreateFile, and shouldn't need to be done
explicitly.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list