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
1f2590be
Commit
1f2590be
authored
Feb 17, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Return TYPE_E_NAMECONFLICT in ICreateTypeLib2::CreateTypeInfo.
parent
2c911147
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+10
-0
typelib2.c
dlls/oleaut32/typelib2.c
+5
-0
No files found.
dlls/oleaut32/tests/typelib.c
View file @
1f2590be
...
...
@@ -969,9 +969,12 @@ if(use_midl_tlb) {
}
static
void
test_CreateTypeLib
(
void
)
{
static
OLECHAR
interface1W
[]
=
{
'i'
,
'n'
,
't'
,
'e'
,
'r'
,
'f'
,
'a'
,
'c'
,
'e'
,
'1'
,
0
};
char
filename
[
MAX_PATH
];
WCHAR
filenameW
[
MAX_PATH
];
ICreateTypeLib2
*
createtl
;
ICreateTypeInfo
*
createti
;
ITypeLib
*
tl
;
HRESULT
hres
;
...
...
@@ -983,6 +986,13 @@ static void test_CreateTypeLib(void) {
hres
=
CreateTypeLib2
(
SYS_WIN32
,
filenameW
,
&
createtl
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
interface1W
,
TKIND_INTERFACE
,
&
createti
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ICreateTypeInfo_Release
(
createti
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
interface1W
,
TKIND_INTERFACE
,
&
createti
);
ok
(
hres
==
TYPE_E_NAMECONFLICT
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeLib2_SaveAllChanges
(
createtl
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ICreateTypeLib2_Release
(
createtl
);
...
...
dlls/oleaut32/typelib2.c
View file @
1f2590be
...
...
@@ -3073,9 +3073,14 @@ static HRESULT WINAPI ICreateTypeLib2_fnCreateTypeInfo(
ICreateTypeInfo
**
ppCTInfo
)
{
ICreateTypeLib2Impl
*
This
=
(
ICreateTypeLib2Impl
*
)
iface
;
char
*
name
;
TRACE
(
"(%p,%s,%d,%p)
\n
"
,
iface
,
debugstr_w
(
szName
),
tkind
,
ppCTInfo
);
ctl2_encode_name
(
This
,
szName
,
&
name
);
if
(
ctl2_find_name
(
This
,
name
)
!=
-
1
)
return
TYPE_E_NAMECONFLICT
;
*
ppCTInfo
=
(
ICreateTypeInfo
*
)
ICreateTypeInfo2_Constructor
(
This
,
szName
,
tkind
);
if
(
!*
ppCTInfo
)
return
E_OUTOFMEMORY
;
...
...
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