Commit 293bdffa authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Use a SQL marker to query the _Property table when fetching a property.

parent f36e13fd
......@@ -1403,16 +1403,36 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
static MSIRECORD *MSI_GetPropertyRow( MSIPACKAGE *package, LPCWSTR name )
{
MSIQUERY *view;
MSIRECORD *rec, *row = NULL;
UINT r;
static const WCHAR query[]= {
'S','E','L','E','C','T',' ','`','V','a','l','u','e','`',' ',
'F','R','O','M',' ' ,'`','_','P','r','o','p','e','r','t','y','`',
' ','W','H','E','R','E',' ' ,'`','_','P','r','o','p','e','r','t','y','`',
'=','\'','%','s','\'',0};
'=','?',0};
if (!name || !*name)
return NULL;
return MSI_QueryGetRecord( package->db, query, name );
rec = MSI_CreateRecord(1);
if (!rec)
return NULL;
MSI_RecordSetStringW(rec, 1, name);
r = MSI_DatabaseOpenViewW(package->db, query, &view);
if (r == ERROR_SUCCESS)
{
MSI_ViewExecute(view, rec);
MSI_ViewFetch(view, &row);
MSI_ViewClose(view);
msiobj_release(&view->hdr);
}
msiobj_release(&rec->hdr);
return row;
}
/* internal function, not compatible with MsiGetPropertyW */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment