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
5ea0d9d8
Commit
5ea0d9d8
authored
Aug 18, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Storage sharing should be implemented in ole32, not the lower-level file API.
parent
0e6bfb3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
182 additions
and
169 deletions
+182
-169
package.c
dlls/msi/tests/package.c
+61
-84
storage32.c
dlls/ole32/storage32.c
+4
-1
storage32.c
dlls/ole32/tests/storage32.c
+117
-84
No files found.
dlls/msi/tests/package.c
View file @
5ea0d9d8
...
@@ -6362,70 +6362,69 @@ struct access_res
...
@@ -6362,70 +6362,69 @@ struct access_res
{
{
BOOL
gothandle
;
BOOL
gothandle
;
DWORD
lasterr
;
DWORD
lasterr
;
BOOL
todo
;
};
};
struct
access_res
create
[
16
]
=
st
atic
const
st
ruct
access_res
create
[
16
]
=
{
{
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
}
{
TRUE
,
ERROR_SUCCESS
}
};
};
struct
access_res
create_commit
[
16
]
=
st
atic
const
st
ruct
access_res
create_commit
[
16
]
=
{
{
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
}
{
TRUE
,
ERROR_SUCCESS
}
};
};
struct
access_res
create_close
[
16
]
=
st
atic
const
st
ruct
access_res
create_close
[
16
]
=
{
{
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
}
{
TRUE
,
ERROR_SUCCESS
}
};
};
static
void
_test_file_access
(
LPCSTR
file
,
struct
access_res
*
ares
,
DWORD
line
)
static
void
_test_file_access
(
LPCSTR
file
,
const
struct
access_res
*
ares
,
DWORD
line
)
{
{
DWORD
access
=
0
,
share
=
0
;
DWORD
access
=
0
,
share
=
0
;
DWORD
lasterr
;
DWORD
lasterr
;
...
@@ -6450,37 +6449,15 @@ static void _test_file_access(LPCSTR file, struct access_res *ares, DWORD line)
...
@@ -6450,37 +6449,15 @@ static void _test_file_access(LPCSTR file, struct access_res *ares, DWORD line)
hfile
=
CreateFileA
(
file
,
access
,
share
,
NULL
,
OPEN_EXISTING
,
hfile
=
CreateFileA
(
file
,
access
,
share
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
);
FILE_ATTRIBUTE_NORMAL
,
0
);
lasterr
=
GetLastError
();
lasterr
=
GetLastError
();
if
(
ares
[
idx
].
todo
)
{
ok
((
hfile
!=
INVALID_HANDLE_VALUE
)
==
ares
[
idx
].
gothandle
,
todo_wine
"(%d, handle, %d): Expected %d, got %d
\n
"
,
{
line
,
idx
,
ares
[
idx
].
gothandle
,
ok
((
hfile
!=
INVALID_HANDLE_VALUE
)
==
ares
[
idx
].
gothandle
,
(
hfile
!=
INVALID_HANDLE_VALUE
));
"(%d, handle, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
gothandle
,
ok
(
lasterr
==
ares
[
idx
].
lasterr
,
(
hfile
!=
INVALID_HANDLE_VALUE
));
"(%d, lasterr, %d): Expected %d, got %d
\n
"
,
}
line
,
idx
,
ares
[
idx
].
lasterr
,
lasterr
);
}
else
ok
((
hfile
!=
INVALID_HANDLE_VALUE
)
==
ares
[
idx
].
gothandle
,
"(%d, handle, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
gothandle
,
(
hfile
!=
INVALID_HANDLE_VALUE
));
if
(
ares
[
idx
].
todo
)
{
todo_wine
{
ok
(
lasterr
==
ares
[
idx
].
lasterr
,
"(%d, lasterr, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
lasterr
,
lasterr
);
}
}
else
{
ok
(
lasterr
==
ares
[
idx
].
lasterr
,
"(%d, lasterr, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
lasterr
,
lasterr
);
}
CloseHandle
(
hfile
);
CloseHandle
(
hfile
);
idx
++
;
idx
++
;
...
...
dlls/ole32/storage32.c
View file @
5ea0d9d8
...
@@ -5727,7 +5727,7 @@ HRESULT WINAPI StgCreateDocfile(
...
@@ -5727,7 +5727,7 @@ HRESULT WINAPI StgCreateDocfile(
/*
/*
* Interpret the STGM value grfMode
* Interpret the STGM value grfMode
*/
*/
shareMode
=
GetShareModeFromSTGM
(
grfMode
)
;
shareMode
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
accessMode
=
GetAccessModeFromSTGM
(
grfMode
);
accessMode
=
GetAccessModeFromSTGM
(
grfMode
);
if
(
grfMode
&
STGM_DELETEONRELEASE
)
if
(
grfMode
&
STGM_DELETEONRELEASE
)
...
@@ -5735,6 +5735,9 @@ HRESULT WINAPI StgCreateDocfile(
...
@@ -5735,6 +5735,9 @@ HRESULT WINAPI StgCreateDocfile(
else
else
fileAttributes
=
FILE_ATTRIBUTE_NORMAL
|
FILE_FLAG_RANDOM_ACCESS
;
fileAttributes
=
FILE_ATTRIBUTE_NORMAL
|
FILE_FLAG_RANDOM_ACCESS
;
if
(
STGM_SHARE_MODE
(
grfMode
)
&&
!
(
grfMode
&
STGM_SHARE_DENY_NONE
))
FIXME
(
"Storage share mode not implemented.
\n
"
);
if
(
grfMode
&
STGM_TRANSACTED
)
if
(
grfMode
&
STGM_TRANSACTED
)
FIXME
(
"Transacted mode not implemented.
\n
"
);
FIXME
(
"Transacted mode not implemented.
\n
"
);
...
...
dlls/ole32/tests/storage32.c
View file @
5ea0d9d8
...
@@ -1003,70 +1003,69 @@ struct access_res
...
@@ -1003,70 +1003,69 @@ struct access_res
{
{
BOOL
gothandle
;
BOOL
gothandle
;
DWORD
lasterr
;
DWORD
lasterr
;
BOOL
todo
;
};
};
struct
access_res
create
[
16
]
=
st
atic
const
st
ruct
access_res
create
[
16
]
=
{
{
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
}
{
TRUE
,
ERROR_SUCCESS
}
};
};
struct
access_res
create_commit
[
16
]
=
st
atic
const
st
ruct
access_res
create_commit
[
16
]
=
{
{
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
},
{
TRUE
,
ERROR_SUCCESS
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
FALSE
,
ERROR_SHARING_VIOLATION
,
FALSE
},
{
FALSE
,
ERROR_SHARING_VIOLATION
},
{
TRUE
,
ERROR_SUCCESS
,
TRUE
}
{
TRUE
,
ERROR_SUCCESS
}
};
};
struct
access_res
create_close
[
16
]
=
st
atic
const
st
ruct
access_res
create_close
[
16
]
=
{
{
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
TRUE
,
ERROR_SUCCESS
},
{
TRUE
,
ERROR_SUCCESS
,
FALSE
}
{
TRUE
,
ERROR_SUCCESS
}
};
};
static
void
_test_file_access
(
LPCSTR
file
,
struct
access_res
*
ares
,
DWORD
line
)
static
void
_test_file_access
(
LPCSTR
file
,
const
struct
access_res
*
ares
,
DWORD
line
)
{
{
DWORD
access
=
0
,
share
=
0
;
DWORD
access
=
0
,
share
=
0
;
DWORD
lasterr
;
DWORD
lasterr
;
...
@@ -1091,37 +1090,15 @@ static void _test_file_access(LPCSTR file, struct access_res *ares, DWORD line)
...
@@ -1091,37 +1090,15 @@ static void _test_file_access(LPCSTR file, struct access_res *ares, DWORD line)
hfile
=
CreateFileA
(
file
,
access
,
share
,
NULL
,
OPEN_EXISTING
,
hfile
=
CreateFileA
(
file
,
access
,
share
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
);
FILE_ATTRIBUTE_NORMAL
,
0
);
lasterr
=
GetLastError
();
lasterr
=
GetLastError
();
if
(
ares
[
idx
].
todo
)
{
ok
((
hfile
!=
INVALID_HANDLE_VALUE
)
==
ares
[
idx
].
gothandle
,
todo_wine
"(%d, handle, %d): Expected %d, got %d
\n
"
,
{
line
,
idx
,
ares
[
idx
].
gothandle
,
ok
((
hfile
!=
INVALID_HANDLE_VALUE
)
==
ares
[
idx
].
gothandle
,
(
hfile
!=
INVALID_HANDLE_VALUE
));
"(%d, handle, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
gothandle
,
ok
(
lasterr
==
ares
[
idx
].
lasterr
,
(
hfile
!=
INVALID_HANDLE_VALUE
));
"(%d, lasterr, %d): Expected %d, got %d
\n
"
,
}
line
,
idx
,
ares
[
idx
].
lasterr
,
lasterr
);
}
else
ok
((
hfile
!=
INVALID_HANDLE_VALUE
)
==
ares
[
idx
].
gothandle
,
"(%d, handle, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
gothandle
,
(
hfile
!=
INVALID_HANDLE_VALUE
));
if
(
ares
[
idx
].
todo
)
{
todo_wine
{
ok
(
lasterr
==
ares
[
idx
].
lasterr
,
"(%d, lasterr, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
lasterr
,
lasterr
);
}
}
else
{
ok
(
lasterr
==
ares
[
idx
].
lasterr
,
"(%d, lasterr, %d): Expected %d, got %d
\n
"
,
line
,
idx
,
ares
[
idx
].
lasterr
,
lasterr
);
}
CloseHandle
(
hfile
);
CloseHandle
(
hfile
);
idx
++
;
idx
++
;
...
@@ -1176,6 +1153,62 @@ static void test_access(void)
...
@@ -1176,6 +1153,62 @@ static void test_access(void)
DeleteFileA
(
"winetest"
);
DeleteFileA
(
"winetest"
);
/* STGM_SHARE_DENY_NONE */
hr
=
StgCreateDocfile
(
fileW
,
STGM_CREATE
|
STGM_READWRITE
|
STGM_SHARE_DENY_NONE
|
STGM_TRANSACTED
,
0
,
&
stg
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create
);
hr
=
IStorage_Commit
(
stg
,
STGC_DEFAULT
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create_commit
);
IStorage_Release
(
stg
);
test_file_access
(
"winetest"
,
create_close
);
DeleteFileA
(
"winetest"
);
/* STGM_SHARE_DENY_READ */
hr
=
StgCreateDocfile
(
fileW
,
STGM_CREATE
|
STGM_READWRITE
|
STGM_SHARE_DENY_READ
|
STGM_TRANSACTED
,
0
,
&
stg
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create
);
hr
=
IStorage_Commit
(
stg
,
STGC_DEFAULT
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create_commit
);
IStorage_Release
(
stg
);
test_file_access
(
"winetest"
,
create_close
);
DeleteFileA
(
"winetest"
);
/* STGM_SHARE_DENY_WRITE */
hr
=
StgCreateDocfile
(
fileW
,
STGM_CREATE
|
STGM_READWRITE
|
STGM_SHARE_DENY_WRITE
|
STGM_TRANSACTED
,
0
,
&
stg
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create
);
hr
=
IStorage_Commit
(
stg
,
STGC_DEFAULT
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create_commit
);
IStorage_Release
(
stg
);
test_file_access
(
"winetest"
,
create_close
);
DeleteFileA
(
"winetest"
);
}
}
START_TEST
(
storage32
)
START_TEST
(
storage32
)
...
...
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