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
b6cf636c
Commit
b6cf636c
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_fnGetTypeAttr.
parent
32c39db8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
3 deletions
+74
-3
typelib.c
dlls/oleaut32/tests/typelib.c
+31
-0
typelib2.c
dlls/oleaut32/typelib2.c
+43
-3
No files found.
dlls/oleaut32/tests/typelib.c
View file @
b6cf636c
...
...
@@ -990,6 +990,7 @@ static void test_CreateTypeLib(void) {
ELEMDESC
elemdesc
[
5
];
PARAMDESCEX
paramdescex
;
TYPEDESC
typedesc1
,
typedesc2
;
TYPEATTR
*
typeattr
;
HREFTYPE
hreftype
;
HRESULT
hres
;
...
...
@@ -1182,6 +1183,36 @@ static void test_CreateTypeLib(void) {
ICreateTypeInfo_Release
(
createti2
);
hres
=
ITypeInfo_GetTypeAttr
(
interface1
,
&
typeattr
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
typeattr
->
cbSizeInstance
==
4
,
"cbSizeInstance = %d
\n
"
,
typeattr
->
cbSizeInstance
);
ok
(
typeattr
->
typekind
==
3
,
"typekind = %d
\n
"
,
typeattr
->
typekind
);
ok
(
typeattr
->
cFuncs
==
11
,
"cFuncs = %d
\n
"
,
typeattr
->
cFuncs
);
ok
(
typeattr
->
cVars
==
0
,
"cVars = %d
\n
"
,
typeattr
->
cVars
);
ok
(
typeattr
->
cImplTypes
==
1
,
"cImplTypes = %d
\n
"
,
typeattr
->
cImplTypes
);
ok
(
typeattr
->
cbSizeVft
==
56
,
"cbSizeVft = %d
\n
"
,
typeattr
->
cbSizeVft
);
ok
(
typeattr
->
cbAlignment
==
4
,
"cbAlignment = %d
\n
"
,
typeattr
->
cbAlignment
);
ok
(
typeattr
->
wTypeFlags
==
0
,
"wTypeFlags = %d
\n
"
,
typeattr
->
wTypeFlags
);
ok
(
typeattr
->
wMajorVerNum
==
0
,
"wMajorVerNum = %d
\n
"
,
typeattr
->
wMajorVerNum
);
ok
(
typeattr
->
wMinorVerNum
==
0
,
"wMinorVerNum = %d
\n
"
,
typeattr
->
wMinorVerNum
);
ITypeInfo_ReleaseTypeAttr
(
interface1
,
typeattr
);
hres
=
ITypeInfo_GetTypeAttr
(
interface2
,
&
typeattr
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
typeattr
->
cbSizeInstance
==
4
,
"cbSizeInstance = %d
\n
"
,
typeattr
->
cbSizeInstance
);
ok
(
typeattr
->
typekind
==
3
,
"typekind = %d
\n
"
,
typeattr
->
typekind
);
ok
(
typeattr
->
cFuncs
==
0
,
"cFuncs = %d
\n
"
,
typeattr
->
cFuncs
);
ok
(
typeattr
->
cVars
==
0
,
"cVars = %d
\n
"
,
typeattr
->
cVars
);
ok
(
typeattr
->
cImplTypes
==
1
,
"cImplTypes = %d
\n
"
,
typeattr
->
cImplTypes
);
ok
(
typeattr
->
cbSizeVft
==
56
,
"cbSizeVft = %d
\n
"
,
typeattr
->
cbSizeVft
);
ok
(
typeattr
->
cbAlignment
==
4
,
"cbAlignment = %d
\n
"
,
typeattr
->
cbAlignment
);
ok
(
typeattr
->
wTypeFlags
==
0
,
"wTypeFlags = %d
\n
"
,
typeattr
->
wTypeFlags
);
ok
(
typeattr
->
wMajorVerNum
==
0
,
"wMajorVerNum = %d
\n
"
,
typeattr
->
wMajorVerNum
);
ok
(
typeattr
->
wMinorVerNum
==
0
,
"wMinorVerNum = %d
\n
"
,
typeattr
->
wMinorVerNum
);
ITypeInfo_ReleaseTypeAttr
(
interface2
,
typeattr
);
hres
=
ICreateTypeLib2_SaveAllChanges
(
createtl
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ICreateTypeLib2_Release
(
createtl
);
...
...
dlls/oleaut32/typelib2.c
View file @
b6cf636c
...
...
@@ -2723,8 +2723,45 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeAttr(
ITypeInfo2
*
iface
,
TYPEATTR
**
ppTypeAttr
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
iface
,
ppTypeAttr
);
return
E_OUTOFMEMORY
;
ICreateTypeInfo2Impl
*
This
=
impl_from_ITypeInfo2
(
iface
);
HRESULT
hres
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppTypeAttr
);
if
(
!
ppTypeAttr
)
return
E_INVALIDARG
;
hres
=
ICreateTypeInfo_LayOut
((
ICreateTypeInfo
*
)
This
);
if
(
FAILED
(
hres
))
return
hres
;
*
ppTypeAttr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
TYPEATTR
));
if
(
!*
ppTypeAttr
)
return
E_OUTOFMEMORY
;
if
(
This
->
typeinfo
->
posguid
!=
-
1
)
{
MSFT_GuidEntry
*
guid
;
guid
=
(
MSFT_GuidEntry
*
)
&
This
->
typelib
->
typelib_segment_data
[
MSFT_SEG_GUID
][
This
->
typeinfo
->
posguid
];
(
*
ppTypeAttr
)
->
guid
=
guid
->
guid
;
}
(
*
ppTypeAttr
)
->
lcid
=
This
->
typelib
->
typelib_header
.
lcid
;
(
*
ppTypeAttr
)
->
cbSizeInstance
=
This
->
typeinfo
->
size
;
(
*
ppTypeAttr
)
->
typekind
=
This
->
typeinfo
->
typekind
&
0xf
;
(
*
ppTypeAttr
)
->
cFuncs
=
This
->
typeinfo
->
cElement
&
0xffff
;
(
*
ppTypeAttr
)
->
cVars
=
This
->
typeinfo
->
cElement
>>
16
;
(
*
ppTypeAttr
)
->
cImplTypes
=
This
->
typeinfo
->
cImplTypes
;
(
*
ppTypeAttr
)
->
cbSizeVft
=
This
->
typeinfo
->
cbSizeVft
;
(
*
ppTypeAttr
)
->
cbAlignment
=
(
This
->
typeinfo
->
typekind
>>
11
)
&
0x1f
;
(
*
ppTypeAttr
)
->
wTypeFlags
=
This
->
typeinfo
->
flags
;
(
*
ppTypeAttr
)
->
wMajorVerNum
=
This
->
typeinfo
->
version
&
0xffff
;
(
*
ppTypeAttr
)
->
wMinorVerNum
=
This
->
typeinfo
->
version
>>
16
;
if
((
*
ppTypeAttr
)
->
typekind
==
TKIND_ALIAS
)
FIXME
(
"TKIND_ALIAS handling not implemented
\n
"
);
return
S_OK
;
}
/******************************************************************************
...
...
@@ -3014,7 +3051,10 @@ static void WINAPI ITypeInfo2_fnReleaseTypeAttr(
ITypeInfo2
*
iface
,
TYPEATTR
*
pTypeAttr
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
iface
,
pTypeAttr
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pTypeAttr
);
if
(
pTypeAttr
)
HeapFree
(
GetProcessHeap
(),
0
,
pTypeAttr
);
}
/******************************************************************************
...
...
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