Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
97556eb0
Commit
97556eb0
authored
Aug 31, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscipt: Added IActiveScript::GetScriptState implementation.
parent
389eb971
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
vbscript.c
dlls/vbscript/tests/vbscript.c
+19
-0
vbscript.c
dlls/vbscript/vbscript.c
+11
-2
No files found.
dlls/vbscript/tests/vbscript.c
View file @
97556eb0
...
...
@@ -64,6 +64,17 @@ DEFINE_EXPECT(OnLeaveScript);
DEFINE_GUID
(
CLSID_VBScript
,
0xb54f3741
,
0x5b07
,
0x11cf
,
0xa4
,
0xb0
,
0x00
,
0xaa
,
0x00
,
0x4a
,
0x55
,
0xe8
);
#define test_state(s,ss) _test_state(__LINE__,s,ss)
static
void
_test_state
(
unsigned
line
,
IActiveScript
*
script
,
SCRIPTSTATE
exstate
)
{
SCRIPTSTATE
state
=
-
1
;
HRESULT
hres
;
hres
=
IActiveScript_GetScriptState
(
script
,
&
state
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"GetScriptState failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
state
==
exstate
,
"state=%d, expected %d
\n
"
,
state
,
exstate
);
}
static
HRESULT
WINAPI
ActiveScriptSite_QueryInterface
(
IActiveScriptSite
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
...
...
@@ -201,16 +212,22 @@ static void test_vbscript(void)
hres
=
IActiveScript_QueryInterface
(
vbscript
,
&
IID_IActiveScriptParse
,
(
void
**
)
&
parser
);
ok
(
hres
==
S_OK
,
"Could not get IActiveScriptParse iface: %08x
\n
"
,
hres
);
test_state
(
vbscript
,
SCRIPTSTATE_UNINITIALIZED
);
SET_EXPECT
(
GetLCID
);
hres
=
IActiveScript_SetScriptSite
(
vbscript
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
GetLCID
);
test_state
(
vbscript
,
SCRIPTSTATE_UNINITIALIZED
);
SET_EXPECT
(
OnStateChange_INITIALIZED
);
hres
=
IActiveScriptParse64_InitNew
(
parser
);
ok
(
hres
==
S_OK
,
"InitNew failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
OnStateChange_INITIALIZED
);
test_state
(
vbscript
,
SCRIPTSTATE_INITIALIZED
);
hres
=
IActiveScriptParse64_InitNew
(
parser
);
ok
(
hres
==
E_UNEXPECTED
,
"InitNew failed: %08x, expected E_UNEXPECTED
\n
"
,
hres
);
...
...
@@ -219,6 +236,8 @@ static void test_vbscript(void)
ok
(
hres
==
S_OK
,
"Close failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
OnStateChange_CLOSED
);
test_state
(
vbscript
,
SCRIPTSTATE_CLOSED
);
IActiveScriptParse64_Release
(
parser
);
ref
=
IActiveScript_Release
(
vbscript
);
...
...
dlls/vbscript/vbscript.c
View file @
97556eb0
...
...
@@ -216,8 +216,17 @@ static HRESULT WINAPI VBScript_SetScriptState(IActiveScript *iface, SCRIPTSTATE
static
HRESULT
WINAPI
VBScript_GetScriptState
(
IActiveScript
*
iface
,
SCRIPTSTATE
*
pssState
)
{
VBScript
*
This
=
impl_from_IActiveScript
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pssState
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pssState
);
if
(
!
pssState
)
return
E_POINTER
;
if
(
This
->
thread_id
&&
This
->
thread_id
!=
GetCurrentThreadId
())
return
E_UNEXPECTED
;
*
pssState
=
This
->
state
;
return
S_OK
;
}
static
HRESULT
WINAPI
VBScript_Close
(
IActiveScript
*
iface
)
...
...
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