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
c21c8525
Commit
c21c8525
authored
Mar 12, 2018
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Mar 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msscript: Implement IScriptControl get/set AllowUI.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f46235ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
4 deletions
+41
-4
msscript.c
dlls/msscript.ocx/msscript.c
+13
-4
msscript.c
dlls/msscript.ocx/tests/msscript.c
+28
-0
No files found.
dlls/msscript.ocx/msscript.c
View file @
c21c8525
...
...
@@ -89,6 +89,7 @@ struct ScriptControl {
IOleClientSite
*
site
;
SIZEL
extent
;
LONG
timeout
;
VARIANT_BOOL
allow_ui
;
/* connection points */
ConnectionPoint
*
cp_list
;
...
...
@@ -816,15 +817,22 @@ static HRESULT WINAPI ScriptControl_put_Timeout(IScriptControl *iface, LONG time
static
HRESULT
WINAPI
ScriptControl_get_AllowUI
(
IScriptControl
*
iface
,
VARIANT_BOOL
*
p
)
{
ScriptControl
*
This
=
impl_from_IScriptControl
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_POINTER
;
*
p
=
This
->
allow_ui
;
return
S_OK
;
}
static
HRESULT
WINAPI
ScriptControl_put_AllowUI
(
IScriptControl
*
iface
,
VARIANT_BOOL
allow_ui
)
{
ScriptControl
*
This
=
impl_from_IScriptControl
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
allow_ui
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
allow_ui
);
This
->
allow_ui
=
allow_ui
;
return
S_OK
;
}
static
HRESULT
WINAPI
ScriptControl_get_UseSafeSubset
(
IScriptControl
*
iface
,
VARIANT_BOOL
*
p
)
...
...
@@ -1882,6 +1890,7 @@ static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknow
script_control
->
timeout
=
10000
;
script_control
->
view_sink_flags
=
0
;
script_control
->
view_sink
=
NULL
;
script_control
->
allow_ui
=
VARIANT_TRUE
;
ConnectionPoint_Init
(
&
script_control
->
cp_scsource
,
script_control
,
&
DIID_DScriptControlSource
);
ConnectionPoint_Init
(
&
script_control
->
cp_propnotif
,
script_control
,
&
IID_IPropertyNotifySink
);
...
...
dlls/msscript.ocx/tests/msscript.c
View file @
c21c8525
...
...
@@ -1227,6 +1227,33 @@ static void test_AddObject(void)
SysFreeString
(
objname
);
}
static
void
test_AllowUI
(
void
)
{
IScriptControl
*
sc
;
VARIANT_BOOL
allow
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_ScriptControl
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IScriptControl
,
(
void
**
)
&
sc
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IScriptControl_get_AllowUI
(
sc
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IScriptControl_get_AllowUI
(
sc
,
&
allow
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
allow
==
VARIANT_TRUE
,
"got %d
\n
"
,
allow
);
hr
=
IScriptControl_put_AllowUI
(
sc
,
VARIANT_FALSE
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IScriptControl_get_AllowUI
(
sc
,
&
allow
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
allow
==
VARIANT_FALSE
,
"got %d
\n
"
,
allow
);
IScriptControl_Release
(
sc
);
}
START_TEST
(
msscript
)
{
IUnknown
*
unk
;
...
...
@@ -1253,6 +1280,7 @@ START_TEST(msscript)
test_timeout
();
test_Reset
();
test_AddObject
();
test_AllowUI
();
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