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
cc517f2b
Commit
cc517f2b
authored
May 02, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
May 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Support remote calls to MsiEnumComponentCosts.
parent
b4a7a30b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
msi.c
dlls/msi/msi.c
+27
-1
msiserver.idl
dlls/msi/msiserver.idl
+3
-1
package.c
dlls/msi/package.c
+10
-0
No files found.
dlls/msi/msi.c
View file @
cc517f2b
...
...
@@ -32,6 +32,7 @@
#include "msidefs.h"
#include "msiquery.h"
#include "msipriv.h"
#include "msiserver.h"
#include "wincrypt.h"
#include "winver.h"
#include "winuser.h"
...
...
@@ -1839,7 +1840,32 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i
state
,
drive
,
buflen
,
cost
,
temp
);
if
(
!
drive
||
!
buflen
||
!
cost
||
!
temp
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
package
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_PACKAGE
)))
return
ERROR_INVALID_HANDLE
;
if
(
!
(
package
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_PACKAGE
)))
{
HRESULT
hr
;
IWineMsiRemotePackage
*
remote_package
;
BSTR
bname
;
if
(
!
(
remote_package
=
(
IWineMsiRemotePackage
*
)
msi_get_remote
(
handle
)))
return
ERROR_INVALID_HANDLE
;
bname
=
SysAllocString
(
component
);
if
(
!
bname
)
{
IWineMsiRemotePackage_Release
(
remote_package
);
return
ERROR_OUTOFMEMORY
;
}
hr
=
IWineMsiRemotePackage_EnumComponentCosts
(
remote_package
,
bname
,
index
,
state
,
drive
,
buflen
,
cost
,
temp
);
IWineMsiRemotePackage_Release
(
remote_package
);
SysFreeString
(
bname
);
if
(
FAILED
(
hr
))
{
if
(
HRESULT_FACILITY
(
hr
)
==
FACILITY_WIN32
)
return
HRESULT_CODE
(
hr
);
return
ERROR_FUNCTION_FAILED
;
}
return
ERROR_SUCCESS
;
}
if
(
!
msi_get_property_int
(
package
->
db
,
szCostingComplete
,
0
))
{
msiobj_release
(
&
package
->
hdr
);
...
...
dlls/msi/msiserver.idl
View file @
cc517f2b
...
...
@@ -72,7 +72,9 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT
SetInstallLevel
(
[
in
]
int
level
)
;
HRESULT
FormatRecord
(
[
in
]
MSIHANDLE
record
,
[
out
]
BSTR
*
value
)
;
HRESULT
EvaluateCondition
(
[
in
]
BSTR
condition
)
;
HRESULT
GetFeatureCost
(
[
in
]
BSTR
feature
,
[
in
]
INT
cost_tree
,
[
in
]
INSTALLSTATE
state
,
[
out
]
INT
*
cost
)
;
HRESULT
GetFeatureCost
(
[
in
]
BSTR
feature
,
[
in
]
INT
cost_tree
,
[
in
]
INSTALLSTATE
state
,
[
out
]
INT
*
cost
)
;
HRESULT
EnumComponentCosts
(
[
in
]
BSTR
component
,
[
in
]
DWORD
index
,
[
in
]
INSTALLSTATE
state
,
[
out
,
size_is
(
*
buflen
)
]
BSTR
drive
,
[
in
,
out
]
DWORD
*
buflen
,
[
out
]
INT
*
cost
,
[
out
]
INT
*
temp
)
;
}
[
...
...
dlls/msi/package.c
View file @
cc517f2b
...
...
@@ -2534,6 +2534,15 @@ static HRESULT WINAPI mrp_GetFeatureCost( IWineMsiRemotePackage *iface, BSTR fea
return
HRESULT_FROM_WIN32
(
r
);
}
static
HRESULT
WINAPI
mrp_EnumComponentCosts
(
IWineMsiRemotePackage
*
iface
,
BSTR
component
,
DWORD
index
,
INSTALLSTATE
state
,
BSTR
drive
,
DWORD
*
buflen
,
INT
*
cost
,
INT
*
temp
)
{
msi_remote_package_impl
*
This
=
impl_from_IWineMsiRemotePackage
(
iface
);
UINT
r
=
MsiEnumComponentCostsW
(
This
->
package
,
component
,
index
,
state
,
drive
,
buflen
,
cost
,
temp
);
return
HRESULT_FROM_WIN32
(
r
);
}
static
const
IWineMsiRemotePackageVtbl
msi_remote_package_vtbl
=
{
mrp_QueryInterface
,
...
...
@@ -2560,6 +2569,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_FormatRecord
,
mrp_EvaluateCondition
,
mrp_GetFeatureCost
,
mrp_EnumComponentCosts
};
HRESULT
create_msi_remote_package
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
)
...
...
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