urlmon: Delay-load cabinet.dll as native urlmon doesn't import it.

Alexandre Julliard julliard at winehq.org
Fri Aug 4 03:31:43 CDT 2006


Robert Shearman <rob at codeweavers.com> writes:

> +    if (!hCabinet) return HRESULT_FROM_WIN32(GetLastError());
> +    pExtract = GetProcAddress(hCabinet, "Extract");
> +    if (!pExtract) return HRESULT_FROM_WIN32(GetLastError());
> +
> +    hr = pExtract(dest, szCabName);
> +    FreeLibrary(hCabinet);
> +    return hr;
> +}

Unless the app depends on it, it's usually better to not free the
library on each call, otherwise repeated calls to the function will be
very expensive. You can free the library in PROCESS_DETACH.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list