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
ffecc7f4
Commit
ffecc7f4
authored
Jan 29, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: Implement SetQueryNetSessionCount.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9446458f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
0 deletions
+78
-0
ieframe.h
dlls/ieframe/ieframe.h
+9
-0
ieframe.spec
dlls/ieframe/ieframe.spec
+1
-0
ieframe_main.c
dlls/ieframe/ieframe_main.c
+22
-0
oleobject.c
dlls/ieframe/oleobject.c
+1
-0
webbrowser.c
dlls/ieframe/tests/webbrowser.c
+45
-0
No files found.
dlls/ieframe/ieframe.h
View file @
ffecc7f4
...
...
@@ -385,3 +385,12 @@ static inline LPSTR co_strdupWtoA(LPCWSTR str)
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
,
0
,
0
);
return
ret
;
}
enum
SessionOp
{
SESSION_QUERY
,
SESSION_INCREMENT
,
SESSION_DECREMENT
};
LONG
WINAPI
SetQueryNetSessionCount
(
DWORD
session_op
);
dlls/ieframe/ieframe.spec
View file @
ffecc7f4
...
...
@@ -7,3 +7,4 @@
@ stdcall -private DllUnregisterServer()
@ stdcall IEGetWriteableHKCU(ptr)
@ stdcall OpenURL(long long str long)
@ stdcall SetQueryNetSessionCount(long)
dlls/ieframe/ieframe_main.c
View file @
ffecc7f4
...
...
@@ -285,3 +285,25 @@ HRESULT WINAPI IEGetWriteableHKCU(HKEY *pkey)
FIXME
(
"(%p) stub
\n
"
,
pkey
);
return
E_NOTIMPL
;
}
/***********************************************************************
* SetQueryNetSessionCount (ieframe.@)
*/
LONG
WINAPI
SetQueryNetSessionCount
(
DWORD
session_op
)
{
static
LONG
session_count
;
TRACE
(
"(%x)
\n
"
,
session_op
);
switch
(
session_op
)
{
case
SESSION_QUERY
:
return
session_count
;
case
SESSION_INCREMENT
:
return
InterlockedIncrement
(
&
session_count
);
case
SESSION_DECREMENT
:
return
InterlockedDecrement
(
&
session_count
);
};
return
0
;
}
dlls/ieframe/oleobject.c
View file @
ffecc7f4
...
...
@@ -555,6 +555,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE
on_offlineconnected_change
(
This
);
on_silent_change
(
This
);
SetQueryNetSessionCount
(
SESSION_INCREMENT
);
return
S_OK
;
}
...
...
dlls/ieframe/tests/webbrowser.c
View file @
ffecc7f4
...
...
@@ -173,6 +173,15 @@ static const WCHAR *current_url;
static
int
wb_version
,
expect_update_commands_enable
,
set_update_commands_enable
;
static
BOOL
nav_back_todo
,
nav_forward_todo
;
/* FIXME */
enum
SessionOp
{
SESSION_QUERY
,
SESSION_INCREMENT
,
SESSION_DECREMENT
};
static
LONG
(
WINAPI
*
pSetQueryNetSessionCount
)(
DWORD
);
#define BUSY_FAIL 2
#define DWL_EXPECT_BEFORE_NAVIGATE 0x01
...
...
@@ -1946,6 +1955,7 @@ static void test_ClientSite(IWebBrowser2 *unk, IOleClientSite *client, BOOL stop
{
IOleObject
*
oleobj
;
IOleInPlaceObject
*
inplace
;
DWORD
session_count
;
HWND
hwnd
;
HRESULT
hres
;
...
...
@@ -1969,6 +1979,8 @@ static void test_ClientSite(IWebBrowser2 *unk, IOleClientSite *client, BOOL stop
ok
((
hwnd
==
NULL
)
^
(
client
==
NULL
),
"unexpected hwnd %p
\n
"
,
hwnd
);
if
(
client
)
{
session_count
=
pSetQueryNetSessionCount
(
SESSION_QUERY
);
SET_EXPECT
(
GetContainer
);
SET_EXPECT
(
Site_GetWindow
);
SET_EXPECT
(
Invoke_AMBIENT_OFFLINEIFNOTCONNECTED
);
...
...
@@ -1995,6 +2007,9 @@ static void test_ClientSite(IWebBrowser2 *unk, IOleClientSite *client, BOOL stop
ok
(
hres
==
S_OK
,
"SetClientSite failed: %08x
\n
"
,
hres
);
if
(
client
)
{
DWORD
count
=
pSetQueryNetSessionCount
(
SESSION_QUERY
);
ok
(
count
==
session_count
+
1
,
"count = %u expected %u
\n
"
,
count
,
session_count
+
1
);
CHECK_CALLED
(
GetContainer
);
CHECK_CALLED
(
Site_GetWindow
);
CHECK_CALLED
(
Invoke_AMBIENT_OFFLINEIFNOTCONNECTED
);
...
...
@@ -3837,6 +3852,7 @@ static void test_WebBrowser(DWORD flags, BOOL do_close)
test_EnumVerbs
(
webbrowser
);
test_LocationURL
(
webbrowser
,
L""
);
test_ConnectionPoint
(
webbrowser
,
TRUE
);
test_ClientSite
(
webbrowser
,
&
ClientSite
,
!
do_download
);
test_Extent
(
webbrowser
);
test_wb_funcs
(
webbrowser
,
TRUE
);
...
...
@@ -4401,6 +4417,29 @@ static void test_SetAdvise(void)
IWebBrowser2_Release
(
browser
);
}
static
void
test_SetQueryNetSessionCount
(
void
)
{
LONG
count
;
count
=
pSetQueryNetSessionCount
(
SESSION_QUERY
);
ok
(
count
==
0
,
"count = %d
\n
"
,
count
);
count
=
pSetQueryNetSessionCount
(
SESSION_INCREMENT
);
ok
(
count
==
1
,
"count = %d
\n
"
,
count
);
count
=
pSetQueryNetSessionCount
(
SESSION_QUERY
);
ok
(
count
==
1
,
"count = %d
\n
"
,
count
);
count
=
pSetQueryNetSessionCount
(
0xdeadbeef
);
ok
(
count
==
0
,
"count = %d
\n
"
,
count
);
count
=
pSetQueryNetSessionCount
(
SESSION_DECREMENT
);
ok
(
count
==
0
,
"count = %d
\n
"
,
count
);
count
=
pSetQueryNetSessionCount
(
SESSION_QUERY
);
ok
(
count
==
0
,
"count = %d
\n
"
,
count
);
}
static
HRESULT
WINAPI
outer_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
outer_test_iid
))
{
...
...
@@ -4460,8 +4499,14 @@ static void test_com_aggregation(void)
START_TEST
(
webbrowser
)
{
HMODULE
ieframe
=
LoadLibraryW
(
L"ieframe.dll"
);
pSetQueryNetSessionCount
=
(
void
*
)
GetProcAddress
(
ieframe
,
"SetQueryNetSessionCount"
);
OleInitialize
(
NULL
);
test_SetQueryNetSessionCount
();
container_hwnd
=
create_container_window
();
trace
(
"Testing WebBrowser (no download)...
\n
"
);
...
...
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