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
cba1b1e1
Commit
cba1b1e1
authored
Jul 05, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Handle remote calls to MsiFormatRecordW.
parent
29ce520d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
3 deletions
+66
-3
format.c
dlls/msi/format.c
+56
-3
msiserver.idl
dlls/msi/msiserver.idl
+1
-0
package.c
dlls/msi/package.c
+9
-0
No files found.
dlls/msi/format.c
View file @
cba1b1e1
...
@@ -33,8 +33,12 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msifo
...
@@ -33,8 +33,12 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msifo
#include "winerror.h"
#include "winerror.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "msi.h"
#include "msi.h"
#include "msipriv.h"
#include "winnls.h"
#include "winnls.h"
#include "objbase.h"
#include "oleauto.h"
#include "msipriv.h"
#include "msiserver.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
...
@@ -713,6 +717,57 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord,
...
@@ -713,6 +717,57 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord,
TRACE
(
"%ld %ld %p %p
\n
"
,
hInstall
,
hRecord
,
szResult
,
sz
);
TRACE
(
"%ld %ld %p %p
\n
"
,
hInstall
,
hRecord
,
szResult
,
sz
);
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!
package
)
{
HRESULT
hr
;
IWineMsiRemotePackage
*
remote_package
;
BSTR
value
=
NULL
;
DWORD
len
;
awstring
wstr
;
remote_package
=
(
IWineMsiRemotePackage
*
)
msi_get_remote
(
hInstall
);
if
(
remote_package
)
{
len
=
0
;
hr
=
IWineMsiRemotePackage_FormatRecord
(
remote_package
,
hRecord
,
NULL
,
&
len
);
if
(
FAILED
(
hr
))
goto
done
;
len
++
;
value
=
SysAllocStringLen
(
NULL
,
len
);
if
(
!
value
)
{
r
=
ERROR_OUTOFMEMORY
;
goto
done
;
}
hr
=
IWineMsiRemotePackage_FormatRecord
(
remote_package
,
hRecord
,
value
,
&
len
);
if
(
FAILED
(
hr
))
goto
done
;
wstr
.
unicode
=
TRUE
;
wstr
.
str
.
w
=
szResult
;
r
=
msi_strcpy_to_awstring
(
value
,
&
wstr
,
sz
);
done:
IWineMsiRemotePackage_Release
(
remote_package
);
SysFreeString
(
value
);
if
(
FAILED
(
hr
))
{
if
(
HRESULT_FACILITY
(
hr
)
==
FACILITY_WIN32
)
return
HRESULT_CODE
(
hr
);
return
ERROR_FUNCTION_FAILED
;
}
return
r
;
}
}
record
=
msihandle2msiinfo
(
hRecord
,
MSIHANDLETYPE_RECORD
);
record
=
msihandle2msiinfo
(
hRecord
,
MSIHANDLETYPE_RECORD
);
if
(
!
record
)
if
(
!
record
)
...
@@ -726,8 +781,6 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord,
...
@@ -726,8 +781,6 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord,
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
r
=
MSI_FormatRecordW
(
package
,
record
,
szResult
,
sz
);
r
=
MSI_FormatRecordW
(
package
,
record
,
szResult
,
sz
);
msiobj_release
(
&
record
->
hdr
);
msiobj_release
(
&
record
->
hdr
);
if
(
package
)
if
(
package
)
...
...
dlls/msi/msiserver.idl
View file @
cba1b1e1
...
@@ -55,6 +55,7 @@ interface IWineMsiRemotePackage : IUnknown
...
@@ -55,6 +55,7 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT
SetComponentState
(
[
in
]
BSTR
component
,
[
in
]
INSTALLSTATE
state
)
;
HRESULT
SetComponentState
(
[
in
]
BSTR
component
,
[
in
]
INSTALLSTATE
state
)
;
HRESULT
GetLanguage
(
[
out
]
LANGID
*
language
)
;
HRESULT
GetLanguage
(
[
out
]
LANGID
*
language
)
;
HRESULT
SetInstallLevel
(
[
in
]
int
level
)
;
HRESULT
SetInstallLevel
(
[
in
]
int
level
)
;
HRESULT
FormatRecord
(
[
in
]
MSIHANDLE
record
,
[
out
]
BSTR
value
,
[
out
]
DWORD
*
size
)
;
}
}
[
[
...
...
dlls/msi/package.c
View file @
cba1b1e1
...
@@ -1684,6 +1684,14 @@ HRESULT WINAPI mrp_SetInstallLevel( IWineMsiRemotePackage *iface, int level )
...
@@ -1684,6 +1684,14 @@ HRESULT WINAPI mrp_SetInstallLevel( IWineMsiRemotePackage *iface, int level )
return
HRESULT_FROM_WIN32
(
r
);
return
HRESULT_FROM_WIN32
(
r
);
}
}
HRESULT
WINAPI
mrp_FormatRecord
(
IWineMsiRemotePackage
*
iface
,
MSIHANDLE
record
,
BSTR
value
,
DWORD
*
size
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
UINT
r
=
MsiFormatRecordW
(
This
->
package
,
record
,
(
LPWSTR
)
value
,
size
);
return
HRESULT_FROM_WIN32
(
r
);
}
static
const
IWineMsiRemotePackageVtbl
msi_remote_package_vtbl
=
static
const
IWineMsiRemotePackageVtbl
msi_remote_package_vtbl
=
{
{
mrp_QueryInterface
,
mrp_QueryInterface
,
...
@@ -1706,6 +1714,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
...
@@ -1706,6 +1714,7 @@ static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl =
mrp_SetComponentState
,
mrp_SetComponentState
,
mrp_GetLanguage
,
mrp_GetLanguage
,
mrp_SetInstallLevel
,
mrp_SetInstallLevel
,
mrp_FormatRecord
,
};
};
HRESULT
create_msi_remote_package
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
)
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