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
571b7a5a
Commit
571b7a5a
authored
Jan 24, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Jan 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix a crash in VB6.
parent
edf050cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
olefont.c
dlls/oleaut32/olefont.c
+3
-0
olefont.c
dlls/oleaut32/tests/olefont.c
+40
-0
No files found.
dlls/oleaut32/olefont.c
View file @
571b7a5a
...
...
@@ -463,6 +463,9 @@ static HRESULT WINAPI OLEFontImpl_put_Name(
OLEFontImpl
*
this
=
(
OLEFontImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
this
,
name
);
if
(
!
name
)
return
CTL_E_INVALIDPROPERTYVALUE
;
if
(
this
->
description
.
lpstrName
==
0
)
{
this
->
description
.
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
...
...
dlls/oleaut32/tests/olefont.c
View file @
571b7a5a
...
...
@@ -795,6 +795,45 @@ static void test_AddRefHfont(void)
IFont_Release
(
ifnt3
);
}
static
void
test_returns
(
void
)
{
IFont
*
pFont
;
FONTDESC
fontdesc
;
HRESULT
hr
;
fontdesc
.
cbSizeofstruct
=
sizeof
(
fontdesc
);
fontdesc
.
lpstrName
=
MSSansSerif_font
;
fontdesc
.
cySize
.
int64
=
12
*
10000
;
/* 12 pt */
fontdesc
.
sWeight
=
FW_NORMAL
;
fontdesc
.
sCharset
=
0
;
fontdesc
.
fItalic
=
FALSE
;
fontdesc
.
fUnderline
=
FALSE
;
fontdesc
.
fStrikethrough
=
FALSE
;
hr
=
pOleCreateFontIndirect
(
&
fontdesc
,
&
IID_IFont
,
(
void
**
)
&
pFont
);
ok_ole_success
(
hr
,
"OleCreateFontIndirect"
);
hr
=
IFont_put_Name
(
pFont
,
NULL
);
ok
(
hr
==
CTL_E_INVALIDPROPERTYVALUE
,
"IFont::put_Name: Expected CTL_E_INVALIDPROPERTYVALUE got 0x%08x
\n
"
,
hr
);
hr
=
IFont_get_Name
(
pFont
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IFont::get_Name: Expected E_POINTER got 0x%08x
\n
"
,
hr
);
hr
=
IFont_get_Size
(
pFont
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IFont::get_Size: Expected E_POINTER got 0x%08x
\n
"
,
hr
);
hr
=
IFont_get_Bold
(
pFont
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IFont::get_Bold: Expected E_POINTER got 0x%08x
\n
"
,
hr
);
}
START_TEST
(
olefont
)
{
hOleaut32
=
GetModuleHandleA
(
"oleaut32.dll"
);
...
...
@@ -827,4 +866,5 @@ START_TEST(olefont)
test_IsEqual
();
test_ReleaseHfont
();
test_AddRefHfont
();
test_returns
();
}
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