msi 1: Implement MsiSourceListGetInfoA
James Hawkins
truiken at gmail.com
Wed Jun 27 16:13:35 CDT 2007
Hi,
Changelog:
* Implement MsiSourceListGetInfoA.
dlls/msi/msi.spec | 2 +-
dlls/msi/source.c | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletions(-)
--
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec
index c419ee7..6aa8957 100644
--- a/dlls/msi/msi.spec
+++ b/dlls/msi/msi.spec
@@ -258,7 +258,7 @@
262 stub MsiSourceListForceResolutionExW
263 stub MsiSourceListEnumSourcesA
264 stub MsiSourceListEnumSourcesW
-265 stub MsiSourceListGetInfoA
+265 stdcall MsiSourceListGetInfoA(str str long long str ptr ptr)
266 stub MsiSourceListGetInfoW
267 stub MsiSourceListSetInfoA
268 stub MsiSourceListSetInfoW
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index 3b3e47f..7733d0f 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -149,6 +149,47 @@ static UINT find_given_source(HKEY key,
return rc;
}
+UINT WINAPI MsiSourceListGetInfoA( LPCSTR szProduct, LPCSTR szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
+ LPCSTR szProperty, LPSTR szValue,
+ LPDWORD pcchValue)
+{
+ UINT ret;
+ LPWSTR product = NULL;
+ LPWSTR usersid = NULL;
+ LPWSTR property = NULL;
+ LPWSTR value = NULL;
+
+ if (!pcchValue)
+ return ERROR_INVALID_PARAMETER;
+
+ if (szProduct) product = strdupAtoW(szProduct);
+ if (szUserSid) usersid = strdupAtoW(szUserSid);
+ if (szProperty) property = strdupAtoW(szProperty);
+
+ if (szValue)
+ {
+ value = HeapAlloc(GetProcessHeap(), 0, *pcchValue * sizeof(WCHAR));
+ if (!value)
+ {
+ ret = ERROR_OUTOFMEMORY;
+ goto done;
+ }
+ }
+
+ ret = MsiSourceListGetInfoW(product, usersid, dwContext, dwOptions,
+ property, value, pcchValue);
+ if (ret == ERROR_SUCCESS)
+ WideCharToMultiByte(CP_ACP, 0, value, -1, szValue, *pcchValue, NULL, NULL);
+
+done:
+ msi_free(product);
+ msi_free(usersid);
+ msi_free(property);
+ msi_free(value);
+ return ret;
+}
+
/******************************************************************
* MsiSourceListGetInfoW (MSI.@)
*/
--
1.4.1
More information about the wine-patches
mailing list