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
bbdf79bc
Commit
bbdf79bc
authored
Feb 16, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Convert REG_DWORD properties to strings in MsiGetProductInfo.
parent
8412a136
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
msi.c
dlls/msi/msi.c
+28
-5
msi.c
dlls/msi/tests/msi.c
+0
-0
No files found.
dlls/msi/msi.c
View file @
bbdf79bc
...
...
@@ -561,6 +561,28 @@ done:
return
rc
;
}
static
LPWSTR
msi_reg_get_value
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
*
type
)
{
DWORD
dval
;
LONG
res
;
WCHAR
temp
[
20
];
static
const
WCHAR
format
[]
=
{
'%'
,
'd'
,
0
};
res
=
RegQueryValueExW
(
hkey
,
name
,
NULL
,
type
,
NULL
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
return
NULL
;
if
(
*
type
==
REG_SZ
)
return
msi_reg_get_val_str
(
hkey
,
name
);
if
(
!
msi_reg_get_val_dword
(
hkey
,
name
,
&
dval
))
return
NULL
;
sprintfW
(
temp
,
format
,
dval
);
return
strdupW
(
temp
);
}
static
UINT
WINAPI
MSI_GetProductInfo
(
LPCWSTR
szProduct
,
LPCWSTR
szAttribute
,
awstring
*
szValue
,
LPDWORD
pcchValueBuf
)
{
...
...
@@ -572,7 +594,7 @@ static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
BOOL
classes
=
FALSE
;
BOOL
badconfig
=
FALSE
;
LONG
res
;
DWORD
save
;
DWORD
save
,
type
;
static
WCHAR
empty
[]
=
{
0
};
static
const
WCHAR
sourcelist
[]
=
{
...
...
@@ -641,7 +663,7 @@ static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
else
if
(
!
lstrcmpW
(
szAttribute
,
INSTALLPROPERTY_VERSIONSTRINGW
))
szAttribute
=
display_version
;
val
=
msi_reg_get_val
_str
(
userdata
,
szAttribut
e
);
val
=
msi_reg_get_val
ue
(
userdata
,
szAttribute
,
&
typ
e
);
if
(
!
val
)
val
=
empty
;
}
...
...
@@ -669,18 +691,19 @@ static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
{
res
=
RegOpenKeyW
(
prodkey
,
sourcelist
,
&
source
);
if
(
res
==
ERROR_SUCCESS
)
val
=
msi_reg_get_val
_str
(
source
,
szAttribut
e
);
val
=
msi_reg_get_val
ue
(
source
,
szAttribute
,
&
typ
e
);
RegCloseKey
(
source
);
}
else
{
val
=
msi_reg_get_val
_str
(
prodkey
,
szAttribut
e
);
val
=
msi_reg_get_val
ue
(
prodkey
,
szAttribute
,
&
typ
e
);
if
(
!
val
)
val
=
empty
;
}
if
(
val
!=
empty
&&
!
lstrcmpW
(
szAttribute
,
INSTALLPROPERTY_PACKAGECODEW
))
if
(
val
!=
empty
&&
type
!=
REG_DWORD
&&
!
lstrcmpW
(
szAttribute
,
INSTALLPROPERTY_PACKAGECODEW
))
{
if
(
lstrlenW
(
val
)
!=
SQUISH_GUID_SIZE
-
1
)
badconfig
=
TRUE
;
...
...
dlls/msi/tests/msi.c
View file @
bbdf79bc
This diff is collapsed.
Click to expand it.
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