mfplat: Return S_OK from MFStartup stub.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2018-04-30 00:47:18 +00:00 committed by Alexandre Julliard
parent 0645fa1373
commit beb3094ca8
2 changed files with 12 additions and 2 deletions

View File

@ -404,8 +404,15 @@ HRESULT WINAPI MFTUnregister(CLSID clsid)
*/
HRESULT WINAPI MFStartup(ULONG version, DWORD flags)
{
#define MF_VERSION_XP MAKELONG( MF_API_VERSION, 1 )
#define MF_VERSION_WIN7 MAKELONG( MF_API_VERSION, 2 )
FIXME("(%u, %u): stub\n", version, flags);
return MF_E_BAD_STARTUP_VERSION;
if(version != MF_VERSION_XP && version != MF_VERSION_WIN7)
return MF_E_BAD_STARTUP_VERSION;
return S_OK;
}
/***********************************************************************

View File

@ -202,8 +202,11 @@ static void test_MFCreateMediaType(void)
HRESULT hr;
IMFMediaType *mediatype;
hr = MFStartup(MAKELONG( MF_API_VERSION, 0xdead ), MFSTARTUP_FULL);
ok(hr == MF_E_BAD_STARTUP_VERSION, "got 0x%08x\n", hr);
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08x\n", hr);
if(0)
{