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
f9001058
Commit
f9001058
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 IWineMsiRemotePackage interface.
parent
1c14c180
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
0 deletions
+137
-0
msi_main.c
dlls/msi/msi_main.c
+7
-0
msipriv.h
dlls/msi/msipriv.h
+4
-0
msiserver.idl
dlls/msi/msiserver.idl
+17
-0
package.c
dlls/msi/package.c
+109
-0
No files found.
dlls/msi/msi_main.c
View file @
f9001058
...
...
@@ -189,6 +189,7 @@ static const IClassFactoryVtbl MsiCF_Vtbl =
};
static
IClassFactoryImpl
MsiServer_CF
=
{
&
MsiCF_Vtbl
,
create_msiserver
};
static
IClassFactoryImpl
WineMsiRemotePackage_CF
=
{
&
MsiCF_Vtbl
,
create_msi_remote_package
};
/******************************************************************
* DllGetClassObject [MSI.@]
...
...
@@ -211,6 +212,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
FIXME
(
"create %s object
\n
"
,
debugstr_guid
(
rclsid
));
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IWineMsiRemotePackage
)
)
{
*
ppv
=
(
LPVOID
)
&
WineMsiRemotePackage_CF
;
return
S_OK
;
}
return
CLASS_E_CLASSNOTAVAILABLE
;
}
...
...
dlls/msi/msipriv.h
View file @
f9001058
...
...
@@ -512,6 +512,8 @@ 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_IWineMsiRemotePackage
,
0x902b3592
,
0x9d08
,
0x4dfd
,
0xa5
,
0x93
,
0xd0
,
0x7c
,
0x52
,
0x54
,
0x64
,
0x21
);
/* handle unicode/ascii output in the Msi* API functions */
typedef
struct
{
BOOL
unicode
;
...
...
@@ -533,10 +535,12 @@ 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_remote_package
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
);
/* handle functions */
extern
void
*
msihandle2msiinfo
(
MSIHANDLE
handle
,
UINT
type
);
extern
MSIHANDLE
alloc_msihandle
(
MSIOBJECTHDR
*
);
extern
MSIHANDLE
alloc_msi_remote_handle
(
IUnknown
*
unk
);
extern
void
*
alloc_msiobject
(
UINT
type
,
UINT
size
,
msihandledestructor
destroy
);
extern
void
msiobj_addref
(
MSIOBJECTHDR
*
);
extern
int
msiobj_release
(
MSIOBJECTHDR
*
);
...
...
dlls/msi/msiserver.idl
View file @
f9001058
...
...
@@ -23,6 +23,23 @@ import "wtypes.idl";
import
"objidl.idl"
;
import
"oaidl.idl"
;
cpp_quote
(
"#if 0"
)
typedef
unsigned
long
MSIHANDLE
;
cpp_quote
(
"#endif"
)
[
uuid
(
902B3592
-
9
D08
-
4
dfd
-
A593
-
D07C52546421
),
oleautomation
,
object
]
interface
IWineMsiRemotePackage
:
IUnknown
{
HRESULT
SetMsiHandle
(
[
in
]
MSIHANDLE
handle
)
;
HRESULT
GetActiveDatabase
(
[
out
]
MSIHANDLE
*
handle
)
;
HRESULT
GetProperty
(
[
in
]
BSTR
*
property
,
[
out
]
BSTR
*
value
,
[
out
]
DWORD
*
size
)
;
HRESULT
SetProperty
(
[
in
]
BSTR
*
property
,
[
in
]
BSTR
*
value
)
;
}
[
uuid
(
000
C1092
-
0000
-
0000
-
C000
-
000000000046
),
version
(
1.0
)
]
library
WindowsInstaller
{
...
...
dlls/msi/package.c
View file @
f9001058
...
...
@@ -20,6 +20,7 @@
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define COBJMACROS
#include <stdarg.h>
#include "windef.h"
...
...
@@ -44,6 +45,7 @@
#include "sddl.h"
#include "msipriv.h"
#include "msiserver.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
...
...
@@ -1393,3 +1395,110 @@ UINT WINAPI MsiGetPropertyW( MSIHANDLE hInstall, LPCWSTR szName,
return
MSI_GetProperty
(
hInstall
,
szName
,
&
val
,
pchValueBuf
);
}
typedef
struct
_msi_remote_package_impl
{
const
IWineMsiRemotePackageVtbl
*
lpVtbl
;
MSIHANDLE
package
;
LONG
refs
;
}
msi_remote_package_impl
;
static
inline
msi_remote_package_impl
*
mrp_from_IWineMsiRemotePackage
(
IWineMsiRemotePackage
*
iface
)
{
return
(
msi_remote_package_impl
*
)
iface
;
}
static
HRESULT
WINAPI
mrp_QueryInterface
(
IWineMsiRemotePackage
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
if
(
IsEqualCLSID
(
riid
,
&
IID_IUnknown
)
||
IsEqualCLSID
(
riid
,
&
IID_IWineMsiRemotePackage
)
)
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
mrp_AddRef
(
IWineMsiRemotePackage
*
iface
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
return
InterlockedIncrement
(
&
This
->
refs
);
}
static
ULONG
WINAPI
mrp_Release
(
IWineMsiRemotePackage
*
iface
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
ULONG
r
;
r
=
InterlockedDecrement
(
&
This
->
refs
);
if
(
r
==
0
)
{
MsiCloseHandle
(
This
->
package
);
msi_free
(
This
);
}
return
r
;
}
static
HRESULT
WINAPI
mrp_SetMsiHandle
(
IWineMsiRemotePackage
*
iface
,
MSIHANDLE
handle
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
This
->
package
=
handle
;
return
S_OK
;
}
HRESULT
WINAPI
mrp_GetActiveDatabase
(
IWineMsiRemotePackage
*
iface
,
MSIHANDLE
*
handle
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
*
handle
=
MsiGetActiveDatabase
(
This
->
package
);
return
S_OK
;
}
HRESULT
WINAPI
mrp_GetProperty
(
IWineMsiRemotePackage
*
iface
,
BSTR
*
property
,
BSTR
*
value
,
DWORD
*
size
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
UINT
r
;
r
=
MsiGetPropertyW
(
This
->
package
,
(
LPWSTR
)
property
,
(
LPWSTR
)
value
,
size
);
if
(
r
!=
ERROR_SUCCESS
)
return
HRESULT_FROM_WIN32
(
r
);
return
S_OK
;
}
HRESULT
WINAPI
mrp_SetProperty
(
IWineMsiRemotePackage
*
iface
,
BSTR
*
property
,
BSTR
*
value
)
{
msi_remote_package_impl
*
This
=
mrp_from_IWineMsiRemotePackage
(
iface
);
UINT
r
=
MsiSetPropertyW
(
This
->
package
,
(
LPWSTR
)
property
,
(
LPWSTR
)
value
);
return
HRESULT_FROM_WIN32
(
r
);
}
static
const
IWineMsiRemotePackageVtbl
msi_remote_package_vtbl
=
{
mrp_QueryInterface
,
mrp_AddRef
,
mrp_Release
,
mrp_SetMsiHandle
,
mrp_GetActiveDatabase
,
mrp_GetProperty
,
mrp_SetProperty
,
};
HRESULT
create_msi_remote_package
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
)
{
msi_remote_package_impl
*
This
;
This
=
msi_alloc
(
sizeof
*
This
);
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
msi_remote_package_vtbl
;
This
->
package
=
0
;
This
->
refs
=
1
;
*
ppObj
=
This
;
return
S_OK
;
}
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