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
31837863
Commit
31837863
authored
Feb 24, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added implementation of ITypeInfo2_GetImplTypeFlags.
parent
69579b04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
typelib.c
dlls/oleaut32/tests/typelib.c
+37
-0
typelib2.c
dlls/oleaut32/typelib2.c
+24
-2
No files found.
dlls/oleaut32/tests/typelib.c
View file @
31837863
...
...
@@ -993,6 +993,7 @@ static void test_CreateTypeLib(void) {
TYPEDESC
typedesc1
,
typedesc2
;
TYPEATTR
*
typeattr
;
HREFTYPE
hreftype
;
int
impltypeflags
;
HRESULT
hres
;
trace
(
"CreateTypeLib tests
\n
"
);
...
...
@@ -1179,6 +1180,16 @@ static void test_CreateTypeLib(void) {
hres
=
ICreateTypeInfo_AddImplType
(
createti
,
0
,
hreftype
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetImplTypeFlags
(
createti
,
0
,
IMPLTYPEFLAG_FDEFAULT
);
ok
(
hres
==
TYPE_E_BADMODULEKIND
,
"got %08x
\n
"
,
hres
);
hres
=
ITypeInfo_GetImplTypeFlags
(
interface2
,
0
,
&
impltypeflags
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
impltypeflags
==
0
,
"impltypeflags = %x
\n
"
,
impltypeflags
);
hres
=
ITypeInfo_GetImplTypeFlags
(
interface2
,
1
,
&
impltypeflags
);
ok
(
hres
==
TYPE_E_ELEMENTNOTFOUND
,
"got %08x
\n
"
,
hres
);
ICreateTypeInfo_Release
(
createti
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
coclassW
,
TKIND_COCLASS
,
&
createti
);
...
...
@@ -1205,6 +1216,32 @@ static void test_CreateTypeLib(void) {
hres
=
ICreateTypeInfo_AddImplType
(
createti
,
2
,
hreftype
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetImplTypeFlags
(
createti
,
0
,
IMPLTYPEFLAG_FDEFAULT
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_SetImplTypeFlags
(
createti
,
1
,
IMPLTYPEFLAG_FRESTRICTED
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeInfo_QueryInterface
(
createti
,
&
IID_ITypeInfo
,
(
void
**
)
&
ti
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ITypeInfo_GetImplTypeFlags
(
ti
,
0
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"got %08x
\n
"
,
hres
);
hres
=
ITypeInfo_GetImplTypeFlags
(
ti
,
0
,
&
impltypeflags
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
impltypeflags
==
IMPLTYPEFLAG_FDEFAULT
,
"impltypeflags = %x
\n
"
,
impltypeflags
);
hres
=
ITypeInfo_GetImplTypeFlags
(
ti
,
1
,
&
impltypeflags
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
impltypeflags
==
IMPLTYPEFLAG_FRESTRICTED
,
"impltypeflags = %x
\n
"
,
impltypeflags
);
hres
=
ITypeInfo_GetImplTypeFlags
(
ti
,
2
,
&
impltypeflags
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
impltypeflags
==
0
,
"impltypeflags = %x
\n
"
,
impltypeflags
);
ITypeInfo_Release
(
ti
);
ICreateTypeInfo_Release
(
createti
);
hres
=
ITypeInfo_GetTypeAttr
(
interface1
,
&
typeattr
);
...
...
dlls/oleaut32/typelib2.c
View file @
31837863
...
...
@@ -2849,8 +2849,30 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeFlags(
UINT
index
,
INT
*
pImplTypeFlags
)
{
FIXME
(
"(%p,%d,%p), stub!
\n
"
,
iface
,
index
,
pImplTypeFlags
);
return
E_OUTOFMEMORY
;
ICreateTypeInfo2Impl
*
This
=
impl_from_ITypeInfo2
(
iface
);
int
offset
;
MSFT_RefRecord
*
ref
;
TRACE
(
"(%p,%d,%p)
\n
"
,
iface
,
index
,
pImplTypeFlags
);
if
(
!
pImplTypeFlags
)
return
E_INVALIDARG
;
if
(
index
>=
This
->
typeinfo
->
cImplTypes
)
return
TYPE_E_ELEMENTNOTFOUND
;
if
((
This
->
typeinfo
->
typekind
&
0xf
)
!=
TKIND_COCLASS
)
{
*
pImplTypeFlags
=
0
;
return
S_OK
;
}
offset
=
ctl2_find_nth_reference
(
This
->
typelib
,
This
->
typeinfo
->
datatype1
,
index
);
if
(
offset
==
-
1
)
return
TYPE_E_ELEMENTNOTFOUND
;
ref
=
(
MSFT_RefRecord
*
)
&
This
->
typelib
->
typelib_segment_data
[
MSFT_SEG_REFERENCES
][
offset
];
*
pImplTypeFlags
=
ref
->
flags
;
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