[PATCH 3/4] msi: Handle the remote case directly in MsiGetSourcePathA().
Hans Leidekker
hans at codeweavers.com
Thu May 17 03:25:42 CDT 2018
On Wed, 2018-05-16 at 21:14 -0500, Zebediah Figura wrote:
> +UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DWORD *sz)
> {
> - LPWSTR folder;
> - awstring str;
> + MSIPACKAGE *package;
> + const WCHAR *path;
> + WCHAR *folderW;
> UINT r;
>
> - TRACE("%s %p %p\n", debugstr_a(szFolder), szPathBuf, pcchPathBuf);
> + TRACE("%s %p %p\n", debugstr_a(folder), buf, sz);
>
> - str.unicode = FALSE;
> - str.str.a = szPathBuf;
> + if (!folder)
> + return ERROR_INVALID_PARAMETER;
>
> - folder = strdupAtoW( szFolder );
> - r = MSI_GetSourcePath( hInstall, folder, &str, pcchPathBuf );
> - msi_free( folder );
> + if (!(folderW = strdupAtoW(folder)))
> + return ERROR_OUTOFMEMORY;
>
> + package = msihandle2msiinfo(hinst, MSIHANDLETYPE_PACKAGE);
> + if (!package)
> + {
> + WCHAR *path = NULL;
> + MSIHANDLE remote;
> +
> + if (!(remote = msi_get_remote(hinst)))
> + return ERROR_INVALID_HANDLE;
Same here.
More information about the wine-devel
mailing list