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
268a92be
Commit
268a92be
authored
Sep 01, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added IActiveScript::SetScriptSite.
parent
d19cdef8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
jscript.c
dlls/jscript/jscript.c
+43
-2
jscript.h
dlls/jscript/jscript.h
+1
-0
No files found.
dlls/jscript/jscript.c
View file @
268a92be
...
...
@@ -34,6 +34,9 @@ typedef struct {
DWORD
safeopt
;
script_ctx_t
*
ctx
;
LONG
thread_id
;
IActiveScriptSite
*
site
;
}
JScript
;
#define ACTSCRIPT(x) ((IActiveScript*) &(x)->lpIActiveScriptVtbl)
...
...
@@ -50,6 +53,15 @@ void script_release(script_ctx_t *ctx)
heap_free
(
ctx
);
}
static
void
change_state
(
JScript
*
This
,
SCRIPTSTATE
state
)
{
if
(
This
->
ctx
->
state
==
state
)
return
;
This
->
ctx
->
state
=
state
;
IActiveScriptSite_OnStateChange
(
This
->
site
,
state
);
}
#define ACTSCRIPT_THIS(iface) DEFINE_THIS(JScript, IActiveScript, iface)
static
HRESULT
WINAPI
JScript_QueryInterface
(
IActiveScript
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -110,6 +122,8 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface)
if
(
!
ref
)
{
if
(
This
->
ctx
)
script_release
(
This
->
ctx
);
if
(
This
->
site
)
IActiveScriptSite_Release
(
This
->
site
);
heap_free
(
This
);
unlock_module
();
}
...
...
@@ -121,8 +135,35 @@ static HRESULT WINAPI JScript_SetScriptSite(IActiveScript *iface,
IActiveScriptSite
*
pass
)
{
JScript
*
This
=
ACTSCRIPT_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pass
);
return
E_NOTIMPL
;
LCID
lcid
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pass
);
if
(
!
pass
)
return
E_POINTER
;
if
(
This
->
site
)
return
E_UNEXPECTED
;
if
(
!
This
->
ctx
)
{
hres
=
IActiveScriptParse_InitNew
(
ASPARSE
(
This
));
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
InterlockedCompareExchange
(
&
This
->
thread_id
,
GetCurrentThreadId
(),
0
))
return
E_UNEXPECTED
;
This
->
site
=
pass
;
IActiveScriptSite_AddRef
(
This
->
site
);
hres
=
IActiveScriptSite_GetLCID
(
This
->
site
,
&
lcid
);
if
(
hres
==
S_OK
)
This
->
ctx
->
lcid
=
lcid
;
change_state
(
This
,
SCRIPTSTATE_INITIALIZED
);
return
S_OK
;
}
static
HRESULT
WINAPI
JScript_GetScriptSite
(
IActiveScript
*
iface
,
REFIID
riid
,
...
...
dlls/jscript/jscript.h
View file @
268a92be
...
...
@@ -33,6 +33,7 @@ struct _script_ctx_t {
LONG
ref
;
SCRIPTSTATE
state
;
LCID
lcid
;
};
HRESULT
WINAPI
JScriptFactory_CreateInstance
(
IClassFactory
*
,
IUnknown
*
,
REFIID
,
void
**
);
...
...
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