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
5aac1ec6
Commit
5aac1ec6
authored
Dec 14, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Dec 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement MsiGetPatchInfoExW.
parent
b5e3e19a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
141 additions
and
2 deletions
+141
-2
msi.c
dlls/msi/msi.c
+141
-2
No files found.
dlls/msi/msi.c
View file @
5aac1ec6
...
...
@@ -1250,11 +1250,150 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
LPCWSTR
szUserSid
,
MSIINSTALLCONTEXT
dwContext
,
LPCWSTR
szProperty
,
LPWSTR
lpValue
,
DWORD
*
pcchValue
)
{
FIXME
(
"(%s, %s, %s, %d, %s, %p, %p): stub!
\n
"
,
debugstr_w
(
szPatchCode
),
WCHAR
squished_pc
[
GUID_SIZE
];
WCHAR
squished_patch
[
GUID_SIZE
];
HKEY
udprod
=
0
,
prod
=
0
,
props
=
0
;
HKEY
patch
=
0
,
patches
=
0
;
HKEY
udpatch
=
0
,
datakey
=
0
;
HKEY
prodpatches
=
0
;
LPWSTR
val
=
NULL
;
UINT
r
=
ERROR_UNKNOWN_PRODUCT
;
DWORD
len
;
LONG
res
;
static
const
WCHAR
szEmpty
[]
=
{
0
};
static
const
WCHAR
szPatches
[]
=
{
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szInstalled
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
szManagedPackage
[]
=
{
'M'
,
'a'
,
'n'
,
'a'
,
'g'
,
'e'
,
'd'
,
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
0
};
TRACE
(
"(%s, %s, %s, %d, %s, %p, %p)
\n
"
,
debugstr_w
(
szPatchCode
),
debugstr_w
(
szProductCode
),
debugstr_w
(
szUserSid
),
dwContext
,
debugstr_w
(
szProperty
),
lpValue
,
pcchValue
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
if
(
!
szProductCode
||
!
squash_guid
(
szProductCode
,
squished_pc
))
return
ERROR_INVALID_PARAMETER
;
if
(
!
szPatchCode
||
!
squash_guid
(
szPatchCode
,
squished_patch
))
return
ERROR_INVALID_PARAMETER
;
if
(
!
szProperty
)
return
ERROR_INVALID_PARAMETER
;
if
(
lpValue
&&
!
pcchValue
)
return
ERROR_INVALID_PARAMETER
;
if
(
dwContext
!=
MSIINSTALLCONTEXT_USERMANAGED
&&
dwContext
!=
MSIINSTALLCONTEXT_USERUNMANAGED
&&
dwContext
!=
MSIINSTALLCONTEXT_MACHINE
)
return
ERROR_INVALID_PARAMETER
;
if
(
dwContext
==
MSIINSTALLCONTEXT_MACHINE
&&
szUserSid
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
lstrcmpW
(
szUserSid
,
szLocalSid
))
return
ERROR_INVALID_PARAMETER
;
if
(
MSIREG_OpenUserDataProductKey
(
szProductCode
,
dwContext
,
NULL
,
&
udprod
,
FALSE
)
!=
ERROR_SUCCESS
)
goto
done
;
if
(
MSIREG_OpenInstallProps
(
szProductCode
,
dwContext
,
NULL
,
&
props
,
FALSE
)
!=
ERROR_SUCCESS
)
goto
done
;
r
=
ERROR_UNKNOWN_PATCH
;
res
=
RegOpenKeyExW
(
udprod
,
szPatches
,
0
,
KEY_READ
,
&
patches
);
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
res
=
RegOpenKeyExW
(
patches
,
squished_patch
,
0
,
KEY_READ
,
&
patch
);
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
if
(
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_TRANSFORMSW
))
{
if
(
MSIREG_OpenProductKey
(
szProductCode
,
dwContext
,
&
prod
,
FALSE
)
!=
ERROR_SUCCESS
)
goto
done
;
res
=
RegOpenKeyExW
(
prod
,
szPatches
,
0
,
KEY_ALL_ACCESS
,
&
prodpatches
);
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
datakey
=
prodpatches
;
szProperty
=
squished_patch
;
}
else
{
if
(
MSIREG_OpenUserDataPatchKey
(
szPatchCode
,
dwContext
,
&
udpatch
,
FALSE
)
!=
ERROR_SUCCESS
)
goto
done
;
if
(
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_LOCALPACKAGEW
))
{
if
(
dwContext
==
MSIINSTALLCONTEXT_USERMANAGED
)
szProperty
=
szManagedPackage
;
datakey
=
udpatch
;
}
else
if
(
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_INSTALLDATEW
))
{
datakey
=
patch
;
szProperty
=
szInstalled
;
}
else
if
(
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_LOCALPACKAGEW
))
{
datakey
=
udpatch
;
}
else
if
(
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_UNINSTALLABLEW
)
||
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_PATCHSTATEW
)
||
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_DISPLAYNAMEW
)
||
!
lstrcmpW
(
szProperty
,
INSTALLPROPERTY_MOREINFOURLW
))
{
datakey
=
patch
;
}
else
{
r
=
ERROR_UNKNOWN_PROPERTY
;
goto
done
;
}
}
val
=
msi_reg_get_val_str
(
datakey
,
szProperty
);
if
(
!
val
)
val
=
strdupW
(
szEmpty
);
r
=
ERROR_SUCCESS
;
if
(
!
pcchValue
)
goto
done
;
if
(
lpValue
)
lstrcpynW
(
lpValue
,
val
,
*
pcchValue
);
len
=
lstrlenW
(
val
);
if
((
*
val
&&
*
pcchValue
<
len
+
1
)
||
!
lpValue
)
{
if
(
lpValue
)
r
=
ERROR_MORE_DATA
;
*
pcchValue
=
len
*
sizeof
(
WCHAR
);
}
*
pcchValue
=
len
;
done:
msi_free
(
val
);
RegCloseKey
(
prodpatches
);
RegCloseKey
(
prod
);
RegCloseKey
(
patch
);
RegCloseKey
(
patches
);
RegCloseKey
(
udpatch
);
RegCloseKey
(
props
);
RegCloseKey
(
udprod
);
return
r
;
}
UINT
WINAPI
MsiEnableLogA
(
DWORD
dwLogMode
,
LPCSTR
szLogFile
,
DWORD
attributes
)
...
...
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