diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 47c08a92237..9b311d7c45d 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 39908498db0..2874b715445 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