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
fced2fee
Commit
fced2fee
authored
Dec 16, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Dec 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Check the user component key for the clients.
parent
5f7b95da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
35 deletions
+21
-35
registry.c
dlls/msi/registry.c
+3
-3
msi.c
dlls/msi/tests/msi.c
+18
-32
No files found.
dlls/msi/registry.c
View file @
fced2fee
...
@@ -1317,9 +1317,9 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
...
@@ -1317,9 +1317,9 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
if
(
!
szComponent
||
!*
szComponent
||
!
szProduct
)
if
(
!
szComponent
||
!*
szComponent
||
!
szProduct
)
return
ERROR_INVALID_PARAMETER
;
return
ERROR_INVALID_PARAMETER
;
r
=
MSIREG_Open
ComponentsKey
(
szComponent
,
&
hkeyComp
,
FALSE
);
r
=
MSIREG_Open
UserDataComponentKey
(
szComponent
,
&
hkeyComp
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_
NO_MORE_ITEMS
;
return
ERROR_
UNKNOWN_COMPONENT
;
sz
=
SQUISH_GUID_SIZE
;
sz
=
SQUISH_GUID_SIZE
;
r
=
RegEnumValueW
(
hkeyComp
,
index
,
szValName
,
&
sz
,
NULL
,
NULL
,
NULL
,
NULL
);
r
=
RegEnumValueW
(
hkeyComp
,
index
,
szValName
,
&
sz
,
NULL
,
NULL
,
NULL
,
NULL
);
...
...
dlls/msi/tests/msi.c
View file @
fced2fee
...
@@ -1628,10 +1628,7 @@ static void test_MsiEnumClients(void)
...
@@ -1628,10 +1628,7 @@ static void test_MsiEnumClients(void)
/* all params correct, component missing */
/* all params correct, component missing */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
todo_wine
ok
(
r
==
ERROR_UNKNOWN_COMPONENT
,
"Expected ERROR_UNKNOWN_COMPONENT, got %d
\n
"
,
r
);
{
ok
(
r
==
ERROR_UNKNOWN_COMPONENT
,
"Expected ERROR_UNKNOWN_COMPONENT, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
lstrcpyA
(
keypath
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
"
);
lstrcpyA
(
keypath
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
"
);
...
@@ -1666,20 +1663,14 @@ static void test_MsiEnumClients(void)
...
@@ -1666,20 +1663,14 @@ static void test_MsiEnumClients(void)
/* product value exists */
/* product value exists */
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
{
ok
(
!
lstrcmpA
(
product
,
prodcode
),
"Expected %s, got %s
\n
"
,
prodcode
,
product
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
product
,
prodcode
),
"Expected %s, got %s
\n
"
,
prodcode
,
product
);
}
/* try index 0 again */
/* try index 0 again */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
{
ok
(
!
lstrcmpA
(
product
,
prodcode
),
"Expected %s, got %s
\n
"
,
prodcode
,
product
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
product
,
prodcode
),
"Expected %s, got %s
\n
"
,
prodcode
,
product
);
}
/* try index 1, second product value does not exist */
/* try index 1, second product value does not exist */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
...
@@ -1696,27 +1687,22 @@ static void test_MsiEnumClients(void)
...
@@ -1696,27 +1687,22 @@ static void test_MsiEnumClients(void)
todo_wine
todo_wine
{
{
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
}
}
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
/* start the enumeration over */
/* start the enumeration over */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
{
ok
(
!
lstrcmpA
(
product
,
prodcode
)
||
!
lstrcmpA
(
product
,
prodcode2
),
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
"Expected %s or %s, got %s
\n
"
,
prodcode
,
prodcode2
,
product
);
ok
(
!
lstrcmpA
(
product
,
prodcode
)
||
!
lstrcmpA
(
product
,
prodcode2
),
"Expected %s or %s, got %s
\n
"
,
prodcode
,
prodcode2
,
product
);
}
/* correctly query second product */
/* correctly query second product */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
r
=
MsiEnumClientsA
(
component
,
1
,
product
);
r
=
MsiEnumClientsA
(
component
,
1
,
product
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
{
ok
(
!
lstrcmpA
(
product
,
prodcode
)
||
!
lstrcmpA
(
product
,
prodcode2
),
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
"Expected %s or %s, got %s
\n
"
,
prodcode
,
prodcode2
,
product
);
ok
(
!
lstrcmpA
(
product
,
prodcode
)
||
!
lstrcmpA
(
product
,
prodcode2
),
"Expected %s or %s, got %s
\n
"
,
prodcode
,
prodcode2
,
product
);
}
RegDeleteValueA
(
compkey
,
prod_squashed
);
RegDeleteValueA
(
compkey
,
prod_squashed
);
RegDeleteValueA
(
compkey
,
prod2_squashed
);
RegDeleteValueA
(
compkey
,
prod2_squashed
);
...
@@ -1733,10 +1719,7 @@ static void test_MsiEnumClients(void)
...
@@ -1733,10 +1719,7 @@ static void test_MsiEnumClients(void)
/* user local component key exists */
/* user local component key exists */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
r
=
MsiEnumClientsA
(
component
,
0
,
product
);
todo_wine
ok
(
r
==
ERROR_UNKNOWN_COMPONENT
,
"Expected ERROR_UNKNOWN_COMPONENT, got %d
\n
"
,
r
);
{
ok
(
r
==
ERROR_UNKNOWN_COMPONENT
,
"Expected ERROR_UNKNOWN_COMPONENT, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
/* index > 0, no products exist */
/* index > 0, no products exist */
...
@@ -1772,7 +1755,10 @@ static void test_MsiEnumClients(void)
...
@@ -1772,7 +1755,10 @@ static void test_MsiEnumClients(void)
/* try index 1, second product value does not exist */
/* try index 1, second product value does not exist */
product
[
0
]
=
'\0'
;
product
[
0
]
=
'\0'
;
r
=
MsiEnumClientsA
(
component
,
1
,
product
);
r
=
MsiEnumClientsA
(
component
,
1
,
product
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
ok
(
!
lstrcmpA
(
product
,
""
),
"Expected product to be unchanged, got %s
\n
"
,
product
);
res
=
RegSetValueExA
(
compkey
,
prod2_squashed
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"C:
\\
another"
,
10
);
res
=
RegSetValueExA
(
compkey
,
prod2_squashed
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"C:
\\
another"
,
10
);
...
...
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