ole32: Fix a few file access discrepancies between platforms.
This commit is contained in:
parent
7518781904
commit
6f7c2b94d4
|
@ -1003,65 +1003,66 @@ struct access_res
|
||||||
{
|
{
|
||||||
BOOL gothandle;
|
BOOL gothandle;
|
||||||
DWORD lasterr;
|
DWORD lasterr;
|
||||||
|
BOOL ignore;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct access_res create[16] =
|
static const struct access_res create[16] =
|
||||||
{
|
{
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, TRUE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, TRUE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, TRUE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS }
|
{ TRUE, ERROR_SUCCESS, TRUE }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct access_res create_commit[16] =
|
static const struct access_res create_commit[16] =
|
||||||
{
|
{
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, TRUE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, TRUE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS },
|
{ TRUE, ERROR_SUCCESS, TRUE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ FALSE, ERROR_SHARING_VIOLATION },
|
{ FALSE, ERROR_SHARING_VIOLATION, FALSE },
|
||||||
{ TRUE, ERROR_SUCCESS }
|
{ TRUE, ERROR_SUCCESS, TRUE }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct access_res create_close[16] =
|
static const struct access_res create_close[16] =
|
||||||
{
|
{
|
||||||
{ 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 }
|
{ TRUE, ERROR_SUCCESS }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1081,6 +1082,9 @@ static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD
|
||||||
|
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
|
if (ares[idx].ignore)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (j == 0) share = 0;
|
if (j == 0) share = 0;
|
||||||
if (j == 1) share = FILE_SHARE_READ;
|
if (j == 1) share = FILE_SHARE_READ;
|
||||||
if (j == 2) share = FILE_SHARE_WRITE;
|
if (j == 2) share = FILE_SHARE_WRITE;
|
||||||
|
|
Loading…
Reference in New Issue