Module: wine Branch: master Commit: f7c267dac08c918fce45137293fd79be8d25ebaa URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7c267dac08c918fce45137293...
Author: Jeremy White jwhite@winehq.org Date: Wed Jan 28 08:52:36 2009 -0600
twain_32: Modify get_condition_status to allow for a specific source.
---
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); }