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
5ca20cd4
Commit
5ca20cd4
authored
Nov 13, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Fix a couple of global stream test failures on Win9x.
parent
1dba41b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
hglobalstream.c
dlls/ole32/tests/hglobalstream.c
+10
-6
No files found.
dlls/ole32/tests/hglobalstream.c
View file @
5ca20cd4
...
...
@@ -92,7 +92,8 @@ static void test_streamonhglobal(IStream *pStream)
ull
.
u
.
HighPart
=
-
1
;
ull
.
u
.
LowPart
=
-
1
;
hr
=
IStream_SetSize
(
pStream
,
ull
);
ok
(
hr
==
E_OUTOFMEMORY
,
"IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_OUTOFMEMORY
||
broken
(
hr
==
S_OK
),
/* win9x */
"IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x
\n
"
,
hr
);
}
static
HRESULT
WINAPI
TestStream_QueryInterface
(
IStream
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -261,18 +262,19 @@ static void test_copyto(void)
static
void
test_freed_hglobal
(
void
)
{
static
const
char
teststring
[]
=
"this is a test string"
;
HRESULT
hr
;
IStream
*
pStream
;
HGLOBAL
hglobal
;
char
*
p
;
char
buffer
[
10
];
char
buffer
[
sizeof
(
teststring
)
+
8
];
ULARGE_INTEGER
ull
;
ULONG
read
,
written
;
hglobal
=
GlobalAlloc
(
GMEM_DDESHARE
|
GMEM_NODISCARD
|
GMEM_MOVEABLE
,
strlen
(
"Rob"
)
+
1
);
hglobal
=
GlobalAlloc
(
GMEM_DDESHARE
|
GMEM_NODISCARD
|
GMEM_MOVEABLE
,
strlen
(
teststring
)
+
1
);
ok
(
hglobal
!=
NULL
,
"GlobalAlloc failed with error %d
\n
"
,
GetLastError
());
p
=
GlobalLock
(
hglobal
);
strcpy
(
p
,
"Rob"
);
strcpy
(
p
,
teststring
);
GlobalUnlock
(
hglobal
);
hr
=
CreateStreamOnHGlobal
(
hglobal
,
FALSE
,
&
pStream
);
...
...
@@ -280,8 +282,10 @@ static void test_freed_hglobal(void)
hr
=
IStream_Read
(
pStream
,
buffer
,
sizeof
(
buffer
),
&
read
);
ok_ole_success
(
hr
,
"IStream_Read"
);
ok
(
!
strcmp
(
buffer
,
"Rob"
),
"buffer data %s differs
\n
"
,
buffer
);
ok
(
read
==
strlen
(
"Rob"
)
+
1
,
"read should be 4 instead of %d
\n
"
,
read
);
ok
(
!
strcmp
(
buffer
,
teststring
),
"buffer data %s differs
\n
"
,
buffer
);
ok
(
read
==
sizeof
(
teststring
)
||
broken
(
read
==
((
sizeof
(
teststring
)
+
3
)
&
~
3
)),
/* win9x rounds the size */
"read should be sizeof(teststring) instead of %d
\n
"
,
read
);
GlobalFree
(
hglobal
);
...
...
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