Commit 768c06d3 authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

twain_32: Set the correct condition code for DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT.

parent e93c14fa
...@@ -156,6 +156,7 @@ TW_UINT16 TWAIN_IdentityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData) ...@@ -156,6 +156,7 @@ TW_UINT16 TWAIN_IdentityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData)
if (!nrdevices) if (!nrdevices)
return TWRC_FAILURE; return TWRC_FAILURE;
*pSourceIdentity = devices[0].identity; *pSourceIdentity = devices[0].identity;
DSM_twCC = TWCC_SUCCESS;
return TWRC_SUCCESS; return TWRC_SUCCESS;
} }
......
...@@ -174,15 +174,9 @@ static void test_sources(TW_IDENTITY *appid) ...@@ -174,15 +174,9 @@ static void test_sources(TW_IDENTITY *appid)
memset(&source, 0, sizeof(source)); memset(&source, 0, sizeof(source));
rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETDEFAULT, &source); rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETDEFAULT, &source);
get_condition_code(appid, NULL, &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); ok( (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) ||
if (rc == TWRC_SUCCESS) (rc == TWRC_FAILURE && status.ConditionCode == TWCC_NODS),
{ "Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode);
todo_wine
ok(status.ConditionCode == TWCC_SUCCESS,"Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode);
}
if (rc == TWRC_FAILURE)
ok(status.ConditionCode == TWCC_NODS,"Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode);
if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment