Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f7c267da
Commit
f7c267da
authored
Jan 28, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Jan 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
twain_32: Modify get_condition_status to allow for a specific source.
parent
0d731937
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
dsm.c
dlls/twain_32/tests/dsm.c
+8
-8
No files found.
dlls/twain_32/tests/dsm.c
View file @
f7c267da
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment