Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
e07ed1a2
Commit
e07ed1a2
authored
16 years ago
by
James Hawkins
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Implement MsiEnumPatchesW.
parent
c46f2102
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msi/registry.c
+114
-42
114 additions, 42 deletions
dlls/msi/registry.c
with
114 additions
and
42 deletions
dlls/msi/registry.c
+
114
−
42
View file @
e07ed1a2
...
...
@@ -1714,7 +1714,7 @@ done:
static
UINT
msi_check_product_patches
(
LPCWSTR
prodcode
,
LPCWSTR
usersid
,
MSIINSTALLCONTEXT
context
,
DWORD
filter
,
DWORD
index
,
DWORD
*
idx
,
LPWSTR
patch
,
LPWSTR
targetprod
,
MSIINSTALLCONTEXT
*
targetctx
,
LPWSTR
targetsid
,
DWORD
*
sidsize
)
LPWSTR
targetsid
,
DWORD
*
sidsize
,
LPWSTR
*
transforms
)
{
MSIPATCHSTATE
state
;
LPWSTR
ptr
,
patches
=
NULL
;
...
...
@@ -1770,6 +1770,21 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid,
if
(
res
!=
ERROR_SUCCESS
)
continue
;
if
(
transforms
)
{
*
transforms
=
msi_alloc
(
size
);
if
(
!*
transforms
)
{
r
=
ERROR_OUTOFMEMORY
;
goto
done
;
}
res
=
RegGetValueW
(
prod
,
szPatches
,
ptr
,
RRF_RT_REG_SZ
,
&
type
,
*
transforms
,
&
size
);
if
(
res
!=
ERROR_SUCCESS
)
continue
;
}
if
(
context
==
MSIINSTALLCONTEXT_USERMANAGED
)
{
if
(
!
(
filter
&
MSIPATCHSTATE_APPLIED
))
...
...
@@ -1838,7 +1853,8 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid,
}
r
=
ERROR_SUCCESS
;
lstrcpyW
(
targetprod
,
prodcode
);
if
(
targetprod
)
lstrcpyW
(
targetprod
,
prodcode
);
if
(
targetctx
)
*
targetctx
=
context
;
...
...
@@ -1865,6 +1881,54 @@ done:
return
r
;
}
static
UINT
msi_enum_patches
(
LPCWSTR
szProductCode
,
LPCWSTR
szUserSid
,
DWORD
dwContext
,
DWORD
dwFilter
,
DWORD
dwIndex
,
DWORD
*
idx
,
LPWSTR
szPatchCode
,
LPWSTR
szTargetProductCode
,
MSIINSTALLCONTEXT
*
pdwTargetProductContext
,
LPWSTR
szTargetUserSid
,
LPDWORD
pcchTargetUserSid
,
LPWSTR
*
szTransforms
)
{
UINT
r
;
if
(
dwContext
&
MSIINSTALLCONTEXT_USERMANAGED
)
{
r
=
msi_check_product_patches
(
szProductCode
,
szUserSid
,
MSIINSTALLCONTEXT_USERMANAGED
,
dwFilter
,
dwIndex
,
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
,
szTransforms
);
if
(
r
!=
ERROR_NO_MORE_ITEMS
)
goto
done
;
}
if
(
dwContext
&
MSIINSTALLCONTEXT_USERUNMANAGED
)
{
r
=
msi_check_product_patches
(
szProductCode
,
szUserSid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
dwFilter
,
dwIndex
,
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
,
szTransforms
);
if
(
r
!=
ERROR_NO_MORE_ITEMS
)
goto
done
;
}
if
(
dwContext
&
MSIINSTALLCONTEXT_MACHINE
)
{
r
=
msi_check_product_patches
(
szProductCode
,
szUserSid
,
MSIINSTALLCONTEXT_MACHINE
,
dwFilter
,
dwIndex
,
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
,
szTransforms
);
if
(
r
!=
ERROR_NO_MORE_ITEMS
)
goto
done
;
}
done:
return
r
;
}
/***********************************************************************
* MsiEnumPatchesExW [MSI.@]
*/
...
...
@@ -1906,43 +1970,11 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
if
(
dwIndex
==
0
)
last_index
=
0
;
if
(
dwContext
&
MSIINSTALLCONTEXT_USERMANAGED
)
{
r
=
msi_check_product_patches
(
szProductCode
,
szUserSid
,
MSIINSTALLCONTEXT_USERMANAGED
,
dwFilter
,
dwIndex
,
&
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
);
if
(
r
!=
ERROR_NO_MORE_ITEMS
)
goto
done
;
}
if
(
dwContext
&
MSIINSTALLCONTEXT_USERUNMANAGED
)
{
r
=
msi_check_product_patches
(
szProductCode
,
szUserSid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
dwFilter
,
dwIndex
,
&
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
);
if
(
r
!=
ERROR_NO_MORE_ITEMS
)
goto
done
;
}
if
(
dwContext
&
MSIINSTALLCONTEXT_MACHINE
)
{
r
=
msi_check_product_patches
(
szProductCode
,
szUserSid
,
MSIINSTALLCONTEXT_MACHINE
,
dwFilter
,
dwIndex
,
&
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
);
if
(
r
!=
ERROR_NO_MORE_ITEMS
)
goto
done
;
}
r
=
msi_enum_patches
(
szProductCode
,
szUserSid
,
dwContext
,
dwFilter
,
dwIndex
,
&
idx
,
szPatchCode
,
szTargetProductCode
,
pdwTargetProductContext
,
szTargetUserSid
,
pcchTargetUserSid
,
NULL
);
done:
if
(
r
==
ERROR_SUCCESS
)
last_index
=
dwIndex
;
...
...
@@ -2012,12 +2044,52 @@ done:
/***********************************************************************
* MsiEnumPatchesW [MSI.@]
*/
UINT
WINAPI
MsiEnumPatchesW
(
LPCWSTR
szProduct
,
DWORD
iPatchIndex
,
UINT
WINAPI
MsiEnumPatchesW
(
LPCWSTR
szProduct
,
DWORD
iPatchIndex
,
LPWSTR
lpPatchBuf
,
LPWSTR
lpTransformsBuf
,
LPDWORD
pcchTransformsBuf
)
{
FIXME
(
"%s %d %p %p %p
\n
"
,
debugstr_w
(
szProduct
),
iPatchIndex
,
lpPatchBuf
,
lpTransformsBuf
,
pcchTransformsBuf
);
return
ERROR_NO_MORE_ITEMS
;
WCHAR
squished_pc
[
GUID_SIZE
];
LPWSTR
transforms
=
NULL
;
HKEY
prod
;
DWORD
idx
=
0
;
UINT
r
;
TRACE
(
"(%s %d %p %p %p)
\n
"
,
debugstr_w
(
szProduct
),
iPatchIndex
,
lpPatchBuf
,
lpTransformsBuf
,
pcchTransformsBuf
);
if
(
!
szProduct
||
!
squash_guid
(
szProduct
,
squished_pc
))
return
ERROR_INVALID_PARAMETER
;
if
(
!
lpPatchBuf
||
!
lpTransformsBuf
||
!
pcchTransformsBuf
)
return
ERROR_INVALID_PARAMETER
;
if
(
MSIREG_OpenProductKey
(
szProduct
,
MSIINSTALLCONTEXT_USERMANAGED
,
&
prod
,
FALSE
)
!=
ERROR_SUCCESS
&&
MSIREG_OpenProductKey
(
szProduct
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
&
prod
,
FALSE
)
!=
ERROR_SUCCESS
&&
MSIREG_OpenProductKey
(
szProduct
,
MSIINSTALLCONTEXT_MACHINE
,
&
prod
,
FALSE
)
!=
ERROR_SUCCESS
)
return
ERROR_UNKNOWN_PRODUCT
;
RegCloseKey
(
prod
);
r
=
msi_enum_patches
(
szProduct
,
NULL
,
MSIINSTALLCONTEXT_ALL
,
MSIPATCHSTATE_ALL
,
iPatchIndex
,
&
idx
,
lpPatchBuf
,
NULL
,
NULL
,
NULL
,
NULL
,
&
transforms
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
lstrcpynW
(
lpTransformsBuf
,
transforms
,
*
pcchTransformsBuf
);
if
(
*
pcchTransformsBuf
<=
lstrlenW
(
transforms
))
{
r
=
ERROR_MORE_DATA
;
*
pcchTransformsBuf
=
lstrlenW
(
transforms
)
*
sizeof
(
WCHAR
);
}
else
*
pcchTransformsBuf
=
lstrlenW
(
transforms
);
done:
msi_free
(
transforms
);
return
r
;
}
UINT
WINAPI
MsiEnumProductsExA
(
LPCSTR
szProductCode
,
LPCSTR
szUserSid
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment