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
454b1fca
Commit
454b1fca
authored
Jan 11, 2011
by
David Hedberg
Committed by
Alexandre Julliard
Jan 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Handle NULL arguments to ITypeComp::BindType.
parent
8c0a6943
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+36
-0
typelib.c
dlls/oleaut32/typelib.c
+3
-0
No files found.
dlls/oleaut32/tests/typelib.c
View file @
454b1fca
...
...
@@ -109,6 +109,7 @@ static void test_TypeComp(void)
BINDPTR
bindptr
;
ITypeInfo
*
pTypeInfo
;
ITypeInfo
*
pFontTypeInfo
;
ITypeComp
*
pTypeComp_tmp
;
static
WCHAR
wszStdFunctions
[]
=
{
'S'
,
't'
,
'd'
,
'F'
,
'u'
,
'n'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
static
WCHAR
wszSavePicture
[]
=
{
'S'
,
'a'
,
'v'
,
'e'
,
'P'
,
'i'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
0
};
static
WCHAR
wszOLE_TRISTATE
[]
=
{
'O'
,
'L'
,
'E'
,
'_'
,
'T'
,
'R'
,
'I'
,
'S'
,
'T'
,
'A'
,
'T'
,
'E'
,
0
};
...
...
@@ -255,6 +256,41 @@ static void test_TypeComp(void)
ok
(
!
pTypeInfo
,
"pTypeInfo should have been set to NULL
\n
"
);
ok
(
!
bindptr
.
lptcomp
,
"bindptr should have been set to NULL
\n
"
);
/* test basic BindType argument handling */
ulHash
=
LHashValOfNameSys
(
SYS_WIN32
,
LOCALE_NEUTRAL
,
wszGUID
);
hr
=
ITypeComp_BindType
(
pTypeComp
,
wszGUID
,
ulHash
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Got %08x
\n
"
,
hr
);
ulHash
=
LHashValOfNameSys
(
SYS_WIN32
,
LOCALE_NEUTRAL
,
wszGUID
);
pTypeInfo
=
(
void
*
)
0xdeadbeef
;
hr
=
ITypeComp_BindType
(
pTypeComp
,
wszGUID
,
ulHash
,
&
pTypeInfo
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Got %08x
\n
"
,
hr
);
ok
(
pTypeInfo
==
(
void
*
)
0xdeadbeef
,
"Got %p
\n
"
,
pTypeInfo
);
ulHash
=
LHashValOfNameSys
(
SYS_WIN32
,
LOCALE_NEUTRAL
,
wszGUID
);
pTypeComp_tmp
=
(
void
*
)
0xdeadbeef
;
hr
=
ITypeComp_BindType
(
pTypeComp
,
wszGUID
,
ulHash
,
NULL
,
&
pTypeComp_tmp
);
ok
(
hr
==
E_INVALIDARG
,
"Got %08x
\n
"
,
hr
);
ok
(
pTypeComp_tmp
==
(
void
*
)
0xdeadbeef
,
"Got %p
\n
"
,
pTypeComp_tmp
);
ulHash
=
LHashValOfNameSys
(
SYS_WIN32
,
LOCALE_NEUTRAL
,
wszGUID
);
pTypeComp_tmp
=
(
void
*
)
0xdeadbeef
;
pTypeInfo
=
(
void
*
)
0xdeadbeef
;
hr
=
ITypeComp_BindType
(
pTypeComp
,
NULL
,
ulHash
,
&
pTypeInfo
,
&
pTypeComp_tmp
);
ok
(
hr
==
E_INVALIDARG
,
"Got %08x
\n
"
,
hr
);
ok
(
pTypeInfo
==
(
void
*
)
0xdeadbeef
,
"Got %p
\n
"
,
pTypeInfo
);
ok
(
pTypeComp_tmp
==
(
void
*
)
0xdeadbeef
,
"Got %p
\n
"
,
pTypeComp_tmp
);
ulHash
=
LHashValOfNameSys
(
SYS_WIN32
,
LOCALE_NEUTRAL
,
wszGUID
);
pTypeComp_tmp
=
(
void
*
)
0xdeadbeef
;
pTypeInfo
=
(
void
*
)
0xdeadbeef
;
hr
=
ITypeComp_BindType
(
pTypeComp
,
wszGUID
,
ulHash
,
&
pTypeInfo
,
&
pTypeComp_tmp
);
ok_ole_success
(
hr
,
ITypeComp_BindType
);
ok
(
pTypeInfo
!=
NULL
,
"Got NULL pTypeInfo
\n
"
);
todo_wine
ok
(
pTypeComp_tmp
==
NULL
,
"Got pTypeComp_tmp %p
\n
"
,
pTypeComp_tmp
);
ITypeInfo_Release
(
pTypeInfo
);
if
(
pTypeComp_tmp
)
ITypeComp_Release
(
pTypeComp_tmp
);
/* fixme */
ITypeComp_Release
(
pTypeComp
);
/* tests for ITypeComp on an interface */
...
...
dlls/oleaut32/typelib.c
View file @
454b1fca
...
...
@@ -4908,6 +4908,9 @@ static HRESULT WINAPI ITypeLibComp_fnBindType(
TRACE
(
"(%s, %x, %p, %p)
\n
"
,
debugstr_w
(
szName
),
lHash
,
ppTInfo
,
ppTComp
);
if
(
!
szName
||
!
ppTInfo
||
!
ppTComp
)
return
E_INVALIDARG
;
for
(
pTypeInfo
=
This
->
pTypeInfo
;
pTypeInfo
;
pTypeInfo
=
pTypeInfo
->
next
)
{
/* FIXME: should use lHash to do the search */
...
...
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