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
bc4750ff
Commit
bc4750ff
authored
Jul 02, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add the IWineMsiRemoteCustomAction interface.
parent
f9001058
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
5 deletions
+110
-5
custom.c
dlls/msi/custom.c
+85
-0
msi_main.c
dlls/msi/msi_main.c
+12
-5
msipriv.h
dlls/msi/msipriv.h
+2
-0
msiserver.idl
dlls/msi/msiserver.idl
+11
-0
No files found.
dlls/msi/custom.c
View file @
bc4750ff
...
...
@@ -26,8 +26,11 @@
#include "winerror.h"
#include "msidefs.h"
#include "winuser.h"
#include "objbase.h"
#include "oleauto.h"
#include "msipriv.h"
#include "msiserver.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/exception.h"
...
...
@@ -1366,3 +1369,85 @@ void ACTION_FinishCustomActions(const MSIPACKAGE* package)
HeapFree
(
GetProcessHeap
(),
0
,
wait_handles
);
}
typedef
struct
_msi_custom_remote_impl
{
const
IWineMsiRemoteCustomActionVtbl
*
lpVtbl
;
LONG
refs
;
}
msi_custom_remote_impl
;
static
inline
msi_custom_remote_impl
*
mcr_from_IWineMsiRemoteCustomAction
(
IWineMsiRemoteCustomAction
*
iface
)
{
return
(
msi_custom_remote_impl
*
)
iface
;
}
static
HRESULT
WINAPI
mcr_QueryInterface
(
IWineMsiRemoteCustomAction
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
if
(
IsEqualCLSID
(
riid
,
&
IID_IUnknown
)
||
IsEqualCLSID
(
riid
,
&
IID_IWineMsiRemoteCustomAction
)
)
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
mcr_AddRef
(
IWineMsiRemoteCustomAction
*
iface
)
{
msi_custom_remote_impl
*
This
=
mcr_from_IWineMsiRemoteCustomAction
(
iface
);
return
InterlockedIncrement
(
&
This
->
refs
);
}
static
ULONG
WINAPI
mcr_Release
(
IWineMsiRemoteCustomAction
*
iface
)
{
msi_custom_remote_impl
*
This
=
mcr_from_IWineMsiRemoteCustomAction
(
iface
);
ULONG
r
;
r
=
InterlockedDecrement
(
&
This
->
refs
);
if
(
r
==
0
)
msi_free
(
This
);
return
r
;
}
static
HRESULT
WINAPI
mcr_GetActionInfo
(
IWineMsiRemoteCustomAction
*
iface
,
LPCGUID
custom_action_guid
,
MSIHANDLE
*
handle
,
BSTR
*
dll
,
BSTR
*
func
,
IWineMsiRemotePackage
**
remote_package
)
{
msi_custom_action_info
*
info
;
info
=
find_action_by_guid
(
custom_action_guid
);
if
(
!
info
)
return
E_FAIL
;
*
handle
=
alloc_msihandle
(
&
info
->
package
->
hdr
);
*
dll
=
SysAllocString
(
info
->
source
);
*
func
=
SysAllocString
(
info
->
target
);
return
create_msi_remote_package
(
NULL
,
(
LPVOID
*
)
remote_package
);
}
static
const
IWineMsiRemoteCustomActionVtbl
msi_custom_remote_vtbl
=
{
mcr_QueryInterface
,
mcr_AddRef
,
mcr_Release
,
mcr_GetActionInfo
,
};
HRESULT
create_msi_custom_remote
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
)
{
msi_custom_remote_impl
*
This
;
This
=
msi_alloc
(
sizeof
*
This
);
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
msi_custom_remote_vtbl
;
This
->
refs
=
1
;
*
ppObj
=
This
;
return
S_OK
;
}
dlls/msi/msi_main.c
View file @
bc4750ff
...
...
@@ -189,6 +189,7 @@ static const IClassFactoryVtbl MsiCF_Vtbl =
};
static
IClassFactoryImpl
MsiServer_CF
=
{
&
MsiCF_Vtbl
,
create_msiserver
};
static
IClassFactoryImpl
WineMsiCustomRemote_CF
=
{
&
MsiCF_Vtbl
,
create_msi_custom_remote
};
static
IClassFactoryImpl
WineMsiRemotePackage_CF
=
{
&
MsiCF_Vtbl
,
create_msi_remote_package
};
/******************************************************************
...
...
@@ -204,12 +205,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return
S_OK
;
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerMessage
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServer
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX1
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX3
)
)
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IWineMsiRemoteCustomAction
)
)
{
FIXME
(
"create %s object
\n
"
,
debugstr_guid
(
rclsid
));
*
ppv
=
(
LPVOID
)
&
WineMsiCustomRemote_CF
;
return
S_OK
;
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IWineMsiRemotePackage
)
)
...
...
@@ -218,6 +217,14 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return
S_OK
;
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerMessage
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServer
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX1
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX3
)
)
{
FIXME
(
"create %s object
\n
"
,
debugstr_guid
(
rclsid
));
}
return
CLASS_E_CLASSNOTAVAILABLE
;
}
...
...
dlls/msi/msipriv.h
View file @
bc4750ff
...
...
@@ -512,6 +512,7 @@ DEFINE_GUID(CLSID_IMsiServerX3, 0x000C1094,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x0
DEFINE_GUID
(
CLSID_IMsiServerMessage
,
0x000C101D
,
0x0000
,
0x0000
,
0xC0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
DEFINE_GUID
(
CLSID_IWineMsiRemoteCustomAction
,
0xBA26E6FA
,
0x4F27
,
0x4f56
,
0x95
,
0x3A
,
0x3F
,
0x90
,
0x27
,
0x20
,
0x18
,
0xAA
);
DEFINE_GUID
(
CLSID_IWineMsiRemotePackage
,
0x902b3592
,
0x9d08
,
0x4dfd
,
0xa5
,
0x93
,
0xd0
,
0x7c
,
0x52
,
0x54
,
0x64
,
0x21
);
/* handle unicode/ascii output in the Msi* API functions */
...
...
@@ -535,6 +536,7 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz );
/* msi server interface */
extern
ITypeLib
*
get_msi_typelib
(
LPWSTR
*
path
);
extern
HRESULT
create_msi_custom_remote
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
create_msi_remote_package
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
);
/* handle functions */
...
...
dlls/msi/msiserver.idl
View file @
bc4750ff
...
...
@@ -40,6 +40,17 @@ interface IWineMsiRemotePackage : IUnknown
HRESULT
SetProperty
(
[
in
]
BSTR
*
property
,
[
in
]
BSTR
*
value
)
;
}
[
uuid
(
56
D58B64
-
8780
-
4
c22
-
A8BC
-
8B0B29
E4A9F8
),
oleautomation
,
object
]
interface
IWineMsiRemoteCustomAction
:
IUnknown
{
HRESULT
GetActionInfo
(
[
in
]
LPCGUID
guid
,
[
out
]
MSIHANDLE
*
handle
,
[
out
]
BSTR
*
dllname
,
[
out
]
BSTR
*
function
,
[
out
]
IWineMsiRemotePackage
**
package
)
;
}
[
uuid
(
000
C1092
-
0000
-
0000
-
C000
-
000000000046
),
version
(
1.0
)
]
library
WindowsInstaller
{
...
...
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