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
a5a91d17
Commit
a5a91d17
authored
Jul 15, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add support for INSTALLSTATE_ADVERTISED to MsiQueryFeatureState.
parent
baa6efa5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
15 deletions
+49
-15
msi.c
dlls/msi/msi.c
+49
-15
No files found.
dlls/msi/msi.c
View file @
a5a91d17
...
...
@@ -1117,10 +1117,12 @@ end:
*/
INSTALLSTATE
WINAPI
MsiQueryFeatureStateW
(
LPCWSTR
szProduct
,
LPCWSTR
szFeature
)
{
WCHAR
squishProduct
[
GUID_SIZE
],
buffer
[
MAX_FEATURE_CHARS
+
2
];
WCHAR
squishProduct
[
GUID_SIZE
],
comp
[
39
];
GUID
guid
;
LPWSTR
components
,
p
,
parent_feature
;
UINT
rc
;
DWORD
sz
,
type
;
HKEY
hkey
;
INSTALLSTATE
r
;
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szFeature
));
...
...
@@ -1130,30 +1132,62 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
if
(
!
squash_guid
(
szProduct
,
squishProduct
))
return
INSTALLSTATE_INVALIDARG
;
/* check that it's installed at all */
rc
=
MSIREG_OpenUserFeaturesKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
return
INSTALLSTATE_UNKNOWN
;
buffer
[
0
]
=
0
;
sz
=
sizeof
buffer
;
type
=
0
;
rc
=
RegQueryValueExW
(
hkey
,
szFeature
,
NULL
,
&
type
,
(
LPBYTE
)
buffer
,
&
sz
);
parent_feature
=
msi_reg_get_val_str
(
hkey
,
szFeature
);
RegCloseKey
(
hkey
);
TRACE
(
"rc = %d buffer = %s
\n
"
,
rc
,
debugstr_w
(
buffer
));
if
(
!
parent_feature
)
return
INSTALLSTATE_UNKNOWN
;
r
=
(
parent_feature
[
0
]
==
6
)
?
INSTALLSTATE_ABSENT
:
INSTALLSTATE_LOCAL
;
msi_free
(
parent_feature
);
if
(
r
==
INSTALLSTATE_ABSENT
)
return
r
;
if
(
rc
!=
ERROR_SUCCESS
||
sz
==
0
||
type
!=
REG_SZ
)
/* now check if it's complete or advertised */
rc
=
MSIREG_OpenFeaturesKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
return
INSTALLSTATE_UNKNOWN
;
if
(
buffer
[
0
]
==
6
)
return
INSTALLSTATE_ABSENT
;
components
=
msi_reg_get_val_str
(
hkey
,
szFeature
);
RegCloseKey
(
hkey
)
;
/* FIXME:
* Return INSTALLSTATE_ADVERTISED when
* the components exist in the registry, but not on the disk.
*/
TRACE
(
"rc = %d buffer = %s
\n
"
,
rc
,
debugstr_w
(
components
));
return
INSTALLSTATE_LOCAL
;
if
(
!
components
)
{
ERR
(
"components missing %s %s
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szFeature
));
return
INSTALLSTATE_UNKNOWN
;
}
r
=
INSTALLSTATE_LOCAL
;
for
(
p
=
components
;
(
*
p
!=
2
)
&&
(
lstrlenW
(
p
)
>
GUID_SIZE
);
p
+=
GUID_SIZE
)
{
if
(
!
decode_base85_guid
(
p
,
&
guid
))
{
ERR
(
"%s
\n
"
,
debugstr_w
(
p
));
break
;
}
StringFromGUID2
(
&
guid
,
comp
,
39
);
r
=
MsiGetComponentPathW
(
szProduct
,
comp
,
NULL
,
0
);
if
(
r
!=
INSTALLSTATE_LOCAL
&&
r
!=
INSTALLSTATE_SOURCE
)
{
TRACE
(
"component %s state %d
\n
"
,
debugstr_guid
(
&
guid
),
r
);
r
=
INSTALLSTATE_ADVERTISED
;
}
}
if
(
r
==
INSTALLSTATE_LOCAL
&&
*
p
!=
2
)
ERR
(
"%s -> %s
\n
"
,
debugstr_w
(
szFeature
),
debugstr_w
(
components
));
msi_free
(
components
);
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