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
6617f270
Commit
6617f270
authored
Apr 15, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wscript: Added WScript.CreateObject implementation.
parent
554871ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
host.c
programs/wscript/host.c
+23
-2
run.js
programs/wscript/tests/run.js
+8
-0
No files found.
programs/wscript/host.c
View file @
6617f270
...
...
@@ -236,8 +236,29 @@ static HRESULT WINAPI Host_put_Timeout(IHost *iface, LONG v)
static
HRESULT
WINAPI
Host_CreateObject
(
IHost
*
iface
,
BSTR
ProgID
,
BSTR
Prefix
,
IDispatch
**
out_Dispatch
)
{
WINE_FIXME
(
"(%s %s %p)
\n
"
,
wine_dbgstr_w
(
ProgID
),
wine_dbgstr_w
(
Prefix
),
out_Dispatch
);
return
E_NOTIMPL
;
IUnknown
*
unk
;
GUID
guid
;
HRESULT
hres
;
TRACE
(
"(%s %s %p)
\n
"
,
wine_dbgstr_w
(
ProgID
),
wine_dbgstr_w
(
Prefix
),
out_Dispatch
);
if
(
Prefix
&&
*
Prefix
)
{
FIXME
(
"Prefix %s not supported
\n
"
,
debugstr_w
(
Prefix
));
return
E_NOTIMPL
;
}
hres
=
CLSIDFromProgID
(
ProgID
,
&
guid
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
CoCreateInstance
(
&
guid
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_LOCAL_SERVER
|
CLSCTX_REMOTE_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IDispatch
,
(
void
**
)
out_Dispatch
);
IUnknown_Release
(
unk
);
return
hres
;
}
static
HRESULT
WINAPI
Host_Echo
(
IHost
*
iface
,
SAFEARRAY
*
args
)
...
...
programs/wscript/tests/run.js
View file @
6617f270
...
...
@@ -49,4 +49,12 @@ WScript.Interactive = true;
ok
(
WScript
.
Interactive
===
true
,
"WScript.Interactive = "
+
WScript
.
Interactive
);
ok
(
WScript
.
Application
===
WScript
,
"WScript.Application = "
+
WScript
.
Application
);
var
obj
=
WScript
.
CreateObject
(
"Wine.Test"
);
obj
.
ok
(
true
,
"Broken WScript.CreateObject object?"
);
try
{
obj
=
WScript
.
CreateObject
(
"nonexistent"
);
ok
(
false
,
"Expected exception for CreateObject('nonexistent')"
);
}
catch
(
e
)
{}
winetest
.
reportSuccess
();
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