Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f721a24a
Commit
f721a24a
authored
Oct 06, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Oct 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Perform button control events in greatest to least order.
parent
34aaea93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
1 deletion
+79
-1
dialog.c
dlls/msi/dialog.c
+1
-1
msipriv.h
dlls/msi/msipriv.h
+1
-0
msiquery.c
dlls/msi/msiquery.c
+77
-0
No files found.
dlls/msi/dialog.c
View file @
f721a24a
...
...
@@ -2914,7 +2914,7 @@ static UINT msi_dialog_button_handler( msi_dialog *dialog,
return
0
;
}
r
=
MSI_IterateRecords
(
view
,
0
,
msi_dialog_control_event
,
dialog
);
r
=
MSI_
Reverse
IterateRecords
(
view
,
0
,
msi_dialog_control_event
,
dialog
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
...
...
dlls/msi/msipriv.h
View file @
f721a24a
...
...
@@ -386,6 +386,7 @@ extern UINT MSI_OpenDatabaseW( LPCWSTR, LPCWSTR, MSIDATABASE ** );
extern
UINT
MSI_DatabaseOpenViewW
(
MSIDATABASE
*
,
LPCWSTR
,
MSIQUERY
**
);
extern
UINT
MSI_OpenQuery
(
MSIDATABASE
*
,
MSIQUERY
**
,
LPCWSTR
,
...
);
typedef
UINT
(
*
record_func
)(
MSIRECORD
*
,
LPVOID
);
extern
UINT
MSI_ReverseIterateRecords
(
MSIQUERY
*
,
DWORD
*
,
record_func
,
LPVOID
);
extern
UINT
MSI_IterateRecords
(
MSIQUERY
*
,
DWORD
*
,
record_func
,
LPVOID
);
extern
MSIRECORD
*
MSI_QueryGetRecord
(
MSIDATABASE
*
db
,
LPCWSTR
query
,
...
);
extern
UINT
MSI_DatabaseImport
(
MSIDATABASE
*
,
LPCWSTR
,
LPCWSTR
);
...
...
dlls/msi/msiquery.c
View file @
f721a24a
...
...
@@ -27,6 +27,7 @@
#include "winerror.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "msi.h"
#include "msiquery.h"
#include "objbase.h"
...
...
@@ -164,6 +165,82 @@ UINT MSI_OpenQuery( MSIDATABASE *db, MSIQUERY **view, LPCWSTR fmt, ... )
return
r
;
}
struct
rec_list
{
struct
list
entry
;
MSIRECORD
*
rec
;
};
UINT
MSI_ReverseIterateRecords
(
MSIQUERY
*
view
,
DWORD
*
count
,
record_func
func
,
LPVOID
param
)
{
MSIRECORD
*
rec
=
NULL
;
struct
rec_list
*
add_rec
;
struct
list
records
;
UINT
r
,
n
=
0
,
max
=
0
;
r
=
MSI_ViewExecute
(
view
,
NULL
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
list_init
(
&
records
);
if
(
count
)
max
=
*
count
;
/* reverse the query */
for
(
n
=
0
;
(
max
==
0
)
||
(
n
<
max
);
n
++
)
{
r
=
MSI_ViewFetch
(
view
,
&
rec
);
if
(
r
!=
ERROR_SUCCESS
)
{
if
(
r
==
ERROR_NO_MORE_ITEMS
)
break
;
else
goto
done
;
}
add_rec
=
msi_alloc
(
sizeof
(
*
add_rec
)
);
if
(
!
add_rec
)
goto
done
;
add_rec
->
rec
=
rec
;
list_add_head
(
&
records
,
&
add_rec
->
entry
);
}
/* iterate over the reversed records */
n
=
0
;
LIST_FOR_EACH_ENTRY
(
add_rec
,
&
records
,
struct
rec_list
,
entry
)
{
if
(
func
)
r
=
func
(
add_rec
->
rec
,
param
);
msiobj_release
(
&
add_rec
->
rec
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
n
++
;
}
done:
MSI_ViewClose
(
view
);
while
(
!
list_empty
(
&
records
)
)
{
add_rec
=
LIST_ENTRY
(
list_head
(
&
records
),
struct
rec_list
,
entry
);
list_remove
(
&
add_rec
->
entry
);
msi_free
(
add_rec
);
}
if
(
count
)
*
count
=
n
;
if
(
r
==
ERROR_NO_MORE_ITEMS
)
r
=
ERROR_SUCCESS
;
return
r
;
}
UINT
MSI_IterateRecords
(
MSIQUERY
*
view
,
DWORD
*
count
,
record_func
func
,
LPVOID
param
)
{
...
...
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