Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
77b514fe
Commit
77b514fe
authored
Nov 28, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use MSI_IterateRecords in ACTION_AppSearch.
parent
63afb3f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
52 deletions
+37
-52
appsearch.c
dlls/msi/appsearch.c
+37
-52
No files found.
dlls/msi/appsearch.c
View file @
77b514fe
...
...
@@ -844,65 +844,50 @@ static UINT ACTION_AppSearchSigName(MSIPACKAGE *package, LPCWSTR sigName,
return
rc
;
}
/* http://msdn.microsoft.com/library/en-us/msi/setup/appsearch_table.asp
* is the best reference for the AppSearch table and how it's used.
*/
UINT
ACTION_AppSearch
(
MSIPACKAGE
*
package
)
static
UINT
iterate_appsearch
(
MSIRECORD
*
row
,
LPVOID
param
)
{
MSIQUERY
*
view
;
UINT
rc
;
static
const
WCHAR
ExecSeqQuery
[]
=
{
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
' '
,
'*'
,
' '
,
'f'
,
'r'
,
'o'
,
'm'
,
' '
,
'A'
,
'p'
,
'p'
,
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
0
};
MSIPACKAGE
*
package
=
param
;
LPWSTR
propName
,
sigName
,
value
=
NULL
;
MSISIGNATURE
sig
;
UINT
r
;
rc
=
MSI_OpenQuery
(
package
->
db
,
&
view
,
ExecSeqQuery
);
if
(
rc
==
ERROR_SUCCESS
)
{
MSIRECORD
*
row
=
0
;
LPWSTR
propName
,
sigName
;
/* get property and signature */
propName
=
msi_dup_record_field
(
row
,
1
);
sigName
=
msi_dup_record_field
(
row
,
2
);
rc
=
MSI_ViewExecute
(
view
,
0
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
propName
),
debugstr_w
(
sigName
));
while
(
!
rc
)
{
MSISIGNATURE
sig
;
LPWSTR
value
=
NULL
;
rc
=
MSI_ViewFetch
(
view
,
&
row
);
if
(
rc
!=
ERROR_SUCCESS
)
{
rc
=
ERROR_SUCCESS
;
break
;
}
r
=
ACTION_AppSearchSigName
(
package
,
sigName
,
&
sig
,
&
value
);
if
(
value
)
{
MSI_SetPropertyW
(
package
,
propName
,
value
);
msi_free
(
value
);
}
ACTION_FreeSignature
(
&
sig
);
msi_free
(
propName
);
msi_free
(
sigName
);
/* get property and signature */
propName
=
msi_dup_record_field
(
row
,
1
);
sigName
=
msi_dup_record_field
(
row
,
2
);
return
r
;
}
TRACE
(
"Searching for Property %s, Signature_ %s
\n
"
,
debugstr_w
(
propName
),
debugstr_w
(
sigName
));
/* http://msdn.microsoft.com/library/en-us/msi/setup/appsearch_table.asp
* is the best reference for the AppSearch table and how it's used.
*/
UINT
ACTION_AppSearch
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
query
[]
=
{
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
' '
,
'*'
,
' '
,
'f'
,
'r'
,
'o'
,
'm'
,
' '
,
'A'
,
'p'
,
'p'
,
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
0
};
MSIQUERY
*
view
=
NULL
;
UINT
r
;
rc
=
ACTION_AppSearchSigName
(
package
,
sigName
,
&
sig
,
&
value
);
if
(
value
)
{
MSI_SetPropertyW
(
package
,
propName
,
value
);
msi_free
(
value
);
}
ACTION_FreeSignature
(
&
sig
);
msi_free
(
propName
);
msi_free
(
sigName
);
msiobj_release
(
&
row
->
hdr
);
}
r
=
MSI_OpenQuery
(
package
->
db
,
&
view
,
query
);
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
end:
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
}
else
rc
=
ERROR_SUCCESS
;
r
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_appsearch
,
package
);
msiobj_release
(
&
view
->
hdr
);
return
r
c
;
return
r
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment