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
90e72d2d
Commit
90e72d2d
authored
May 29, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
May 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implement ICreateTypeInfo::SetFuncAndParamNames.
parent
11589fa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
2 deletions
+46
-2
typelib.c
dlls/oleaut32/tests/typelib.c
+7
-0
typelib.c
dlls/oleaut32/typelib.c
+39
-2
No files found.
dlls/oleaut32/tests/typelib.c
View file @
90e72d2d
...
...
@@ -3250,6 +3250,13 @@ static void test_SetFuncAndParamNames(void)
hr
=
ICreateTypeInfo_SetFuncAndParamNames
(
cti
,
2
,
propW
,
1
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_AddFuncDesc
(
cti
,
3
,
&
funcdesc
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* getter name again */
hr
=
ICreateTypeInfo_SetFuncAndParamNames
(
cti
,
3
,
propW
,
1
);
ok
(
hr
==
TYPE_E_AMBIGUOUSNAME
,
"got 0x%08x
\n
"
,
hr
);
ICreateTypeInfo_Release
(
cti
);
ICreateTypeLib2_Release
(
ctl
);
DeleteFileA
(
filenameA
);
...
...
dlls/oleaut32/typelib.c
View file @
90e72d2d
...
...
@@ -8840,8 +8840,45 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames(ICreateTypeInfo2 *
UINT
index
,
LPOLESTR
*
names
,
UINT
numNames
)
{
ITypeInfoImpl
*
This
=
info_impl_from_ICreateTypeInfo2
(
iface
);
FIXME
(
"%p %u %p %u - stub
\n
"
,
This
,
index
,
names
,
numNames
);
return
E_NOTIMPL
;
TLBFuncDesc
*
func_desc
=
&
This
->
funcdescs
[
index
];
int
i
;
TRACE
(
"%p %u %p %u
\n
"
,
This
,
index
,
names
,
numNames
);
if
(
!
names
)
return
E_INVALIDARG
;
if
(
index
>=
This
->
TypeAttr
.
cFuncs
||
numNames
==
0
)
return
TYPE_E_ELEMENTNOTFOUND
;
if
(
func_desc
->
funcdesc
.
invkind
&
(
INVOKE_PROPERTYPUT
|
INVOKE_PROPERTYPUTREF
)){
if
(
numNames
>
func_desc
->
funcdesc
.
cParams
)
return
TYPE_E_ELEMENTNOTFOUND
;
}
else
if
(
numNames
>
func_desc
->
funcdesc
.
cParams
+
1
)
return
TYPE_E_ELEMENTNOTFOUND
;
for
(
i
=
0
;
i
<
This
->
TypeAttr
.
cFuncs
;
++
i
)
{
TLBFuncDesc
*
iter
=
&
This
->
funcdescs
[
i
];
if
(
iter
->
Name
&&
!
strcmpW
(
iter
->
Name
,
*
names
))
{
if
(
iter
->
funcdesc
.
invkind
&
(
INVOKE_PROPERTYPUT
|
INVOKE_PROPERTYPUTREF
|
INVOKE_PROPERTYGET
)
&&
func_desc
->
funcdesc
.
invkind
&
(
INVOKE_PROPERTYPUT
|
INVOKE_PROPERTYPUTREF
|
INVOKE_PROPERTYGET
)
&&
func_desc
->
funcdesc
.
invkind
!=
iter
->
funcdesc
.
invkind
)
continue
;
return
TYPE_E_AMBIGUOUSNAME
;
}
}
SysFreeString
(
func_desc
->
Name
);
func_desc
->
Name
=
SysAllocString
(
*
names
);
for
(
i
=
1
;
i
<
numNames
;
++
i
)
{
TLBParDesc
*
par_desc
=
func_desc
->
pParamDesc
+
i
-
1
;
SysFreeString
(
par_desc
->
Name
);
par_desc
->
Name
=
SysAllocString
(
*
(
names
+
i
));
}
return
S_OK
;
}
static
HRESULT
WINAPI
ICreateTypeInfo2_fnSetVarName
(
ICreateTypeInfo2
*
iface
,
...
...
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