Commit 3a783061 authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard

mfplat: Allow deleting open files.

parent 26c4a1ed
......@@ -4407,7 +4407,7 @@ HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPENMODE open
{
DWORD capabilities = MFBYTESTREAM_IS_SEEKABLE | MFBYTESTREAM_DOES_NOT_USE_NETWORK;
DWORD filecreation_disposition = 0, fileaccessmode = 0, fileattributes = 0;
DWORD filesharemode = FILE_SHARE_READ;
DWORD filesharemode = FILE_SHARE_READ | FILE_SHARE_DELETE;
struct bytestream *object;
FILETIME writetime;
HANDLE file;
......
......@@ -2077,10 +2077,14 @@ static void test_file_stream(void)
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, pathW, &bytestream);
ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(DeleteFileW(filename), "failed to delete file\n");
IMFByteStream_Release(bytestream);
hr = MFShutdown();
ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
DeleteFileW(filename);
DeleteFileW(newfilename);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment