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
d880470d
Commit
d880470d
authored
Aug 28, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Handle converting a value of REG_DWORD in MsiSourceListEnumMediaDisks.
parent
a50fc2cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
source.c
dlls/msi/source.c
+24
-3
source.c
dlls/msi/tests/source.c
+4
-7
No files found.
dlls/msi/source.c
View file @
d880470d
...
...
@@ -208,9 +208,10 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
LPWSTR
szDiskPrompt
,
LPDWORD
pcchDiskPrompt
)
{
WCHAR
squished_pc
[
GUID_SIZE
];
WCHAR
convert
[
11
];
LPWSTR
value
=
NULL
;
LPWSTR
data
=
NULL
;
LPWSTR
ptr
;
LPWSTR
ptr
,
ptr2
;
HKEY
source
,
media
;
DWORD
valuesz
,
datasz
=
0
;
DWORD
type
;
...
...
@@ -219,6 +220,8 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
UINT
r
;
static
int
index
=
0
;
static
const
WCHAR
fmt
[]
=
{
'#'
,
'%'
,
'd'
,
0
};
TRACE
(
"(%s, %s, %d, %d, %d, %p, %p, %p, %p)
\n
"
,
debugstr_w
(
szProductCodeOrPatchCode
),
debugstr_w
(
szUserSid
),
dwContext
,
dwOptions
,
dwIndex
,
szVolumeLabel
,
pcchVolumeLabel
,
szDiskPrompt
,
pcchDiskPrompt
);
...
...
@@ -285,6 +288,7 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
if
(
pdwDiskId
)
*
pdwDiskId
=
atolW
(
value
);
ptr2
=
data
;
ptr
=
strchrW
(
data
,
';'
);
if
(
!
ptr
)
ptr
=
data
;
...
...
@@ -293,11 +297,19 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
if
(
pcchVolumeLabel
)
{
size
=
lstrlenW
(
data
);
if
(
type
==
REG_DWORD
)
{
sprintfW
(
convert
,
fmt
,
*
data
);
size
=
lstrlenW
(
convert
);
ptr2
=
convert
;
}
else
size
=
lstrlenW
(
data
);
if
(
size
>=
*
pcchVolumeLabel
)
r
=
ERROR_MORE_DATA
;
else
if
(
szVolumeLabel
)
lstrcpyW
(
szVolumeLabel
,
data
);
lstrcpyW
(
szVolumeLabel
,
ptr2
);
*
pcchVolumeLabel
=
size
;
}
...
...
@@ -307,6 +319,15 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
if
(
!*
ptr
)
ptr
++
;
if
(
type
==
REG_DWORD
)
{
sprintfW
(
convert
,
fmt
,
*
ptr
);
size
=
lstrlenW
(
convert
);
ptr
=
convert
;
}
else
size
=
lstrlenW
(
ptr
);
size
=
lstrlenW
(
ptr
);
if
(
size
>=
*
pcchDiskPrompt
)
r
=
ERROR_MORE_DATA
;
...
...
dlls/msi/tests/source.c
View file @
d880470d
...
...
@@ -2864,13 +2864,10 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt
,
&
promptsz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
id
==
1
,
"Expected 1, got %d
\n
"
,
id
);
todo_wine
{
ok
(
!
lstrcmpA
(
label
,
"#42"
),
"Expected
\"
#42
\"
, got
\"
%s
\"\n
"
,
label
);
ok
(
labelsz
==
3
,
"Expected 3, got %d
\n
"
,
labelsz
);
ok
(
!
lstrcmpA
(
prompt
,
"#42"
),
"Expected
\"
#42
\"
, got
\"
%s
\"\n
"
,
prompt
);
ok
(
promptsz
==
3
,
"Expected 3, got %d
\n
"
,
promptsz
);
}
ok
(
!
lstrcmpA
(
label
,
"#42"
),
"Expected
\"
#42
\"
, got
\"
%s
\"\n
"
,
label
);
ok
(
labelsz
==
3
,
"Expected 3, got %d
\n
"
,
labelsz
);
ok
(
!
lstrcmpA
(
prompt
,
"#42"
),
"Expected
\"
#42
\"
, got
\"
%s
\"\n
"
,
prompt
);
ok
(
promptsz
==
3
,
"Expected 3, got %d
\n
"
,
promptsz
);
RegDeleteValueA
(
media
,
"1"
);
RegDeleteValueA
(
media
,
"2"
);
...
...
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