msi: Use MSI_QueryGetRecord in ACTION_AppSearchComponents.
This commit is contained in:
parent
a1c969ee23
commit
fa6bc9e50b
|
@ -154,67 +154,34 @@ static void ACTION_FreeSignature(MSISIGNATURE *sig)
|
||||||
msi_free(sig->Languages);
|
msi_free(sig->Languages);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT ACTION_AppSearchComponents(MSIPACKAGE *package, LPWSTR *appValue,
|
static UINT ACTION_AppSearchComponents(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATURE *sig)
|
||||||
MSISIGNATURE *sig)
|
|
||||||
{
|
{
|
||||||
MSIQUERY *view;
|
static const WCHAR query[] = {
|
||||||
UINT rc;
|
's','e','l','e','c','t',' ','*',' ',
|
||||||
static const WCHAR ExecSeqQuery[] = {
|
'f','r','o','m',' ',
|
||||||
's','e','l','e','c','t',' ','*',' ',
|
'C','o','m','p','L','o','c','a','t','o','r',' ',
|
||||||
'f','r','o','m',' ',
|
'w','h','e','r','e',' ','S','i','g','n','a','t','u','r','e','_',' ','=',' ',
|
||||||
'C','o','m','p','L','o','c','a','t','o','r',' ',
|
'\'','%','s','\'',0};
|
||||||
'w','h','e','r','e',' ','S','i','g','n','a','t','u','r','e','_',' ','=',' ',
|
MSIRECORD *row;
|
||||||
'\'','%','s','\'',0};
|
LPWSTR guid;
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(sig->Name));
|
||||||
|
|
||||||
TRACE("(package %p, appValue %p, sig %p)\n", package, appValue, sig);
|
|
||||||
*appValue = NULL;
|
*appValue = NULL;
|
||||||
rc = MSI_OpenQuery(package->db, &view, ExecSeqQuery, sig->Name);
|
|
||||||
if (rc == ERROR_SUCCESS)
|
row = MSI_QueryGetRecord( package->db, query, sig->Name );
|
||||||
|
if (!row)
|
||||||
{
|
{
|
||||||
MSIRECORD *row = 0;
|
TRACE("failed to query CompLocator for %s\n", debugstr_w(sig->Name));
|
||||||
WCHAR guid[50];
|
return ERROR_SUCCESS;
|
||||||
DWORD sz;
|
|
||||||
|
|
||||||
rc = MSI_ViewExecute(view, 0);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
TRACE("MSI_ViewExecute returned %d\n", rc);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
rc = MSI_ViewFetch(view,&row);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
TRACE("MSI_ViewFetch returned %d\n", rc);
|
|
||||||
rc = ERROR_SUCCESS;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get GUID */
|
|
||||||
guid[0] = 0;
|
|
||||||
sz=sizeof(guid)/sizeof(guid[0]);
|
|
||||||
rc = MSI_RecordGetStringW(row,2,guid,&sz);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
ERR("Error is %x\n",rc);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
FIXME("AppSearch unimplemented for CompLocator table (GUID %s)\n",
|
|
||||||
debugstr_w(guid));
|
|
||||||
|
|
||||||
end:
|
|
||||||
if (row)
|
|
||||||
msiobj_release(&row->hdr);
|
|
||||||
MSI_ViewClose(view);
|
|
||||||
msiobj_release(&view->hdr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TRACE("MSI_OpenQuery returned %d\n", rc);
|
|
||||||
rc = ERROR_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("returning %d\n", rc);
|
guid = msi_dup_record_field( row, 2 );
|
||||||
return rc;
|
FIXME("AppSearch CompLocator (%s) unimplemented\n", debugstr_w(guid));
|
||||||
|
msi_free( guid );
|
||||||
|
msiobj_release( &row->hdr );
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ACTION_ConvertRegValue(DWORD regType, const BYTE *value, DWORD sz,
|
static void ACTION_ConvertRegValue(DWORD regType, const BYTE *value, DWORD sz,
|
||||||
|
|
Loading…
Reference in New Issue