Commit 55b47054 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Forward MsiSourceListEnumSourcesA to a stub implementation of MsiSourceListEnumSourcesW.

parent de66aebe
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
261 stub MsiSourceListForceResolutionExA 261 stub MsiSourceListForceResolutionExA
262 stub MsiSourceListForceResolutionExW 262 stub MsiSourceListForceResolutionExW
263 stdcall MsiSourceListEnumSourcesA(str str long long long ptr ptr) 263 stdcall MsiSourceListEnumSourcesA(str str long long long ptr ptr)
264 stub MsiSourceListEnumSourcesW 264 stdcall MsiSourceListEnumSourcesW(wstr wstr long long long ptr ptr)
265 stdcall MsiSourceListGetInfoA(str str long long str ptr ptr) 265 stdcall MsiSourceListGetInfoA(str str long long str ptr ptr)
266 stdcall MsiSourceListGetInfoW(wstr wstr long long wstr ptr ptr) 266 stdcall MsiSourceListGetInfoW(wstr wstr long long wstr ptr ptr)
267 stdcall MsiSourceListSetInfoA(str str long long str str) 267 stdcall MsiSourceListSetInfoA(str str long long str str)
......
...@@ -148,8 +148,62 @@ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUser ...@@ -148,8 +148,62 @@ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUser
DWORD dwOptions, DWORD dwIndex, DWORD dwOptions, DWORD dwIndex,
LPSTR szSource, LPDWORD pcchSource) LPSTR szSource, LPDWORD pcchSource)
{ {
FIXME("(%s, %s, %d, %d, %d, %p, %p): stub!\n", szProductCodeOrPatch, szUserSid, LPWSTR product = NULL;
dwContext, dwOptions, dwIndex, szSource, pcchSource); LPWSTR usersid = NULL;
LPWSTR source = NULL;
DWORD len = 0;
UINT r;
TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_a(szProductCodeOrPatch),
debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource);
if (szSource && !pcchSource)
return ERROR_INVALID_PARAMETER;
if (szProductCodeOrPatch) product = strdupAtoW(szProductCodeOrPatch);
if (szUserSid) usersid = strdupAtoW(szUserSid);
r = MsiSourceListEnumSourcesW(product, usersid, dwContext, dwOptions,
dwIndex, NULL, &len);
if (r != ERROR_SUCCESS)
goto done;
source = msi_alloc(++len * sizeof(WCHAR));
if (!source)
return ERROR_OUTOFMEMORY;
*source = '\0';
r = MsiSourceListEnumSourcesW(product, usersid, dwContext, dwOptions,
dwIndex, source, &len);
if (r != ERROR_SUCCESS)
goto done;
len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL);
if (*pcchSource >= len)
WideCharToMultiByte(CP_ACP, 0, source, -1, szSource, len, NULL, NULL);
else if (szSource)
r = ERROR_MORE_DATA;
*pcchSource = len - 1;
done:
msi_free(product);
msi_free(usersid);
msi_free(source);
return r;
}
/******************************************************************
* MsiSourceListEnumSourcesA (MSI.@)
*/
UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUserSid,
MSIINSTALLCONTEXT dwContext,
DWORD dwOptions, DWORD dwIndex,
LPWSTR szSource, LPDWORD pcchSource)
{
FIXME("(%s, %s, %d, %d, %d, %p, %p): stub!\n", debugstr_w(szProductCodeOrPatch),
debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment