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
5cc0d1ee
Commit
5cc0d1ee
authored
Jul 30, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wscript.exe: Added support for IHost type info.
parent
68a3f4eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
main.c
programs/wscript/main.c
+25
-2
wscript.h
programs/wscript/wscript.h
+2
-0
No files found.
programs/wscript/main.c
View file @
5cc0d1ee
...
...
@@ -37,6 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(wscript);
static
const
WCHAR
wscriptW
[]
=
{
'W'
,
'S'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
0
};
static
const
WCHAR
wshW
[]
=
{
'W'
,
'S'
,
'H'
,
0
};
ITypeInfo
*
host_ti
;
static
HRESULT
WINAPI
ActiveScriptSite_QueryInterface
(
IActiveScriptSite
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -83,8 +85,8 @@ static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface,
return
E_FAIL
;
if
(
dwReturnMask
&
SCRIPTINFO_ITYPEINFO
)
{
WINE_FIXME
(
"SCRIPTINFO_ITYPEINFO not supported
\n
"
);
return
E_NOTIMPL
;
ITypeInfo_AddRef
(
host_ti
);
*
ppti
=
host_ti
;
}
if
(
dwReturnMask
&
SCRIPTINFO_IUNKNOWN
)
{
...
...
@@ -151,6 +153,23 @@ static IActiveScriptSiteVtbl ActiveScriptSiteVtbl = {
IActiveScriptSite
script_site
=
{
&
ActiveScriptSiteVtbl
};
static
BOOL
load_typelib
(
void
)
{
ITypeLib
*
typelib
;
HRESULT
hres
;
static
const
WCHAR
wscript_exeW
[]
=
{
'w'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
hres
=
LoadTypeLib
(
wscript_exeW
,
&
typelib
);
if
(
FAILED
(
hres
))
return
FALSE
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
&
IID_IHost
,
&
host_ti
);
ITypeLib_Release
(
typelib
);
return
SUCCEEDED
(
hres
);
}
static
BOOL
get_engine_clsid
(
const
WCHAR
*
ext
,
CLSID
*
clsid
)
{
WCHAR
fileid
[
64
],
progid
[
64
];
...
...
@@ -222,6 +241,9 @@ static HRESULT init_engine(IActiveScript *script, IActiveScriptParse *parser)
{
HRESULT
hres
;
if
(
!
load_typelib
())
return
FALSE
;
hres
=
IActiveScript_SetScriptSite
(
script
,
&
script_site
);
if
(
FAILED
(
hres
))
return
FALSE
;
...
...
@@ -327,6 +349,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm
if
(
init_engine
(
script
,
parser
))
{
run_script
(
cmdline
,
script
,
parser
);
IActiveScript_Close
(
script
);
ITypeInfo_Release
(
host_ti
);
}
else
{
WINE_FIXME
(
"Script initialization failed
\n
"
);
}
...
...
programs/wscript/wscript.h
View file @
5cc0d1ee
...
...
@@ -19,3 +19,5 @@
#include "ihost.h"
extern
IHost
host_obj
;
extern
ITypeInfo
*
host_ti
;
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