From: Vijay Kiran Kamuju Subject: [PATCH] wmvcore: Add semi-stub implementation for WMIsContentProtected Message-Id: Date: Sun, 1 Mar 2020 10:51:18 +0100 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48683 Signed-off-by: Vijay Kiran Kamuju From ac121100fd63925343329cc7b0f0a1da8afa6238 Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju Date: Sat, 29 Feb 2020 21:55:59 +0100 Subject: [PATCH] wmvcore: Add semi-stub implementation for WMIsContentProtected Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48683 Signed-off-by: Vijay Kiran Kamuju --- dlls/wmvcore/tests/wmvcore.c | 18 ++++++++++++++++++ dlls/wmvcore/wmvcore.spec | 2 +- dlls/wmvcore/wmvcore_main.c | 12 ++++++++++++ include/wmsdkidl.idl | 1 + 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 8af34e22b6..2b5a4555a3 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -338,6 +338,23 @@ static void test_urlextension(void) todo_wine ok(hr == S_OK, "WMCheckURLExtension failed 0x%08x\n", hr); } +static void test_iscontentprotected(void) +{ + HRESULT hr; + const WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0}; + BOOL drm; + + hr = WMIsContentProtected(NULL, NULL); + ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08x\n", hr); + hr = WMIsContentProtected(NULL, &drm); + ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08x\n", hr); + hr = WMIsContentProtected(mp3file, NULL); + ok(hr == E_INVALIDARG, "WMIsContentProtected failed 0x%08x\n", hr); + hr = WMIsContentProtected(mp3file, &drm); + ok(hr == S_FALSE, "WMIsContentProtected failed 0x%08x\n", hr); + ok(drm == FALSE, "got %0dx\n", drm); +} + START_TEST(wmvcore) { HRESULT hr; @@ -353,6 +370,7 @@ START_TEST(wmvcore) test_profile_manager_interfaces(); test_WMCreateWriterPriv(); test_urlextension(); + test_iscontentprotected(); CoUninitialize(); } diff --git a/dlls/wmvcore/wmvcore.spec b/dlls/wmvcore/wmvcore.spec index 65e0807b61..8c3e62bbb1 100644 --- a/dlls/wmvcore/wmvcore.spec +++ b/dlls/wmvcore/wmvcore.spec @@ -17,4 +17,4 @@ @ stub WMCreateWriterNetworkSink @ stdcall WMCreateWriterPriv(ptr) @ stub WMCreateWriterPushSink -@ stub WMIsContentProtected +@ stdcall WMIsContentProtected(wstr ptr) diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c index af23ab88b8..4dafcf8055 100644 --- a/dlls/wmvcore/wmvcore_main.c +++ b/dlls/wmvcore/wmvcore_main.c @@ -86,6 +86,18 @@ HRESULT WINAPI WMCreateBackupRestorer(IUnknown *callback, IWMLicenseBackup **lic return E_NOTIMPL; } +HRESULT WINAPI WMIsContentProtected(const WCHAR *filename, BOOL *protected) +{ + FIXME("(%s %p): semi-stub\n", wine_dbgstr_w(filename), protected); + + if (!filename || !protected) + return E_INVALIDARG; + + *protected = FALSE; + + return S_FALSE; +} + typedef struct { IWMProfileManager2 IWMProfileManager2_iface; LONG ref; diff --git a/include/wmsdkidl.idl b/include/wmsdkidl.idl index 4ee166a9d4..d1e0445470 100644 --- a/include/wmsdkidl.idl +++ b/include/wmsdkidl.idl @@ -1896,6 +1896,7 @@ cpp_quote("HRESULT WINAPI WMCreateSyncReader(IUnknown*,DWORD,IWMSyncReader**);") cpp_quote("HRESULT WINAPI WMCreateEditor(IWMMetadataEditor**);") cpp_quote("HRESULT WINAPI WMCreateBackupRestorer(IUnknown*,IWMLicenseBackup**);") cpp_quote("HRESULT WINAPI WMCreateProfileManager(IWMProfileManager**);") +cpp_quote("HRESULT WINAPI WMIsContentProtected(const WCHAR*, BOOL*);") cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_Base, 0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);") -- 2.25.1