Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
6e500f65
Commit
6e500f65
authored
21 years ago
by
Alastair Bridgewater
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented ITypeLib2_GetTypeInfo() and
ITypeLib2_GetTypeInfoOfGuid().
parent
70c5612e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/oleaut32/typelib2.c
+52
-6
52 additions, 6 deletions
dlls/oleaut32/typelib2.c
with
52 additions
and
6 deletions
dlls/oleaut32/typelib2.c
+
52
−
6
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
);
FIXM
E
(
"(%p,%d,%p)
, stub!
\n
"
,
iface
,
index
,
ppTInfo
);
TRAC
E
(
"(%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
);
}
/******************************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment