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
98a42ad5
Commit
98a42ad5
authored
Oct 17, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix tables with binary data where the key is an integer.
parent
1f737c03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
table.c
dlls/msi/table.c
+29
-11
db.c
dlls/msi/tests/db.c
+0
-2
No files found.
dlls/msi/table.c
View file @
98a42ad5
...
...
@@ -27,16 +27,17 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#include "msi.h"
#include "msiquery.h"
#include "objbase.h"
#include "objidl.h"
#include "msipriv.h"
#include "winnls.h"
#include "msipriv.h"
#include "query.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msidb
);
#define MSITABLE_HASH_TABLE_SIZE 37
...
...
@@ -1104,6 +1105,7 @@ static UINT TABLE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, ISt
LPWSTR
full_name
;
DWORD
len
;
static
const
WCHAR
szDot
[]
=
{
'.'
,
0
};
WCHAR
number
[
0x20
];
if
(
!
view
->
ops
->
fetch_int
)
return
ERROR_INVALID_PARAMETER
;
...
...
@@ -1118,15 +1120,31 @@ static UINT TABLE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, ISt
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
/* now get the column with the name of the stream */
r
=
view
->
ops
->
fetch_int
(
view
,
row
,
ival
,
&
refcol
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
/* check the column value is in range */
if
(
ival
<
0
||
ival
>
tv
->
num_cols
||
ival
==
col
)
{
ERR
(
"bad column ref (%u) for stream
\n
"
,
ival
);
return
ERROR_FUNCTION_FAILED
;
}
/* lookup the string value from the string table */
sval
=
msi_string_lookup_id
(
tv
->
db
->
strings
,
refcol
);
if
(
!
sval
)
return
ERROR_INVALID_PARAMETER
;
if
(
tv
->
columns
[
ival
-
1
].
type
&
MSITYPE_STRING
)
{
/* now get the column with the name of the stream */
r
=
view
->
ops
->
fetch_int
(
view
,
row
,
ival
,
&
refcol
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
/* lookup the string value from the string table */
sval
=
msi_string_lookup_id
(
tv
->
db
->
strings
,
refcol
);
if
(
!
sval
)
return
ERROR_INVALID_PARAMETER
;
}
else
{
static
const
WCHAR
fmt
[]
=
{
'%'
,
'd'
,
0
};
sprintfW
(
number
,
fmt
,
ival
);
sval
=
number
;
}
len
=
lstrlenW
(
tv
->
name
)
+
2
+
lstrlenW
(
sval
);
full_name
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
...
...
dlls/msi/tests/db.c
View file @
98a42ad5
...
...
@@ -1983,7 +1983,6 @@ static void test_try_transform(void)
r
=
do_query
(
hdb
,
query
,
&
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"select query failed
\n
"
);
todo_wine
{
/* check the contents of the stream */
sz
=
sizeof
buffer
;
r
=
MsiRecordReadStream
(
hrec
,
1
,
buffer
,
&
sz
);
...
...
@@ -1991,7 +1990,6 @@ static void test_try_transform(void)
ok
(
!
memcmp
(
buffer
,
"naengmyon"
,
9
),
"stream data was wrong
\n
"
);
ok
(
sz
==
9
,
"stream data was wrong size
\n
"
);
if
(
hrec
)
MsiCloseHandle
(
hrec
);
}
MsiCloseHandle
(
hdb
);
...
...
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