[twain_32 1/7] Modify get_condition_status to allow for a specific source.

Jeremy White jwhite at codeweavers.com
Wed Jan 28 07:47:08 CST 2009


---
  dlls/twain_32/tests/dsm.c |   16 ++++++++--------
  1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c
index a915b53..6ed0a90 100644
--- a/dlls/twain_32/tests/dsm.c
+++ b/dlls/twain_32/tests/dsm.c
@@ -50,10 +50,10 @@ static BOOL dsm_RegisterWindowClasses(void)
  }


-static void get_condition_code(TW_IDENTITY *appid, TW_STATUS *status)
+static void get_condition_code(TW_IDENTITY *appid, TW_IDENTITY *source, 
TW_STATUS *status)
  {
      TW_UINT16 rc;
-    rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_STATUS, MSG_GET, status);
+    rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_STATUS, MSG_GET, 
status);
      ok(rc == TWRC_SUCCESS, "Condition code not available, rc %d\n", rc);
  }

@@ -65,7 +65,7 @@ static void test_sources(TW_IDENTITY *appid)

      memset(&source, 0, sizeof(source));
      rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, 
MSG_GETFIRST, &source);
-    get_condition_code(appid, &status);
+    get_condition_code(appid, NULL, &status);
      todo_wine
      ok(rc == TWRC_SUCCESS || rc == TWRC_FAILURE, "Get first error 
code, rc %d, cc %d\n", rc, status.ConditionCode);
      if (rc == TWRC_SUCCESS)
@@ -78,13 +78,13 @@ static void test_sources(TW_IDENTITY *appid)
          trace("Got scanner %s\n", source.ProductName);
          memset(&source, 0, sizeof(source));
          rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, 
MSG_GETNEXT, &source);
-        get_condition_code(appid, &status);
+        get_condition_code(appid, NULL, &status);
          ok(rc == TWRC_SUCCESS || rc == TWRC_ENDOFLIST, "Get next 
source failed, rc %d, cc %d\n", rc, status.ConditionCode);
      }

      memset(&source, 0, sizeof(source));
      rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, 
MSG_GETDEFAULT, &source);
-    get_condition_code(appid, &status);
+    get_condition_code(appid, NULL, &status);
      ok(rc == TWRC_SUCCESS || rc == TWRC_FAILURE, "Get default error 
code, rc %d, cc %d\n", rc, status.ConditionCode);
      if (rc == TWRC_SUCCESS)
      {
@@ -98,12 +98,12 @@ static void test_sources(TW_IDENTITY *appid)
      if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS)
      {
          rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, 
MSG_OPENDS, &source);
-        get_condition_code(appid, &status);
+        get_condition_code(appid, NULL, &status);

          if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS)
          {
              rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, 
MSG_CLOSEDS, &source);
-            get_condition_code(appid, &status);
+            get_condition_code(appid, NULL, &status);
              ok(rc == TWRC_SUCCESS, "Close DS Failed, rc %d, cc %d\n", 
rc, status.ConditionCode);
          }
      }
@@ -113,7 +113,7 @@ static void test_sources(TW_IDENTITY *appid)
          trace("Interactive, so trying userselect\n");
          memset(&source, 0, sizeof(source));
          rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, 
MSG_USERSELECT, &source);
-        get_condition_code(appid, &status);
+        get_condition_code(appid, NULL, &status);
          ok(rc == TWRC_SUCCESS || rc == TWRC_CANCEL, "Userselect 
failed, rc %d, cc %d\n", rc, status.ConditionCode);
      }

-- 
1.5.6.5





More information about the wine-patches mailing list