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
94edcc1d
Commit
94edcc1d
authored
Mar 16, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Implement IHlinkBrowseContext::GetBrowseWindowInfo.
parent
3e041586
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
+62
-2
browse_ctx.c
dlls/hlink/browse_ctx.c
+15
-2
browse_ctx.c
dlls/hlink/tests/browse_ctx.c
+47
-0
No files found.
dlls/hlink/browse_ctx.c
View file @
94edcc1d
...
...
@@ -155,6 +155,9 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface,
HlinkBCImpl
*
This
=
(
HlinkBCImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
phlbwi
);
if
(
!
phlbwi
)
return
E_INVALIDARG
;
heap_free
(
This
->
BrowseWindowInfo
);
This
->
BrowseWindowInfo
=
heap_alloc
(
phlbwi
->
cbSize
);
memcpy
(
This
->
BrowseWindowInfo
,
phlbwi
,
phlbwi
->
cbSize
);
...
...
@@ -165,8 +168,18 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface,
static
HRESULT
WINAPI
IHlinkBC_GetBrowseWindowInfo
(
IHlinkBrowseContext
*
iface
,
HLBWINFO
*
phlbwi
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HlinkBCImpl
*
This
=
(
HlinkBCImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
phlbwi
);
if
(
!
phlbwi
)
return
E_INVALIDARG
;
if
(
!
This
->
BrowseWindowInfo
)
phlbwi
->
cbSize
=
0
;
else
memcpy
(
phlbwi
,
This
->
BrowseWindowInfo
,
This
->
BrowseWindowInfo
->
cbSize
);
return
S_OK
;
}
static
HRESULT
WINAPI
IHlinkBC_SetInitialHlink
(
IHlinkBrowseContext
*
iface
,
...
...
dlls/hlink/tests/browse_ctx.c
View file @
94edcc1d
...
...
@@ -80,11 +80,58 @@ static void test_SetInitialHlink(void)
IMoniker_Release
(
dummy
);
}
static
void
test_BrowseWindowInfo
(
void
)
{
IHlinkBrowseContext
*
bc
;
HLBWINFO
bwinfo_set
,
bwinfo_get
;
HRESULT
hres
;
hres
=
HlinkCreateBrowseContext
(
NULL
,
&
IID_IHlinkBrowseContext
,
(
void
**
)
&
bc
);
ok
(
hres
==
S_OK
,
"HlinkCreateBrowseContext failed: 0x%08x
\n
"
,
hres
);
hres
=
IHlinkBrowseContext_GetBrowseWindowInfo
(
bc
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"GetBrowseWindow failed with wrong code: 0x%08x
\n
"
,
hres
);
hres
=
IHlinkBrowseContext_SetBrowseWindowInfo
(
bc
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"SetBrowseWindow failed with wrong code: 0x%08x
\n
"
,
hres
);
memset
(
&
bwinfo_get
,
-
1
,
sizeof
(
HLBWINFO
));
hres
=
IHlinkBrowseContext_GetBrowseWindowInfo
(
bc
,
&
bwinfo_get
);
ok
(
hres
==
S_OK
,
"GetBrowseWindowInfo failed: 0x%08x
\n
"
,
hres
);
ok
(
bwinfo_get
.
cbSize
==
0
,
"Got wrong size: %x
\n
"
,
bwinfo_get
.
cbSize
);
bwinfo_set
.
cbSize
=
sizeof
(
HLBWINFO
);
bwinfo_set
.
grfHLBWIF
=
HLBWIF_WEBTOOLBARHIDDEN
;
bwinfo_set
.
rcFramePos
.
left
=
1
;
bwinfo_set
.
rcFramePos
.
right
=
2
;
bwinfo_set
.
rcFramePos
.
top
=
3
;
bwinfo_set
.
rcFramePos
.
bottom
=
4
;
bwinfo_set
.
rcDocPos
.
left
=
5
;
bwinfo_set
.
rcDocPos
.
right
=
6
;
bwinfo_set
.
rcDocPos
.
top
=
7
;
bwinfo_set
.
rcDocPos
.
bottom
=
8
;
bwinfo_set
.
hltbinfo
.
uDockType
=
4321
;
bwinfo_set
.
hltbinfo
.
rcTbPos
.
left
=
9
;
bwinfo_set
.
hltbinfo
.
rcTbPos
.
right
=
10
;
bwinfo_set
.
hltbinfo
.
rcTbPos
.
top
=
11
;
bwinfo_set
.
hltbinfo
.
rcTbPos
.
bottom
=
12
;
hres
=
IHlinkBrowseContext_SetBrowseWindowInfo
(
bc
,
&
bwinfo_set
);
ok
(
hres
==
S_OK
,
"SetBrowseWindowInfo failed: 0x%08x
\n
"
,
hres
);
memset
(
&
bwinfo_get
,
0
,
sizeof
(
HLBWINFO
));
hres
=
IHlinkBrowseContext_GetBrowseWindowInfo
(
bc
,
&
bwinfo_get
);
ok
(
hres
==
S_OK
,
"GetBrowseWindowInfo failed: 0x%08x
\n
"
,
hres
);
ok
(
!
memcmp
(
&
bwinfo_set
,
&
bwinfo_get
,
sizeof
(
HLBWINFO
)),
"Set and Get differ"
);
}
START_TEST
(
browse_ctx
)
{
CoInitialize
(
NULL
);
test_SetInitialHlink
();
test_BrowseWindowInfo
();
CoUninitialize
();
}
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