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
0becff82
Commit
0becff82
authored
Mar 02, 2015
by
Shuai Meng
Committed by
Alexandre Julliard
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Also return Attributes in GetFolderDefinition.
parent
21bfc8c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
2 deletions
+65
-2
global.c
dlls/vbscript/global.c
+23
-2
api.vbs
dlls/vbscript/tests/api.vbs
+42
-0
No files found.
dlls/vbscript/global.c
View file @
0becff82
...
...
@@ -1268,8 +1268,29 @@ static HRESULT Global_ChrB(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
static
HRESULT
Global_Asc
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HRESULT
hres
;
BSTR
bstr
;
WCHAR
ret
;
TRACE
(
"(%s)
\n
"
,
debugstr_variant
(
arg
));
switch
(
V_VT
(
arg
))
{
case
VT_NULL
:
return
MAKE_VBSERROR
(
VBSE_ILLEGAL_NULL_USE
);
case
VT_EMPTY
:
return
MAKE_VBSERROR
(
VBSE_ILLEGAL_FUNC_CALL
);
case
VT_BSTR
:
bstr
=
V_BSTR
(
arg
);
default:
hres
=
to_string
(
arg
,
&
bstr
);
if
(
FAILED
(
hres
))
return
hres
;
}
ret
=
bstr
[
0
];
if
(
ret
==
0
)
return
MAKE_VBSERROR
(
VBSE_ILLEGAL_FUNC_CALL
);
return
return_short
(
res
,
ret
);
}
/* The function supports only single-byte and double-byte character sets. It
...
...
dlls/vbscript/tests/api.vbs
View file @
0becff82
...
...
@@ -1324,4 +1324,46 @@ Call testRGBError(&h4d&, -2, &h2f&, 5)
Call
ok
(
getVT
(
Timer
)
=
"VT_R4"
,
"getVT(Timer) = "
&
getVT
(
Timer
))
Sub
testAscError
(
strings
,
error_num
)
on
error
resume
next
Dim
x
Call
Err
.
clear
()
x
=
Asc
(
strings
)
Call
ok
(
Err
.
number
=
error_num
,
"Err.number = "
&
Err
.
number
)
End
Sub
Call
ok
(
Asc
(
0
)
=
48
,
"Asc(0) = "
&
Asc
(
0
))
Call
ok
(
getVT
(
Asc
(
0
))
=
"VT_I2"
,
"getVT(Asc(0)) = "
&
getVT
(
Asc
(
0
)))
Call
ok
(
Asc
(
-
32769
)
=
45
,
"Asc(-32769) = "
&
Asc
(
-
32769
))
Call
ok
(
getVT
(
Asc
(
-
32769
))
=
"VT_I2"
,
"getVT(Asc(-32769)) = "
&
getVT
(
Asc
(
-
32769
)))
Call
ok
(
Asc
(
CSng
(
90.68
))
=
57
,
"Asc(CSng(90.68)) = "
&
Asc
(
CSng
(
90.68
)))
Call
ok
(
getVT
(
Asc
(
CSng
(
90.68
)))
=
"VT_I2"
,
"getVT(Asc(CSng(90.68))) = "
&
getVT
(
Asc
(
CSng
(
90.68
))))
Call
ok
(
Asc
(
123
)
=
49
,
"Asc(123) = "
&
Asc
(
123
))
Call
ok
(
getVT
(
Asc
(
123
))
=
"VT_I2"
,
"getVT(Asc(123)) = "
&
getVT
(
Asc
(
123
)))
Call
ok
(
Asc
(
CCur
(
234
))
=
50
,
"Asc(CCur(234)) = "
&
Asc
(
CCur
(
234
)))
Call
ok
(
getVT
(
Asc
(
CCur
(
234
)))
=
"VT_I2"
,
"getVT(Asc(CCur(234))) = "
&
getVT
(
Asc
(
CCur
(
234
))))
Call
ok
(
Asc
(
"abc"
)
=
97
,
"Asc(
""
abc
""
) = "
&
Asc
(
"abc"
))
Call
ok
(
getVT
(
Asc
(
"abc"
))
=
"VT_I2"
,
"getVT(Asc(
""
abc
""
)) = "
&
getVT
(
Asc
(
"abc"
)))
Call
ok
(
Asc
(
"?"
)
=
63
,
"Asc(
""
?
""
) = "
&
Asc
(
"?"
))
Call
ok
(
getVT
(
Asc
(
"?"
))
=
"VT_I2"
,
"getVT(Asc(
""
?
""
)) = "
&
getVT
(
Asc
(
"?"
)))
Call
ok
(
Asc
(
" space"
)
=
32
,
"Asc(
""
space
""
) = "
&
Asc
(
" space"
))
Call
ok
(
getVT
(
Asc
(
" space"
))
=
"VT_I2"
,
"getVT(Asc(
""
space
""
)) = "
&
getVT
(
Asc
(
" space"
)))
Call
ok
(
Asc
(
"@"
)
=
64
,
"Asc(
""
@
""
) = "
&
Asc
(
"@"
))
Call
ok
(
getVT
(
Asc
(
"@"
))
=
"VT_I2"
,
"getVT(Asc(
""
@
""
)) = "
&
getVT
(
Asc
(
"@"
)))
Call
ok
(
Asc
(
"\n"
)
=
92
,
"Asc(
""
\n
""
) = "
&
Asc
(
"\n"
))
Call
ok
(
getVT
(
Asc
(
"\n"
))
=
"VT_I2"
,
"getVT(Asc(
""
\n
""
)) = "
&
getVT
(
Asc
(
"\n"
)))
if
isEnglishLang
then
Call
ok
(
Asc
(
False
)
=
70
,
"Asc(False) = "
&
Asc
(
False
))
Call
ok
(
getVT
(
Asc
(
False
))
=
"VT_I2"
,
"getVT(Asc(False)) = "
&
getVT
(
Asc
(
False
)))
Call
ok
(
Asc
(
True
)
=
84
,
"Asc(True) = "
&
Asc
(
True
))
Call
ok
(
getVT
(
Asc
(
True
))
=
"VT_I2"
,
"getVT(Asc(True)) = "
&
getVT
(
Asc
(
True
)))
End
if
Call
ok
(
Asc
(
CByte
(
7
))
=
55
,
"Asc(CByte(7)) = "
&
Asc
(
CByte
(
7
)))
Call
ok
(
getVT
(
Asc
(
CByte
(
7
)))
=
"VT_I2"
,
"getVT(Asc(CByte(7))) = "
&
getVT
(
Asc
(
CByte
(
7
))))
Call
testAscError
(
Empty
,
5
)
Call
testAscError
(
Null
,
94
)
Call
testAscError
(
""
,
5
)
Call
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