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
32803c04
Commit
32803c04
authored
Feb 22, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut: Added ITypeInfo2_fnGetRefTypeInfo implementation.
parent
3647c337
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
2 deletions
+71
-2
typelib2.c
dlls/oleaut32/typelib2.c
+71
-2
No files found.
dlls/oleaut32/typelib2.c
View file @
32803c04
...
...
@@ -431,6 +431,29 @@ static int ctl2_encode_string(
}
/****************************************************************************
* ctl2_decode_string
*
* Converts string stored in typelib data to unicode.
*/
static
void
ctl2_decode_string
(
char
*
data
,
/* [I] String to be decoded */
WCHAR
**
string
)
/* [O] Decoded string */
{
int
i
,
length
;
static
WCHAR
converted_string
[
0x104
];
length
=
data
[
0
]
+
(
data
[
1
]
<<
8
);
if
(
length
&
1
)
length
>>=
2
;
for
(
i
=
0
;
i
<
length
;
i
++
)
converted_string
[
i
]
=
data
[
i
+
2
];
converted_string
[
length
]
=
'\0'
;
*
string
=
converted_string
;
}
/****************************************************************************
* ctl2_alloc_segment
*
* Allocates memory from a segment in a type library.
...
...
@@ -2813,8 +2836,54 @@ static HRESULT WINAPI ITypeInfo2_fnGetRefTypeInfo(
HREFTYPE
hRefType
,
ITypeInfo
**
ppTInfo
)
{
FIXME
(
"(%p,%d,%p), stub!
\n
"
,
iface
,
hRefType
,
ppTInfo
);
return
E_OUTOFMEMORY
;
ICreateTypeInfo2Impl
*
This
=
impl_from_ITypeInfo2
(
iface
);
TRACE
(
"(%p,%d,%p)
\n
"
,
iface
,
hRefType
,
ppTInfo
);
if
(
!
ppTInfo
)
return
E_INVALIDARG
;
if
(
hRefType
&
1
)
{
ITypeLib
*
tl
;
MSFT_ImpInfo
*
impinfo
;
MSFT_ImpFile
*
impfile
;
MSFT_GuidEntry
*
guid
;
WCHAR
*
filename
;
HRESULT
hres
;
if
(
hRefType
-
1
>=
This
->
typelib
->
typelib_segdir
[
MSFT_SEG_IMPORTINFO
].
length
)
return
E_FAIL
;
impinfo
=
(
MSFT_ImpInfo
*
)
&
This
->
typelib
->
typelib_segment_data
[
MSFT_SEG_IMPORTINFO
][
hRefType
-
1
];
impfile
=
(
MSFT_ImpFile
*
)
&
This
->
typelib
->
typelib_segment_data
[
MSFT_SEG_IMPORTFILES
][
impinfo
->
oImpFile
];
guid
=
(
MSFT_GuidEntry
*
)
&
This
->
typelib
->
typelib_segment_data
[
MSFT_SEG_GUID
][
impinfo
->
oGuid
];
ctl2_decode_string
(
impfile
->
filename
,
&
filename
);
hres
=
LoadTypeLib
(
filename
,
&
tl
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
tl
,
&
guid
->
guid
,
ppTInfo
);
ITypeLib_Release
(
tl
);
return
hres
;
}
else
{
ICreateTypeInfo2Impl
*
iter
;
int
i
=
0
;
for
(
iter
=
This
->
typelib
->
typeinfos
;
iter
;
iter
=
iter
->
next_typeinfo
)
{
if
(
This
->
typelib
->
typelib_typeinfo_offsets
[
i
]
==
hRefType
)
{
*
ppTInfo
=
(
ITypeInfo
*
)
&
iter
->
lpVtblTypeInfo2
;
ITypeLib_AddRef
(
*
ppTInfo
);
return
S_OK
;
}
i
++
;
}
}
return
E_FAIL
;
}
/******************************************************************************
...
...
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