On 10/29/2018 11:11 PM, Sven Baars wrote:
- 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);
- hr = IUnknown_QueryInterface(bytestream, &IID_IMFAttributes,
(void **)&attributes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok((void *)attributes != (void *)bytestream, "got %p\n", bytestream);
- hr = IUnknown_QueryInterface(bytestream, &IID_IMFByteStream,
(void **)&bytestream2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bytestream == bytestream2, "got %p\n", bytestream2);
This does not really show anything unexpected. Both conditions won't ever fail. If you're going to test QueryInterface behavior, interesting case is to query for IUnknown from IMFAttributes and main interface and see if that returns same pointer.