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
1b548812
Commit
1b548812
authored
Apr 26, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand some handling of special properties in MsiGetProductInfo.
parent
f47c0b2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
5 deletions
+59
-5
msi.c
dlls/msi/msi.c
+59
-5
No files found.
dlls/msi/msi.c
View file @
1b548812
...
...
@@ -473,6 +473,14 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
{
MSIHANDLE
hProduct
;
UINT
r
;
static
const
WCHAR
szPackageCode
[]
=
{
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
szVersionString
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
szProductVersion
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szAssignmentType
[]
=
{
'A'
,
's'
,
's'
,
'i'
,
'g'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
FIXME
(
"%s %s %p %p
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szAttribute
),
szBuffer
,
pcchValueBuf
);
...
...
@@ -481,13 +489,59 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
return
ERROR_INVALID_PARAMETER
;
if
(
NULL
==
szProduct
||
NULL
==
szAttribute
)
return
ERROR_INVALID_PARAMETER
;
/* check for special properties */
if
(
strcmpW
(
szAttribute
,
szPackageCode
)
==
0
)
{
HKEY
hkey
;
WCHAR
squished
[
GUID_SIZE
];
WCHAR
package
[
200
];
DWORD
sz
=
sizeof
(
squished
);
r
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_UNKNOWN_PRODUCT
;
r
=
RegQueryValueExW
(
hkey
,
szPackageCode
,
NULL
,
NULL
,
(
LPBYTE
)
squished
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_UNKNOWN_PRODUCT
;
unsquash_guid
(
squished
,
package
);
*
pcchValueBuf
=
strlenW
(
package
);
if
(
strlenW
(
package
)
>
*
pcchValueBuf
)
return
ERROR_MORE_DATA
;
else
strcpyW
(
szBuffer
,
package
);
r
=
MsiOpenProductW
(
szProduct
,
&
hProduct
);
if
(
ERROR_SUCCESS
!=
r
)
return
r
;
r
=
ERROR_SUCCESS
;
}
else
if
(
strcmpW
(
szAttribute
,
szVersionString
)
==
0
)
{
r
=
MsiOpenProductW
(
szProduct
,
&
hProduct
);
if
(
ERROR_SUCCESS
!=
r
)
return
r
;
r
=
MsiGetPropertyW
(
hProduct
,
szProductVersion
,
szBuffer
,
pcchValueBuf
);
MsiCloseHandle
(
hProduct
);
}
else
if
(
strcmpW
(
szAttribute
,
szAssignmentType
)
==
0
)
{
FIXME
(
"0 (zero) if advertised, 1(one) if per machine.
\n
"
);
if
(
szBuffer
)
szBuffer
[
0
]
=
1
;
r
=
ERROR_SUCCESS
;
}
else
{
r
=
MsiOpenProductW
(
szProduct
,
&
hProduct
);
if
(
ERROR_SUCCESS
!=
r
)
return
r
;
r
=
MsiGetPropertyW
(
hProduct
,
szAttribute
,
szBuffer
,
pcchValueBuf
);
MsiCloseHandle
(
hProduct
);
}
r
=
MsiGetPropertyW
(
hProduct
,
szAttribute
,
szBuffer
,
pcchValueBuf
);
MsiCloseHandle
(
hProduct
);
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