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
97f29129
Commit
97f29129
authored
Feb 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added support for a few more constants.
parent
70c21c8e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
30 deletions
+20
-30
global.c
dlls/vbscript/global.c
+4
-28
api.vbs
dlls/vbscript/tests/api.vbs
+9
-0
vbdisp.c
dlls/vbscript/vbdisp.c
+7
-2
No files found.
dlls/vbscript/global.c
View file @
97f29129
...
...
@@ -1771,30 +1771,6 @@ static HRESULT Global_vbVerticalTab(vbdisp_t *This, VARIANT *arg, unsigned args_
return
E_NOTIMPL
;
}
static
HRESULT
Global_vbMsgBoxHelpButton
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
Global_vbMsgBoxSetForeground
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
Global_vbMsgBoxRight
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
Global_vbMsgBoxRtlReading
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
const
builtin_prop_t
global_props
[]
=
{
{
DISPID_GLOBAL_VBUSESYSTEM
,
NULL
,
BP_GET
,
0
},
{
DISPID_GLOBAL_USESYSTEMDAYOFWEEK
,
NULL
,
BP_GET
,
0
},
...
...
@@ -1984,10 +1960,10 @@ static const builtin_prop_t global_props[] = {
{
DISPID_GLOBAL_EXECUTE
,
Global_Execute
,
0
,
1
},
{
DISPID_GLOBAL_EXECUTEGLOBAL
,
Global_ExecuteGlobal
,
0
,
1
},
{
DISPID_GLOBAL_GETREF
,
Global_GetRef
,
0
,
1
},
{
DISPID_GLOBAL_VBMSGBOXHELPBUTTON
,
Global_vbMsgBoxHelpButton
,
BP_GET
},
{
DISPID_GLOBAL_VBMSGBOXSETFOREGROUND
,
Global_vbMsgBoxSetForeground
,
BP_GET
},
{
DISPID_GLOBAL_VBMSGBOXRIGHT
,
Global_vbMsgBoxRight
,
BP_GE
T
},
{
DISPID_GLOBAL_VBMSGBOXRTLREADING
,
Global_vbMsgBoxRtlReading
,
BP_GET
}
{
DISPID_GLOBAL_VBMSGBOXHELPBUTTON
,
NULL
,
BP_GET
,
MB_HELP
},
{
DISPID_GLOBAL_VBMSGBOXSETFOREGROUND
,
NULL
,
BP_GET
,
MB_SETFOREGROUND
},
{
DISPID_GLOBAL_VBMSGBOXRIGHT
,
NULL
,
BP_GET
,
MB_RIGH
T
},
{
DISPID_GLOBAL_VBMSGBOXRTLREADING
,
NULL
,
BP_GET
,
MB_RTLREADING
}
};
HRESULT
init_global
(
script_ctx_t
*
ctx
)
...
...
dlls/vbscript/tests/api.vbs
View file @
97f29129
...
...
@@ -43,6 +43,11 @@ Sub TestConstant(name, val, exval)
Call
ok
(
getVT
(
val
)
=
"VT_I2*"
,
"getVT("
&
name
&
") = "
&
getVT
(
val
))
End
Sub
Sub
TestConstantI4
(
name
,
val
,
exval
)
Call
ok
(
val
=
exval
,
name
&
" = "
&
val
&
" expected "
&
exval
)
Call
ok
(
getVT
(
val
)
=
"VT_I4*"
,
"getVT("
&
name
&
") = "
&
getVT
(
val
))
End
Sub
TestConstant
"vbEmpty"
,
vbEmpty
,
0
TestConstant
"vbNull"
,
vbNull
,
1
TestConstant
"vbLong"
,
vbLong
,
3
...
...
@@ -76,6 +81,10 @@ TestConstant "vbFirstFourDays", vbFirstFourDays, 2
TestConstant
"vbFirstFullWeek"
,
vbFirstFullWeek
,
3
TestConstant
"vbTrue"
,
vbTrue
,
-
1
TestConstant
"vbFalse"
,
vbFalse
,
0
TestConstantI4
"vbMsgBoxHelpButton"
,
vbMsgBoxHelpButton
,
16384
TestConstantI4
"vbMsgBoxSetForeground"
,
vbMsgBoxSetForeground
,
65536
TestConstantI4
"vbMsgBoxRight"
,
vbMsgBoxRight
,
524288
TestConstantI4
"vbMsgBoxRtlReading"
,
vbMsgBoxRtlReading
,
1048576
Sub
TestCStr
(
arg
,
exval
)
dim
x
...
...
dlls/vbscript/vbdisp.c
View file @
97f29129
...
...
@@ -150,9 +150,14 @@ static HRESULT invoke_builtin(vbdisp_t *This, const builtin_prop_t *prop, WORD f
break
;
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
if
(
!
prop
->
proc
&&
prop
->
flags
==
BP_GET
)
{
assert
((
INT16
)
prop
->
min_args
==
prop
->
min_args
);
int
val
=
prop
->
min_args
;
if
(
val
<
0x4000
)
{
V_VT
(
res
)
=
VT_I2
;
V_I2
(
res
)
=
prop
->
min_args
;
V_I2
(
res
)
=
val
;
}
else
{
V_VT
(
res
)
=
VT_I4
;
V_I4
(
res
)
=
val
;
}
return
S_OK
;
}
break
;
...
...
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