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
0eff79ec
Commit
0eff79ec
authored
Nov 14, 2022
by
Jason Millard
Committed by
Alexandre Julliard
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Add support for VT_DISPATCH in Global_TypeName.
parent
c1aee64e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
global.c
dlls/vbscript/global.c
+16
-0
api.vbs
dlls/vbscript/tests/api.vbs
+4
-0
vbregexp.c
dlls/vbscript/vbregexp.c
+6
-2
No files found.
dlls/vbscript/global.c
View file @
0eff79ec
...
...
@@ -2450,6 +2450,10 @@ static HRESULT Global_DatePart(BuiltinDisp *This, VARIANT *arg, unsigned args_cn
static
HRESULT
Global_TypeName
(
BuiltinDisp
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
ITypeInfo
*
typeinfo
;
BSTR
name
=
NULL
;
HRESULT
hres
;
TRACE
(
"(%s)
\n
"
,
debugstr_variant
(
arg
));
assert
(
args_cnt
==
1
);
...
...
@@ -2482,6 +2486,18 @@ static HRESULT Global_TypeName(BuiltinDisp *This, VARIANT *arg, unsigned args_cn
return
return_string
(
res
,
L"Empty"
);
case
VT_NULL
:
return
return_string
(
res
,
L"Null"
);
case
VT_DISPATCH
:
if
(
SUCCEEDED
(
IDispatch_GetTypeInfo
(
V_DISPATCH
(
arg
),
0
,
GetUserDefaultLCID
(),
&
typeinfo
)))
{
hres
=
ITypeInfo_GetDocumentation
(
typeinfo
,
MEMBERID_NIL
,
&
name
,
NULL
,
NULL
,
NULL
);
ITypeInfo_Release
(
typeinfo
);
if
(
SUCCEEDED
(
hres
)
&&
name
&&
*
name
)
return
return_bstr
(
res
,
name
);
SysFreeString
(
name
);
}
return
return_string
(
res
,
L"Object"
);
default:
FIXME
(
"arg %s not supported
\n
"
,
debugstr_variant
(
arg
));
return
E_NOTIMPL
;
...
...
dlls/vbscript/tests/api.vbs
View file @
0eff79ec
...
...
@@ -1555,6 +1555,10 @@ Call ok(TypeName(True) = "Boolean", "TypeName(True) = " & TypeName(True))
Call
ok
(
getVT
(
TypeName
(
True
))
=
"VT_BSTR"
,
"getVT(TypeName(True)) = "
&
getVT
(
TypeName
(
True
)))
Call
ok
(
TypeName
(
arr
)
=
"Variant()"
,
"TypeName(arr) = "
&
TypeName
(
arr
))
Call
ok
(
getVT
(
TypeName
(
arr
))
=
"VT_BSTR"
,
"getVT(TypeName(arr)) = "
&
getVT
(
TypeName
(
arr
)))
Call
ok
(
TypeName
(
collectionObj
)
=
"Object"
,
"TypeName(collectionObj) = "
&
TypeName
(
collectionObj
))
Dim
regex
set
regex
=
new
RegExp
Call
ok
(
TypeName
(
regex
)
=
"IRegExp2"
,
"TypeName(regex) = "
&
TypeName
(
regex
))
Call
ok
(
VarType
(
Empty
)
=
vbEmpty
,
"VarType(Empty) = "
&
VarType
(
Empty
))
Call
ok
(
getVT
(
VarType
(
Empty
))
=
"VT_I2"
,
"getVT(VarType(Empty)) = "
&
getVT
(
VarType
(
Empty
)))
...
...
dlls/vbscript/vbregexp.c
View file @
0eff79ec
...
...
@@ -1140,8 +1140,12 @@ static HRESULT WINAPI RegExp2_GetTypeInfo(IRegExp2 *iface,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%u %lu %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%u %lu %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
*
ppTInfo
=
typeinfos
[
RegExp2_tid
];
ITypeInfo_AddRef
(
*
ppTInfo
);
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_GetIDsOfNames
(
IRegExp2
*
iface
,
REFIID
riid
,
...
...
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