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
6ee2e3ac
Commit
6ee2e3ac
authored
Sep 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added beginning InvokeEx implementation.
parent
8b4c560d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
lang.vbs
dlls/vbscript/tests/lang.vbs
+5
-0
run.c
dlls/vbscript/tests/run.c
+26
-0
vbdisp.c
dlls/vbscript/vbdisp.c
+34
-1
No files found.
dlls/vbscript/tests/lang.vbs
View file @
6ee2e3ac
...
...
@@ -400,4 +400,9 @@ End Class
Call
testDisp
(
new
testClass
)
Set
obj
=
New
TestClass
Call
ok
(
obj
.
publicFunction
=
4
,
"obj.publicFunction = "
&
obj
.
publicFunction
)
Call
ok
(
obj
.
publicFunction
()
=
4
,
"obj.publicFunction() = "
&
obj
.
publicFunction
())
reportSuccess
()
dlls/vbscript/tests/run.c
View file @
6ee2e3ac
...
...
@@ -144,7 +144,11 @@ static BOOL is_english(void)
static
void
test_disp
(
IDispatch
*
disp
)
{
DISPID
id
,
public_func_id
,
public_sub_id
;
DISPID
named_args
[
5
]
=
{
DISPID_PROPERTYPUT
};
VARIANT
v
,
args
[
5
];
DISPPARAMS
dp
=
{
args
,
named_args
};
IDispatchEx
*
dispex
;
EXCEPINFO
ei
=
{
0
};
BSTR
str
;
HRESULT
hres
;
...
...
@@ -163,6 +167,28 @@ static void test_disp(IDispatch *disp)
ok
(
hres
==
S_OK
,
"GetDispID(publicSub) failed: %08x
\n
"
,
hres
);
ok
(
public_sub_id
!=
-
1
,
"public_func_id = -1
\n
"
);
dp
.
cArgs
=
dp
.
cNamedArgs
=
0
;
hres
=
IDispatchEx_InvokeEx
(
dispex
,
public_func_id
,
0
,
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
,
&
dp
,
&
v
,
&
ei
,
NULL
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_I2
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I2
(
&
v
)
==
4
,
"V_I2(v) = %d
\n
"
,
V_I2
(
&
v
));
dp
.
cArgs
=
dp
.
cNamedArgs
=
0
;
hres
=
IDispatchEx_InvokeEx
(
dispex
,
public_func_id
,
0
,
DISPATCH_METHOD
,
&
dp
,
&
v
,
&
ei
,
NULL
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_I2
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I2
(
&
v
)
==
4
,
"V_I2(v) = %d
\n
"
,
V_I2
(
&
v
));
dp
.
cArgs
=
dp
.
cNamedArgs
=
0
;
hres
=
IDispatchEx_InvokeEx
(
dispex
,
public_sub_id
,
0
,
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
,
&
dp
,
&
v
,
&
ei
,
NULL
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
dp
.
cArgs
=
dp
.
cNamedArgs
=
0
;
hres
=
IDispatchEx_InvokeEx
(
dispex
,
public_sub_id
,
0
,
DISPATCH_METHOD
,
&
dp
,
&
v
,
&
ei
,
NULL
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
str
=
a2bstr
(
"privateSub"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseInsensitive
,
&
id
);
SysFreeString
(
str
);
...
...
dlls/vbscript/vbdisp.c
View file @
6ee2e3ac
...
...
@@ -22,6 +22,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
vbscript
);
static
inline
BOOL
is_func_id
(
vbdisp_t
*
This
,
DISPID
id
)
{
return
id
<
This
->
desc
->
func_cnt
;
}
static
BOOL
get_func_id
(
vbdisp_t
*
This
,
const
WCHAR
*
name
,
BOOL
search_private
,
DISPID
*
id
)
{
unsigned
i
;
...
...
@@ -150,7 +155,35 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
vbdisp_t
*
This
=
impl_from_IDispatchEx
(
iface
);
FIXME
(
"(%p)->(%x %x %x %p %p %p %p)
\n
"
,
This
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
TRACE
(
"(%p)->(%x %x %x %p %p %p %p)
\n
"
,
This
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
if
(
pvarRes
)
V_VT
(
pvarRes
)
=
VT_EMPTY
;
if
(
id
<
0
)
return
DISP_E_MEMBERNOTFOUND
;
if
(
is_func_id
(
This
,
id
))
{
function_t
*
func
;
switch
(
wFlags
)
{
case
DISPATCH_METHOD
:
case
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
:
func
=
This
->
desc
->
funcs
[
id
].
entries
[
VBDISP_CALLGET
];
if
(
!
func
)
{
FIXME
(
"no invoke/getter
\n
"
);
return
DISP_E_MEMBERNOTFOUND
;
}
return
exec_script
(
This
->
desc
->
ctx
,
func
,
pdp
,
pvarRes
);
default:
FIXME
(
"flags %x
\n
"
,
wFlags
);
return
DISP_E_MEMBERNOTFOUND
;
}
}
FIXME
(
"not implemented for non-function ids
\n
"
);
return
DISP_E_MEMBERNOTFOUND
;
}
...
...
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