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
07e9d33f
Commit
07e9d33f
authored
Jun 18, 2014
by
Andrew Eikum
Committed by
Alexandre Julliard
Jun 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packager: Implement IOleObject::SetClientSite.
parent
eb4d39b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
2 deletions
+94
-2
packager_main.c
dlls/packager/packager_main.c
+16
-2
oleobj.c
dlls/packager/tests/oleobj.c
+78
-0
No files found.
dlls/packager/packager_main.c
View file @
07e9d33f
...
...
@@ -44,6 +44,8 @@ struct Package {
LONG
ref
;
WCHAR
filename
[
MAX_PATH
];
IOleClientSite
*
clientsite
;
};
static
inline
struct
Package
*
impl_from_IOleObject
(
IOleObject
*
iface
)
...
...
@@ -95,6 +97,9 @@ static ULONG WINAPI OleObject_Release(IOleObject *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
){
if
(
This
->
clientsite
)
IOleClientSite_Release
(
This
->
clientsite
);
if
(
*
This
->
filename
)
DeleteFileW
(
This
->
filename
);
...
...
@@ -107,8 +112,17 @@ static ULONG WINAPI OleObject_Release(IOleObject *iface)
static
HRESULT
WINAPI
OleObject_SetClientSite
(
IOleObject
*
iface
,
IOleClientSite
*
pClientSite
)
{
struct
Package
*
This
=
impl_from_IOleObject
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pClientSite
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClientSite
);
if
(
This
->
clientsite
)
IOleClientSite_Release
(
This
->
clientsite
);
This
->
clientsite
=
pClientSite
;
if
(
pClientSite
)
IOleClientSite_AddRef
(
pClientSite
);
return
S_OK
;
}
static
HRESULT
WINAPI
OleObject_GetClientSite
(
IOleObject
*
iface
,
IOleClientSite
**
ppClientSite
)
...
...
dlls/packager/tests/oleobj.c
View file @
07e9d33f
...
...
@@ -334,6 +334,78 @@ static IStorage stg = {
&
stg_vtbl
};
static
HRESULT
WINAPI
clientsite_QueryInterface
(
IOleClientSite
*
This
,
REFIID
riid
,
void
**
ppvObject
)
{
ok
(
0
,
"query interface
\n
"
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
clientsite_AddRef
(
IOleClientSite
*
This
)
{
return
2
;
}
static
ULONG
WINAPI
clientsite_Release
(
IOleClientSite
*
This
)
{
return
1
;
}
static
HRESULT
WINAPI
clientsite_SaveObject
(
IOleClientSite
*
This
)
{
ok
(
0
,
"saveobject
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
clientsite_GetMoniker
(
IOleClientSite
*
This
,
DWORD
dwAssign
,
DWORD
dwWhichMoniker
,
IMoniker
**
ppmk
)
{
ok
(
0
,
"getmoniker
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
clientsite_GetContainer
(
IOleClientSite
*
This
,
IOleContainer
**
ppContainer
)
{
ok
(
0
,
"getcontainer
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
clientsite_ShowObject
(
IOleClientSite
*
This
)
{
ok
(
0
,
"showobject
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
clientsite_OnShowWindow
(
IOleClientSite
*
This
,
BOOL
fShow
)
{
ok
(
0
,
"onshowwindow
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
clientsite_RequestNewObjectLayout
(
IOleClientSite
*
This
)
{
ok
(
0
,
"requestnewobjectlayout
\n
"
);
return
E_NOTIMPL
;
}
static
IOleClientSiteVtbl
clientsite_vtbl
=
{
clientsite_QueryInterface
,
clientsite_AddRef
,
clientsite_Release
,
clientsite_SaveObject
,
clientsite_GetMoniker
,
clientsite_GetContainer
,
clientsite_ShowObject
,
clientsite_OnShowWindow
,
clientsite_RequestNewObjectLayout
};
static
IOleClientSite
clientsite
=
{
&
clientsite_vtbl
};
static
void
test_packager
(
void
)
{
IOleObject
*
oleobj
;
...
...
@@ -363,6 +435,12 @@ static void test_packager(void)
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hr
==
S_OK
,
"CoCreateInstance(CLSID_Package_Alt) failed: %08x
\n
"
,
hr
);
hr
=
IOleObject_SetClientSite
(
oleobj
,
NULL
);
ok
(
hr
==
S_OK
,
"SetClientSite failed: %08x
\n
"
,
hr
);
hr
=
IOleObject_SetClientSite
(
oleobj
,
&
clientsite
);
ok
(
hr
==
S_OK
,
"SetClientSite failed: %08x
\n
"
,
hr
);
hr
=
IOleObject_QueryInterface
(
oleobj
,
&
IID_IPersistStorage
,
(
void
**
)
&
persist
);
ok
(
hr
==
S_OK
,
"QueryInterface(IPersistStorage) failed: %08x
\n
"
,
hr
);
...
...
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