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
f42a73d0
Commit
f42a73d0
authored
Feb 22, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added more arguments with default values handling.
parent
4f555e3c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
typelib.c
dlls/oleaut32/tests/typelib.c
+8
-0
typelib2.c
dlls/oleaut32/typelib2.c
+30
-1
No files found.
dlls/oleaut32/tests/typelib.c
View file @
f42a73d0
...
@@ -1067,6 +1067,14 @@ static void test_CreateTypeLib(void) {
...
@@ -1067,6 +1067,14 @@ static void test_CreateTypeLib(void) {
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
3
,
&
funcdesc
);
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
3
,
&
funcdesc
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
elemdesc
[
0
].
paramdesc
.
wParamFlags
=
PARAMFLAG_FHASDEFAULT
;
elemdesc
[
0
].
paramdesc
.
pparamdescex
=
&
paramdescex
;
elemdesc
[
1
].
tdesc
.
vt
=
VT_INT
;
V_VT
(
&
paramdescex
.
varDefaultValue
)
=
VT_INT
;
V_INT
(
&
paramdescex
.
varDefaultValue
)
=
0xffffffff
;
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
3
,
&
funcdesc
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ICreateTypeInfo_Release
(
createti
);
ICreateTypeInfo_Release
(
createti
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
interface1W
,
TKIND_INTERFACE
,
&
createti
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
interface1W
,
TKIND_INTERFACE
,
&
createti
);
...
...
dlls/oleaut32/typelib2.c
View file @
f42a73d0
...
@@ -1163,8 +1163,37 @@ static HRESULT ctl2_add_default_value(
...
@@ -1163,8 +1163,37 @@ static HRESULT ctl2_add_default_value(
return
S_OK
;
return
S_OK
;
}
}
FIXME
(
"default values not implemented
\n
"
);
switch
(
arg_type
)
{
case
VT_I4
:
case
VT_R4
:
case
VT_UI4
:
case
VT_INT
:
case
VT_UINT
:
case
VT_HRESULT
:
case
VT_PTR
:
{
/* Construct the data to be allocated */
int
data
[
2
];
data
[
0
]
=
arg_type
+
(
V_UI4
(
&
v
)
<<
16
);
data
[
1
]
=
(
V_UI4
(
&
v
)
>>
16
)
+
0x57570000
;
/* Check if the data was already allocated */
/* Currently the structures doesn't allow to do it in a nice way */
for
(
*
encoded_value
=
0
;
*
encoded_value
<=
This
->
typelib_segdir
[
MSFT_SEG_CUSTDATA
].
length
-
8
;
*
encoded_value
+=
4
)
if
(
!
memcmp
(
&
This
->
typelib_segment_data
[
MSFT_SEG_CUSTDATA
][
*
encoded_value
],
data
,
8
))
return
S_OK
;
return
S_OK
;
/* Allocate the data */
*
encoded_value
=
ctl2_alloc_segment
(
This
,
MSFT_SEG_CUSTDATA
,
8
,
0
);
if
(
*
encoded_value
==
-
1
)
return
E_OUTOFMEMORY
;
memcpy
(
&
This
->
typelib_segment_data
[
MSFT_SEG_CUSTDATA
][
*
encoded_value
],
data
,
8
);
return
S_OK
;
}
default:
FIXME
(
"Argument type not yet handled
\n
"
);
return
E_NOTIMPL
;
}
}
}
/*================== ICreateTypeInfo2 Implementation ===================================*/
/*================== ICreateTypeInfo2 Implementation ===================================*/
...
...
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