From: chenjiangyi chenjiangyi@uniontech.com
Signed-off-by: chenjiangyi chenjiangyi@uniontech.com --- dlls/ole32/storage32.c | 2 +- dlls/ole32/tests/storage32.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 72dfbe85bd8..d3f4760cfe1 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2895,7 +2895,7 @@ static HRESULT StorageImpl_LoadFileHeader( offset.LowPart = 0; hr = StorageImpl_ReadAt(This, offset, headerBigBlock, HEADER_SIZE, &bytes_read); if (SUCCEEDED(hr) && bytes_read != HEADER_SIZE) - hr = STG_E_FILENOTFOUND; + hr = STG_E_FILEALREADYEXISTS;
/* * Extract the information from the header. diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index e40d32da394..1780203fe12 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -3877,7 +3877,7 @@ static void test_custom_lockbytes(void) CreateTestLockBytes(&lockbytes);
hr = StgOpenStorageOnILockBytes(&lockbytes->ILockBytes_iface, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - todo_wine ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on empty lockbytes failed: %lx\n", hr); + ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on empty lockbytes failed: %lx\n", hr);
if (stg) IStorage_Release(stg); @@ -3887,7 +3887,7 @@ static void test_custom_lockbytes(void) CreateTestLockBytes(&lockbytes);
hr = StgOpenStorageOnILockBytes(&lockbytes->ILockBytes_iface, NULL, STGM_READWRITE | STGM_SHARE_DENY_WRITE | STGM_TRANSACTED, NULL, 0, &stg); - todo_wine ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on empty lockbytes with different mode failed: %lx\n", hr); + ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on empty lockbytes with different mode failed: %lx\n", hr);
if (stg) IStorage_Release(stg); @@ -3900,7 +3900,7 @@ static void test_custom_lockbytes(void) ok(hr == S_OK, "ILockBytes_WriteAt failed: %lx\n", hr);
hr = StgOpenStorageOnILockBytes(&lockbytes->ILockBytes_iface, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - todo_wine ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on invalid lockbytes failed: %lx\n", hr); + ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on invalid lockbytes failed: %lx\n", hr);
if (stg) IStorage_Release(stg); @@ -3913,7 +3913,7 @@ static void test_custom_lockbytes(void) ok(hr == S_OK, "ILockBytes_WriteAt failed: %lx\n", hr);
hr = StgOpenStorageOnILockBytes(&lockbytes->ILockBytes_iface, NULL, STGM_READWRITE | STGM_SHARE_DENY_WRITE | STGM_TRANSACTED, NULL, 0, &stg); - todo_wine ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on invalid lockbytes with different mode failed: %lx\n", hr); + ok(hr == STG_E_FILEALREADYEXISTS, "StgOpenStorageOnILockBytes on invalid lockbytes with different mode failed: %lx\n", hr);
if (stg) IStorage_Release(stg);