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
ddc5cbb3
Commit
ddc5cbb3
authored
Nov 09, 2010
by
Andrew Bogott
Committed by
Alexandre Julliard
Nov 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Added a couple of simple tests for StgCreateStorageEx.
parent
42cd791c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
storage32.c
dlls/ole32/tests/storage32.c
+54
-0
No files found.
dlls/ole32/tests/storage32.c
View file @
ddc5cbb3
...
...
@@ -241,6 +241,59 @@ static void test_create_storage_modes(void)
ok
(
DeleteFileA
(
filenameA
),
"failed to delete file
\n
"
);
}
static
void
test_stgcreatestorageex
(
void
)
{
HRESULT
(
WINAPI
*
pStgCreateStorageEx
)(
const
WCHAR
*
pwcsName
,
DWORD
grfMode
,
DWORD
stgfmt
,
DWORD
grfAttrs
,
STGOPTIONS
*
pStgOptions
,
void
*
reserved
,
REFIID
riid
,
void
**
ppObjectOpen
);
HMODULE
hOle32
=
GetModuleHandle
(
"ole32"
);
IStorage
*
stg
=
NULL
;
STGOPTIONS
stgoptions
=
{
1
,
0
,
4096
};
HRESULT
r
;
pStgCreateStorageEx
=
(
void
*
)
GetProcAddress
(
hOle32
,
"StgCreateStorageEx"
);
if
(
!
pStgCreateStorageEx
)
{
win_skip
(
"skipping test on NT4
\n
"
);
return
;
}
DeleteFileA
(
filenameA
);
/* Verify that StgCreateStorageEx can accept an options param */
r
=
pStgCreateStorageEx
(
filename
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
STGFMT_DOCFILE
,
0
,
&
stgoptions
,
NULL
,
&
IID_IStorage
,
(
void
**
)
&
stg
);
ok
(
r
==
S_OK
||
r
==
STG_E_UNIMPLEMENTEDFUNCTION
,
"StgCreateStorageEx with options failed
\n
"
);
if
(
r
==
STG_E_UNIMPLEMENTEDFUNCTION
)
{
/* We're on win98 which means all bets are off. Let's get out of here. */
win_skip
(
"skipping test on win9x
\n
"
);
return
;
}
r
=
IStorage_Release
(
stg
);
ok
(
r
==
0
,
"storage not released
\n
"
);
ok
(
DeleteFileA
(
filenameA
),
"failed to delete file
\n
"
);
/* Verify that StgCreateStorageEx can accept a NULL pStgOptions */
r
=
pStgCreateStorageEx
(
filename
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
STGFMT_STORAGE
,
0
,
NULL
,
NULL
,
&
IID_IStorage
,
(
void
**
)
&
stg
);
ok
(
r
==
S_OK
,
"StgCreateStorageEx with NULL options failed
\n
"
);
r
=
IStorage_Release
(
stg
);
ok
(
r
==
0
,
"storage not released
\n
"
);
ok
(
DeleteFileA
(
filenameA
),
"failed to delete file
\n
"
);
}
static
void
test_storage_stream
(
void
)
{
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
...
...
@@ -2896,6 +2949,7 @@ START_TEST(storage32)
test_hglobal_storage_stat
();
test_create_storage_modes
();
test_stgcreatestorageex
();
test_storage_stream
();
test_open_storage
();
test_storage_suminfo
();
...
...
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