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
6e500f65
Commit
6e500f65
authored
Mar 13, 2004
by
Alastair Bridgewater
Committed by
Alexandre Julliard
Mar 13, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented ITypeLib2_GetTypeInfo() and
ITypeLib2_GetTypeInfoOfGuid().
parent
70c5612e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
6 deletions
+52
-6
typelib2.c
dlls/oleaut32/typelib2.c
+52
-6
No files found.
dlls/oleaut32/typelib2.c
View file @
6e500f65
...
...
@@ -1059,6 +1059,39 @@ static int ctl2_find_nth_reference(
return
offset
;
}
/****************************************************************************
* ctl2_find_typeinfo_from_offset
*
* Finds an ITypeInfo given an offset into the TYPEINFO segment.
*
* RETURNS
*
* Success: S_OK.
* Failure: TYPE_E_ELEMENTNOTFOUND.
*/
static
HRESULT
ctl2_find_typeinfo_from_offset
(
ICreateTypeLib2Impl
*
This
,
/* [I] The typelib to find the typeinfo in. */
int
offset
,
/* [I] The offset of the desired typeinfo. */
ITypeInfo
**
ppTinfo
)
/* [I] The typeinfo found. */
{
void
*
typeinfodata
;
ICreateTypeInfo2Impl
*
typeinfo
;
typeinfodata
=
&
This
->
typelib_segment_data
[
MSFT_SEG_TYPEINFO
][
offset
];
for
(
typeinfo
=
This
->
typeinfos
;
typeinfo
;
typeinfo
=
typeinfo
->
next_typeinfo
)
{
if
(
typeinfo
->
typeinfo
==
typeinfodata
)
{
*
ppTinfo
=
(
ITypeInfo
*
)
&
typeinfo
->
lpVtblTypeInfo2
;
ITypeInfo2_AddRef
(
*
ppTinfo
);
return
S_OK
;
}
}
ERR
(
"Failed to find typeinfo, invariant varied.
\n
"
);
return
TYPE_E_ELEMENTNOTFOUND
;
}
/*================== ICreateTypeInfo2 Implementation ===================================*/
/******************************************************************************
...
...
@@ -3424,11 +3457,15 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfo(
UINT
index
,
ITypeInfo
**
ppTInfo
)
{
/* ICOM_THIS_From_ITypeLib2(ICreateTypeLib2Impl, iface); */
ICOM_THIS_From_ITypeLib2
(
ICreateTypeLib2Impl
,
iface
);
FIXME
(
"(%p,%d,%p), stub!
\n
"
,
iface
,
index
,
ppTInfo
);
TRACE
(
"(%p,%d,%p)
\n
"
,
iface
,
index
,
ppTInfo
);
return
E_OUTOFMEMORY
;
if
((
index
<
0
)
||
(
index
>=
This
->
typelib_header
.
nrtypeinfos
))
{
return
TYPE_E_ELEMENTNOTFOUND
;
}
return
ctl2_find_typeinfo_from_offset
(
This
,
This
->
typelib_typeinfo_offsets
[
index
],
ppTInfo
);
}
/******************************************************************************
...
...
@@ -3458,11 +3495,20 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid(
REFGUID
guid
,
ITypeInfo
**
ppTinfo
)
{
/* ICOM_THIS_From_ITypeLib2(ICreateTypeLib2Impl, iface); */
ICOM_THIS_From_ITypeLib2
(
ICreateTypeLib2Impl
,
iface
);
FIXME
(
"(%p,%s,%p), stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
ppTinfo
);
int
guidoffset
;
int
typeinfo
;
return
E_OUTOFMEMORY
;
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
guid
),
ppTinfo
);
guidoffset
=
ctl2_find_guid
(
This
,
ctl2_hash_guid
(
guid
),
guid
);
if
(
guidoffset
==
-
1
)
return
TYPE_E_ELEMENTNOTFOUND
;
typeinfo
=
((
MSFT_GuidEntry
*
)
&
This
->
typelib_segment_data
[
MSFT_SEG_GUID
][
guidoffset
])
->
hreftype
;
if
(
typeinfo
<
0
)
return
TYPE_E_ELEMENTNOTFOUND
;
return
ctl2_find_typeinfo_from_offset
(
This
,
typeinfo
,
ppTinfo
);
}
/******************************************************************************
...
...
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