[PATCH v4 01/11] msscript.ocx: Implement IScriptModuleCollection::get_Count.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Jun 15 08:00:04 CDT 2020
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/msscript.ocx/msscript.c | 7 +++++--
dlls/msscript.ocx/tests/msscript.c | 12 ++++++------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c
index e397044..8fb127e 100644
--- a/dlls/msscript.ocx/msscript.c
+++ b/dlls/msscript.ocx/msscript.c
@@ -893,9 +893,12 @@ static HRESULT WINAPI ScriptModuleCollection_get_Count(IScriptModuleCollection *
{
ScriptControl *This = impl_from_IScriptModuleCollection(iface);
- FIXME("(%p)->(%p)\n", This, plCount);
+ TRACE("(%p)->(%p)\n", This, plCount);
- return E_NOTIMPL;
+ if (!plCount) return E_POINTER;
+
+ *plCount = This->module_count;
+ return S_OK;
}
static HRESULT WINAPI ScriptModuleCollection_Add(IScriptModuleCollection *iface, BSTR name,
diff --git a/dlls/msscript.ocx/tests/msscript.c b/dlls/msscript.ocx/tests/msscript.c
index 6a07303..fbbe831 100644
--- a/dlls/msscript.ocx/tests/msscript.c
+++ b/dlls/msscript.ocx/tests/msscript.c
@@ -2331,11 +2331,11 @@ static void test_IScriptControl_get_Modules(void)
ok(hr == S_OK, "IScriptControl_get_Modules failed: 0x%08x.\n", hr);
hr = IScriptModuleCollection_get_Count(mods, NULL);
- todo_wine ok(hr == E_POINTER, "IScriptModuleCollection_get_Count returned: 0x%08x.\n", hr);
+ ok(hr == E_POINTER, "IScriptModuleCollection_get_Count returned: 0x%08x.\n", hr);
count = 0;
hr = IScriptModuleCollection_get_Count(mods, &count);
- todo_wine ok(hr == S_OK, "IScriptModuleCollection_get_Count failed: 0x%08x.\n", hr);
- todo_wine ok(count == 1, "count is not 1, got %d.\n", count);
+ ok(hr == S_OK, "IScriptModuleCollection_get_Count failed: 0x%08x.\n", hr);
+ ok(count == 1, "count is not 1, got %d.\n", count);
V_VT(&var) = VT_I4;
V_I4(&var) = -1;
@@ -2372,7 +2372,7 @@ static void test_IScriptControl_get_Modules(void)
SysFreeString(str);
hr = IScriptModuleCollection_get_Count(mods, &count);
- todo_wine ok(hr == S_OK, "IScriptModuleCollection_get_Count failed: 0x%08x.\n", hr);
+ ok(hr == S_OK, "IScriptModuleCollection_get_Count failed: 0x%08x.\n", hr);
todo_wine ok(count == 3, "count is not 3, got %d.\n", count);
V_VT(&var) = VT_I4;
V_I4(&var) = count + 1;
@@ -2411,8 +2411,8 @@ static void test_IScriptControl_get_Modules(void)
SysFreeString(str);
hr = IScriptModuleCollection_get_Count(mods, &count);
- todo_wine ok(hr == S_OK, "IScriptModuleCollection_get_Count failed: 0x%08x.\n", hr);
- todo_wine ok(count == 1, "count is not 1, got %d.\n", count);
+ ok(hr == S_OK, "IScriptModuleCollection_get_Count failed: 0x%08x.\n", hr);
+ ok(count == 1, "count is not 1, got %d.\n", count);
IScriptModuleCollection_Release(mods);
IScriptControl_Release(sc);
--
2.21.0
More information about the wine-devel
mailing list