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
3c747fec
Commit
3c747fec
authored
Mar 15, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added ICreateTypeInfo2_SetFuncHelpContext implementation.
parent
eb15921f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
typelib.c
dlls/oleaut32/tests/typelib.c
+12
-0
typelib2.c
dlls/oleaut32/typelib2.c
+36
-2
No files found.
dlls/oleaut32/tests/typelib.c
View file @
3c747fec
...
...
@@ -1106,6 +1106,9 @@ static void test_CreateTypeLib(void) {
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
0
,
&
funcdesc
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetFuncHelpContext
(
createti
,
0
,
0xabcdefab
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
funcdesc
.
invkind
=
INVOKE_PROPERTYPUT
;
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
1
,
&
funcdesc
);
ok
(
hres
==
TYPE_E_INCONSISTENTPROPFUNCS
,
"got %08x
\n
"
,
hres
);
...
...
@@ -1126,10 +1129,19 @@ static void test_CreateTypeLib(void) {
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
1
,
&
funcdesc
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetFuncHelpContext
(
createti
,
1
,
0xabcdefab
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
funcdesc
.
invkind
=
INVOKE_PROPERTYPUTREF
;
hres
=
ICreateTypeInfo_AddFuncDesc
(
createti
,
0
,
&
funcdesc
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetFuncHelpContext
(
createti
,
0
,
0xabcdefab
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetFuncHelpContext
(
createti
,
0
,
0x201
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
funcdesc
.
memid
=
1
;
funcdesc
.
lprgelemdescParam
=
NULL
;
funcdesc
.
invkind
=
INVOKE_FUNC
;
...
...
dlls/oleaut32/typelib2.c
View file @
3c747fec
...
...
@@ -2264,8 +2264,42 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncHelpContext(
UINT
index
,
DWORD
dwHelpContext
)
{
FIXME
(
"(%p,%d,%d), stub!
\n
"
,
iface
,
index
,
dwHelpContext
);
return
E_OUTOFMEMORY
;
ICreateTypeInfo2Impl
*
This
=
(
ICreateTypeInfo2Impl
*
)
iface
;
CyclicList
*
func
;
int
*
typedata
;
int
size
;
TRACE
(
"(%p,%d,%d)
\n
"
,
iface
,
index
,
dwHelpContext
);
if
(
This
->
typeinfo
->
cElement
<
index
)
return
TYPE_E_ELEMENTNOTFOUND
;
if
(
This
->
typeinfo
->
cElement
==
index
)
func
=
This
->
typedata
;
else
for
(
func
=
This
->
typedata
->
next
->
next
;
func
!=
This
->
typedata
;
func
=
func
->
next
)
if
(
index
--
==
0
)
break
;
typedata
=
func
->
u
.
data
;
/* Compute func size without arguments */
size
=
typedata
[
0
]
-
typedata
[
5
]
*
(
typedata
[
4
]
&
0x1000
?
16
:
12
);
/* Allocate memory for HelpContext if needed */
if
(
size
<
7
*
sizeof
(
int
))
{
typedata
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
typedata
,
typedata
[
0
]
+
sizeof
(
int
));
if
(
!
typedata
)
return
E_OUTOFMEMORY
;
memmove
(
&
typedata
[
7
],
&
typedata
[
6
],
typedata
[
0
]
-
sizeof
(
int
)
*
6
);
typedata
[
0
]
+=
sizeof
(
int
);
This
->
typedata
->
next
->
u
.
val
+=
sizeof
(
int
);
func
->
u
.
data
=
typedata
;
}
typedata
[
6
]
=
dwHelpContext
;
return
S_OK
;
}
/******************************************************************************
...
...
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