wine/dlls/msi msi.c
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 10 05:06:04 CST 2005
ChangeSet ID: 21204
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/10 05:06:04
Modified files:
dlls/msi : msi.c
Log message:
Aric Stewart <aric at codeweavers.com>
Use MsiDecomposeDescriptorW in MsiProvideQualifiedComponentExW.
Patch: http://cvs.winehq.org/patch.py?id=21204
Old revision New revision Changes Path
1.115 1.116 +8 -25 wine/dlls/msi/msi.c
Index: wine/dlls/msi/msi.c
diff -u -p wine/dlls/msi/msi.c:1.115 wine/dlls/msi/msi.c:1.116
--- wine/dlls/msi/msi.c:1.115 10 Nov 2005 11: 6: 4 -0000
+++ wine/dlls/msi/msi.c 10 Nov 2005 11: 6: 4 -0000
@@ -1491,6 +1491,9 @@ end:
return ret;
}
+/***********************************************************************
+ * MsiProvideQualifiedComponentExW [MSI.@]
+ */
UINT WINAPI MsiProvideQualifiedComponentExW(LPCWSTR szComponent,
LPCWSTR szQualifier, DWORD dwInstallMode, LPWSTR szProduct,
DWORD Unused1, DWORD Unused2, LPWSTR lpPathBuf,
@@ -1500,10 +1503,9 @@ UINT WINAPI MsiProvideQualifiedComponent
UINT rc;
LPWSTR info;
DWORD sz;
- LPWSTR product = NULL;
- LPWSTR component = NULL;
- LPWSTR ptr;
- GUID clsid;
+ WCHAR product[MAX_FEATURE_CHARS+1];
+ WCHAR component[MAX_FEATURE_CHARS+1];
+ WCHAR feature[MAX_FEATURE_CHARS+1];
TRACE("%s %s %li %s %li %li %p %p\n", debugstr_w(szComponent),
debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct),
@@ -1530,25 +1532,8 @@ UINT WINAPI MsiProvideQualifiedComponent
return ERROR_INDEX_ABSENT;
}
- /* find the component */
- ptr = strchrW(&info[20],'>');
- if (ptr)
- ptr++;
- else
- {
- RegCloseKey(hkey);
- msi_free(info);
- return ERROR_INDEX_ABSENT;
- }
-
- if (!szProduct)
- {
- decode_base85_guid(info,&clsid);
- StringFromCLSID(&clsid, &product);
- }
- decode_base85_guid(ptr,&clsid);
- StringFromCLSID(&clsid, &component);
-
+ MsiDecomposeDescriptorW(info, product, feature, component, &sz);
+
if (!szProduct)
rc = MsiGetComponentPathW(product, component, lpPathBuf, pcchPathBuf);
else
@@ -1556,8 +1541,6 @@ UINT WINAPI MsiProvideQualifiedComponent
RegCloseKey(hkey);
msi_free(info);
- msi_free(product);
- msi_free(component);
if (rc == INSTALLSTATE_LOCAL)
return ERROR_SUCCESS;
More information about the wine-cvs
mailing list