Stefan Leichter : wiaservc: Add some tests for SelectDeviceDlg.

Alexandre Julliard julliard at winehq.org
Fri Mar 30 12:32:36 CDT 2018


Module: wine
Branch: master
Commit: daf7f3c4ae41c5547e88ef40971e3adc1f9aab06
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=daf7f3c4ae41c5547e88ef40971e3adc1f9aab06

Author: Stefan Leichter <sle85276 at gmx.de>
Date:   Thu Mar 29 23:08:29 2018 +0200

wiaservc: Add some tests for SelectDeviceDlg.

Signed-off-by: Stefan Leichter <sle85276 at gmx.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wiaservc/tests/wia.c | 16 ++++++++++++++++
 include/wiadef.h          |  6 ++++++
 2 files changed, 22 insertions(+)

diff --git a/dlls/wiaservc/tests/wia.c b/dlls/wiaservc/tests/wia.c
index c7c2fd9..6183cef 100644
--- a/dlls/wiaservc/tests/wia.c
+++ b/dlls/wiaservc/tests/wia.c
@@ -25,6 +25,8 @@
 #include "objbase.h"
 #include "initguid.h"
 #include "wia_lh.h"
+#include "sti.h"
+#include "wiadef.h"
 
 #include "wine/test.h"
 
@@ -54,6 +56,19 @@ todo_wine
     IEnumWIA_DEV_INFO_Release(devenum);
 }
 
+static void test_SelectDeviceDlg(void)
+{
+    HRESULT hr;
+    IWiaItem *root;
+    hr = IWiaDevMgr_SelectDeviceDlg(devmanager, NULL, StiDeviceTypeDefault, 0, NULL, NULL);
+todo_wine
+    ok(hr == E_POINTER, "got 0x%08x\n", hr);
+
+    hr = IWiaDevMgr_SelectDeviceDlg(devmanager, NULL, StiDeviceTypeDefault, 0, NULL, &root);
+todo_wine
+    ok(hr == S_OK || hr == WIA_S_NO_DEVICE_AVAILABLE, "got 0x%08x\n", hr);
+}
+
 START_TEST(wia)
 {
     HRESULT hr;
@@ -68,6 +83,7 @@ START_TEST(wia)
     }
 
     test_EnumDeviceInfo();
+    test_SelectDeviceDlg();
 
     IWiaDevMgr_Release(devmanager);
     CoUninitialize();
diff --git a/include/wiadef.h b/include/wiadef.h
index 28e43e0..bd95872 100644
--- a/include/wiadef.h
+++ b/include/wiadef.h
@@ -20,3 +20,9 @@
 
 #define WIA_DEVINFO_ENUM_ALL      0x0000000f
 #define WIA_DEVINFO_ENUM_LOCAL    0x00000010
+
+#define FACILITY_WIA 33
+
+#define BASE_VAL_WIA_ERROR        0x00000000
+
+#define WIA_S_NO_DEVICE_AVAILABLE       MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 21))




More information about the wine-cvs mailing list