Module: wine Branch: master Commit: 5f442207d579dc3d6cf5243c4c63c6be966edccc URL: http://source.winehq.org/git/wine.git/?a=commit;h=5f442207d579dc3d6cf5243c4c...
Author: James Hawkins truiken@gmail.com Date: Mon Aug 6 19:36:28 2007 -0700
msi: Forward MsiQueryComponentStateA to MsiQueryComponentStateW.
---
dlls/msi/msi.c | 35 +++++++++++++++++++++++++++++++++-- dlls/msi/msi.spec | 2 +- 2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 47c08a9..9b311d7 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -732,9 +732,40 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes) return ERROR_SUCCESS; }
-UINT WINAPI MsiQueryComponentStateA(LPCSTR szProductCode, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, LPCSTR szComponent, INSTALLSTATE *pdwState) +UINT WINAPI MsiQueryComponentStateA(LPCSTR szProductCode, + LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, + LPCSTR szComponent, INSTALLSTATE *pdwState) { - FIXME("(%s, %s, %d, %s, %p): stub!\n", debugstr_a(szProductCode), debugstr_a(szUserSid), dwContext, debugstr_a(szComponent), pdwState); + LPWSTR prodcode = NULL, usersid = NULL, comp = NULL; + UINT r; + + TRACE("(%s, %s, %d, %s, %p)\n", debugstr_a(szProductCode), + debugstr_a(szUserSid), dwContext, debugstr_a(szComponent), pdwState); + + if (szProductCode && !(prodcode = strdupAtoW(szProductCode))) + return ERROR_OUTOFMEMORY; + + if (szUserSid && !(usersid = strdupAtoW(szUserSid))) + return ERROR_OUTOFMEMORY; + + if (szComponent && !(comp = strdupAtoW(szComponent))) + return ERROR_OUTOFMEMORY; + + r = MsiQueryComponentStateW(prodcode, usersid, dwContext, comp, pdwState); + + msi_free(prodcode); + msi_free(usersid); + msi_free(comp); + + return r; +} + +UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode, + LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, + LPCWSTR szComponent, INSTALLSTATE *pdwState) +{ + FIXME("(%s, %s, %d, %s, %p): stub!\n", debugstr_w(szProductCode), + debugstr_w(szUserSid), dwContext, debugstr_w(szComponent), pdwState);
if (!pdwState) return ERROR_INVALID_PARAMETER; diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index 3990849..2874b71 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -243,7 +243,7 @@ 247 stub MsiGetProductInfoExA 248 stub MsiGetProductInfoExW 249 stdcall MsiQueryComponentStateA(str str long str ptr) -250 stub MsiQueryComponentStateW +250 stdcall MsiQueryComponentStateW(wstr wstr long wstr ptr) 251 stub MsiQueryFeatureStateExA 252 stub MsiQueryFeatureStateExW 253 stub MsiDeterminePatchSequenceA